Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Using NSolve crushes Math kernel' topicStudent Support Forum > General > "Using NSolve crushes Math kernel"

Next Comment >Help | Reply To Topic
Author Comment/Response
09/18/10 06:02am

I use NSolve to find a roots of the trigonometric equation in the following function:

getroots[p_, q_, h_] :=
res = NSolve[
Sin[2*t] - 2*h*(Cos[p]*Cos[t]*Sin[q] - Sin[t]*Cos[q]) == 0, t];
t /. res]

When I evaluate this separately - everything is OK. But if I put it inside some standard Mathematica function (like Plot, NIntegrate etc) relative to arbitrary range of variable p, Mathematica kernel is crushed. The same happens if I try some range of variable q with p<>0. At the same time evaluating relative to any arbitrary range of h>0 does not lead to damage. Of course I can calculate appropriate list of values of getroots and use it in ListPlot or hand-made numerical calculation function, but 1) it is a bit tiresomely 2) I want to understand what is the cause of the error.

Thank everybody in advance!

URL: ,

Subject (listing for 'Using NSolve crushes Math kernel')
Author Date Posted
Using NSolve crushes Math kernel Ivan 09/18/10 06:02am
Re: Using NSolve crushes Math kernel Peter Pein 09/19/10 06:54am
Next Comment >Help | Reply To Topic