Prev: Can't figure out how to include syntax coloring in Printout
Next: Passing function arguments as lists of replacement rules
From: dragonman on 7 Nov 2009 06:48 I want the solutions to x^n=1 to appear in the form r(cos theta +isin theta) and then to graph them on an Argand diagram. Any advice given would be much appreciated.
From: Mark McClure on 8 Nov 2009 06:51 On Sat, Nov 7, 2009 at 6:49 AM, dragonman <morrisneedleman(a)gmail.com> wrote: > I want the solutions to x^n=1 to appear in the form r(cos theta +isin > theta) and then to graph them on an Argand diagram. Any advice given > would be much appreciated. Here are the solutions to such an equation in the form you want. sols = ExpToTrig[z /. Solve[z^99 == 1, z]] And here they are in the plane. ListPlot[Table[{Re[z], Im[z]}, {z, sols}], AspectRatio -> Automatic] Mark McClure
From: Murray Eisenberg on 8 Nov 2009 06:51 My Mathematica notebook nthRoots.nb may help you. You can download it from the Files page at my web site: http://www.math.umass.edu/~murray/Math_421_Eisenberg/ For its graphics, that notebook relies upon David Park's "Presentations" Mathematica application. In case that's not available to you, on that same Files page I have a pdf version of the evaluated notebook. dragonman wrote: > I want the solutions to x^n=1 to appear in the form r(cos theta +isin > theta) and then to graph them on an Argand diagram. Any advice given > would be much appreciated. > -- Murray Eisenberg murray(a)math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
From: David Bailey on 8 Nov 2009 07:10 dragonman wrote: > I want the solutions to x^n=1 to appear in the form r(cos theta +isin > theta) and then to graph them on an Argand diagram. Any advice given > would be much appreciated. > Didn't your teacher tell you how to do this, or give you a reading list? This board is not here to answer homework questions - what would be the point? David Bailey http://www.dbaileyconsultancy.co.uk
From: ynb on 9 Nov 2009 05:45
On 11=E6=9C=887=E6=97=A5, =E5=8D=88=E5=BE=8C8:48, dragonman <morrisneedle.. .@gmail.com> wrote: > I want the solutions to x^n=1 to appear in the form r(cos theta +isin > theta) and then to graph them on an Argand diagram. Any advice given > would be much appreciated. RootPlotStyle[poly_, z_] := ListPlot[{Re[z], Im[z]} /. NSolve[poly == 0, z], AspectRatio -> Automatic, PlotStyle -> {PointSize[0.06], Hue[0.8521]}] /; PolynomialQ[poly, z] n = 7; poly = z^n - 1; sol = Solve[poly == 0, z] /. (a_ -> b_) :> a -> ComplexExpand[b]; z /. sol RootPlotStyle[poly, z] n = 24; poly = z^n - 1; sol = Solve[poly == 0, z] /. (a_ -> b_) :> a -> ComplexExpand[b]; TableForm[z /. sol] RootPlotStyle[poly, z] |