Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'A problem of NSolve' topicStudent Support Forum > General > "A problem of NSolve"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
08/25/12 10:58am

In Response To 'Re: A problem of NSolve'
---------
I am uncertain that your method will find all roots.

You might look at

http://www.google.com/search?q=mathematica+"all+roots"+findroot

and see what others have said about this.

This tries to implement your method and eliminate "duplicate roots"

deleteduplicatesolutions[v_] := Module[{h,t,e,i}, h={}; t=v; While[t≠{}, e=First[t]; t=Rest[t]; h=Join[h,{e}];
For[i=Length[t], i≥1, i--, If[Norm[t[[i]]-e]<10^-3, t=Drop[t,{i}]]]]; h];

Table[{T12,T13,deleteduplicatesolutions[ Flatten[Table[{x,y,z}/.FindRoot[{
-(1+T12+T13)* x+T12*2/Pi* ArcTan[(Pi/2)*1.4*y] + T13*2/Pi* ArcTan[(Pi/2)*1.4*z] == 0,
-(1+T12+1)*y + T12*2/Pi* ArcTan[(Pi/2)*1.4*x] + 1*2/Pi* ArcTan[(Pi/2)*1.4*z] == 0,
-(1+T13+1)*z + T13*2/Pi* ArcTan[(Pi/2)*1.4*x] + 1*2/Pi* ArcTan[(Pi/2)*1.4*y] == 0},
{{x,i}, {y,j}, {z,k}}], {i,-1.,1,.1}, {j,-1.,1,.1}, {k,-1.,1,.1}], 2]]}, {T12,0.,3,0.1}, {T13,0.,3,0.1}]

Please test this carefully

URL: ,

Subject (listing for 'A problem of NSolve')
Author Date Posted
A problem of NSolve Xizheng 08/23/12 11:06am
Re: A problem of NSolve Bill Simpson 08/23/12 11:47am
Re: Re: A problem of NSolve Xizheng 08/23/12 1:48pm
Re: Re: Re: A problem of NSolve Bill Simpson 08/23/12 11:16pm
Re: A problem of NSolve Xizheng 08/24/12 09:42am
Re: Re: A problem of NSolve Bill Simpson 08/25/12 10:58am
Re: Re: Re: A problem of NSolve Bill Simpson 08/26/12 3:11pm
Re: Re: Re: A problem of NSolve Xizheng 08/26/12 4:35pm
Re: A problem of NSolve Xizheng 08/24/12 09:43am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic