Group Abstract Group Abstract

Message Boards Message Boards

Unexpected use of k$ notation in output of Reduce?

Posted 22 days ago
POSTED BY: Lucas Tubacki
5 Replies

The K$... variable is a parameter. It is likely generated internally by Module[], and it shouldn't be left in the answer. I'm not sure why you're seeing it, but it is helpful. If we replace it by k, we can construct the following parametrized family of solutions:

mySol // ClearAll;
mySol[k_?NumericQ] := 
  First@SolveValues[{ComplexExpand[
      Abs[x + y*I] == Abs[(x + y*I)^(x + y*I)], 
      TargetFunctions -> {Re, Im}], 
     0 <= x <= E^k && y == Sqrt[E^(2 k) - x^2]}, {x, y}];

Then

Table[N@mySol[k], {k, 0, 5, 1/4}] // ListLinePlot
POSTED BY: Michael Rogers
Posted 20 days ago

First doesn't seem to be able to be applied to the Solved expression. Thinks its just an empty list? enter image description here

POSTED BY: Lucas Tubacki

Sorry, I copied the wrong code. I updated my previous answer, which should work now.

POSTED BY: Michael Rogers
Posted 22 days ago

Yeah, it looks like some internal symbols were leaked out. Mathematica "localizes" by using naming conventions. To create a unique symbol it appends $n where n is an integer that keeps getting larger to insure no name collisions.

FWIW, I'm not sure how Mathematica will handle the constraints x>1 and y>0 when you're explicitly setting the domain to be Complexes. I don't think that really has anything to do with the specific inability to reduce, however.

POSTED BY: Eric Rimbey
Posted 20 days ago

The wolfram documentation for Reduce does specifically mention that you can restrict your parameters to be real, but allow calculations involving complex numbers via that format.

https://reference.wolfram.com/language/ref/Reduce.html enter image description here

Thanks for the variable localization primer, though!

POSTED BY: Lucas Tubacki
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard