Patrick Da Silva
Reputation
220
Top tag
Next privilege 250 Rep.
 Apr 21 awarded Famous Question Dec 7 awarded Yearling Apr 8 awarded Notable Question Nov 21 awarded Nice Question Sep 8 awarded Popular Question Sep 21 awarded Custodian Sep 10 accepted Trying to plot ugly expression, not working Sep 10 comment Trying to plot ugly expression, not working I just saw that the typo was also in my question. It was really just a transcription mistake though because I've always been able to plot the first equation, it was with the second one I had trouble. And you helped! Thank you again. +1 & check! Sep 10 revised Trying to plot ugly expression, not working added 12 characters in body Sep 10 comment Trying to plot ugly expression, not working I found the typo in your code! The curves now perfectly match. The curve in brown is actually the original one, the right line for 'equation' was equation = ComplexExpand[ Abs[A[z] + (3 z + z^2)/A[z] + z] - Abs[rho A[z] + rho^2-----> (3 z + z^2)/A[z]<------ + z] /. z -> x + I y, TargetFunctions -> {Re, Im}]; Sep 10 comment Trying to plot ugly expression, not working I don't know why in case of equation2 you felt the need to use the command 'TargetFunctions->{Re,Im}'? I must admit I don't know what it does, but I don't see how what you're trying to do is any different from the 'equation' case, where you just wrote 'equation==0' in the end. Sep 10 comment Trying to plot ugly expression, not working Sure. I'll give it a try and look what happens. But you definitely don't have the right expression; that curve in brown down there is not natural in the problem. Maybe I typed something wrong when entering the question in Mathematica. I'll double check Sep 10 awarded Commentator Sep 10 comment Trying to plot ugly expression, not working I really don't understand why you added those two lines though! equation /. {x -> 1.2, y -> 3.4} equation2 /. {x -> 1.2, y -> 3.4} Sep 10 comment Trying to plot ugly expression, not working The picture in purple is quite similar to the one I have, except mine was way smoother. The equation you have in brownish looks like the conjugate of the equation in purple. I expected this to happen, but I didn't know about the ComplexExpand command. Sep 10 comment Trying to plot ugly expression, not working @belisarius : Sorry yes, I just typed it on MSE a little too fast. But I did put the x + Iy when I tried. I know the expression is a bit ugly but it's just something of the form f(x) = conjugate( f(x) ) rho^2, so if you just remember that f(x) = A[x]...+(3x+x^2)/A[x], I tried something like ContourPlot[F[x+Iy] == Conjugate[F[x+I y]] rho^2, {x,-3,3},{y,-3,3}], and I tried with+without using a function F or the actual expression. Sep 10 revised Trying to plot ugly expression, not working added 96 characters in body Sep 10 comment Trying to plot ugly expression, not working I guessed that ContourPlot[A[x] Conjugate[x] + Conjugate[(3x+x^2)/A[x]] x + Conjugate[A[x]] (3x + x^2)/A[x] == Conjugate[A[x] Conjugate[x] + Conjugate[(3x+x^2)/A[x]] x + Conjugate[A[x]] (3x + x^2)/A[x]] rho^2 ,{x,-3,3},{y,-3,3}] should have worked, but unfortunately it didn't. Sep 10 comment Trying to plot ugly expression, not working ContourPlot[ Abs[H[x + I y]] == Abs[J[x + I y]], {x, -3, 3}, {y, -3, 3}] Where H[x_] := AA[x] + (3 x + x^2)/AA[x] + x and J[x_] := rho AA[x] + rho^2 (3 x + x^2)/AA[x] + x. This is the one that worked (using the initial equations, not the re-worked up ones). All my other attempts with the new equation failed, I tried a few using ContourPlot. Sep 10 comment Trying to plot ugly expression, not working @R.M : It is utterly simple, but it's really huge, because one needs to expand two products and each product is a product of two factors with three terms, so you end up adding 18 things. But it simplifies really well, you just need to know that (1-rho^2)/(1-rho) = rho+1 = -rho^2 and everything follows naturally. I really considered seriously the answer to your question. If you don't trust me, feel free to check it yourself, but re-transcribing it might end up in transcription mistakes more than anything else.