Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Finding all roots of a polynomial over a range' topicStudent Support Forum > General > "Finding all roots of a polynomial over a range"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
jf
11/28/12 7:57pm

a)"ns = NSolve[(uuu /. n -> 100) == 0, w, WorkingPrecision -> 25]"

What does the "/.n --> 100" mean in this statement?

It means take all the n's in uuu and replace them with 100s.
"/." is shorthand for the ReplaceAll function. "->" is shorthand for the Rule function.


b) "uuu /. n -> 100 /. ns // Chop"

Same thing right here. And what does the row of zeros below it mean?

i) ditto.
ii) "/. ns" means take the rules that NSolve gave and use them to replace the w's in uuu.
iii) "//" means pipe the output from the left side into the function on the right.
iv) Chop turns tiny numbers into zeros. Because of finite-precision arithmetic, the result of what was to the left of the // had lots of almost-zero pieces. Chop converted them to exact zeros.
v) The list of zeros underneath said that when the results from NSolve were substituted back into the equations, they gave zero. This is good, since you wanted the roots.


c) Next, when I attempt to modify the range of n I get an error ...


The warning means that Transpose needs a rectangular matrix but you gave it a one-dimensional list. Attach a notebook (.NB) file with the code.




URL: ,

Subject (listing for 'Finding all roots of a polynomial over a range')
Author Date Posted
Finding all roots of a polynomial over a range Brandon 11/27/12 8:02pm
Re: Finding all roots of a polynomial over a ra... jf 11/28/12 12:43pm
Re: Re: Finding all roots of a polynomial over ... Brandon 11/28/12 7:09pm
Re: Finding all roots of a polynomial over a ra... jf 11/28/12 7:57pm
Re: Re: Finding all roots of a polynomial over ... Brandon 11/28/12 10:24pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic