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

Post Reply:
Email Address:

Please send email when my message is replied to.

Url (optional):
Message: view original message?
Attachment (optional):
Please answer this:1+1 =

Original Message (ID '149486') By jf:
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.