| 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: , |
|