Re: Re: Complex Plot

*To*: mathgroup at smc.vnet.net*Subject*: [mg88314] Re: [mg88288] Re: Complex Plot*From*: Andrzej Kozlowski <akozlowski at gmail.com>*Date*: Thu, 1 May 2008 03:22:34 -0400 (EDT)*References*: <fv9a83$mjo$1@smc.vnet.net> <200804301103.HAA04939@smc.vnet.net>

On 30 Apr 2008, at 20:03, Jean-Marc Gulliet wrote: > Chris Degnen wrote: > >> Can anyone tell me how I can re-express this >> equation in terms of x for plotting? >> >> Sin[x^2*y]==Log[x/y] >> >> last sighted: http://tinyurl.com/3s4hfd > > Hi Chris, > > If you are interested in the graphical representation of this > function, > you may want to use *ContourPlot* and experiment with its various > options. For instance, > > ContourPlot[Sin[x^2*y] - Log[x/y], {x, -12, 35}, {y, -8, 23}, > ImageSize -> 500] > > ContourPlot[Sin[x^2*y] - Log[x/y], {x, -12, 35}, {y, -8, 23}, > ImageSize -> 500, ColorFunction -> (White &), ContourStyle -> Black, > MaxRecursion -> 0, PlotPoints -> 500] > > You can see the result at > > http://homepages.nyu.edu/~jmg336/mathematica/ > chrisdegnencomplexplot.pdf > > Note that the second plot may take several minutes to complete due to > the huge number of sampling points, but it should be very close to > what > you have seen on the Internet. > > Hope this helps, > -- Jean-Marc > I do not think this gives a realistic plot, due to numerous artifices caused by ContourPlot. Here is one way to get a realistic graph without using ContourPlot. We want to plot the set of solutions to: Sin[x^2*y] == Log[x/y] We first use a substitution: x == t y The equation that we get in terms of y and t can now be completely solved by Mathematica: Reduce[Sin[t^2*y^3] == Log[t], y, Reals] Element[C[1], Integers] && 1/E <= t <= E && (y == Root[-#1^3 - ArcSin[Log[t]]/t^2 + (2*Pi*C[1])/t^2 + Pi/t^2 & , 1] || y == Root[-#1^3 + ArcSin[Log[t]]/t^2 + (2*Pi*C[1])/t^2 & , 1]) We can use Plot to get a graph of this: g = Plot[Evaluate[Flatten[ Table[{Root[ -#1^3 - ArcSin[ Log[t]]/t^2 + (2*Pi*n)/t^2 + Pi/t^2 & , 1], Root[-#1^3 + ArcSin[Log[t]]/ t^2 + (2*Pi*n)/ t^2 & , 1]}, {n, -100, 100}]]], {t, 1/E, E}]; Now we can convert this graph into a graph of the relationship we want: Show[g1 = g /. {t_?NumberQ, y_?NumberQ} -> {t y, y}, AspectRatio -> Automatic, PlotRange -> All] This is rather different from the graph displayed at the link above but quite similar to: Show[ContourPlot[Sin[x^2*y] == Log[x/y], {x, -3, 3}, {y, -3, 3}], Axes -> True] Andrzej Kozlowski