Student Support Forum: 'Solve equation(s) with a List as Variable' topicStudent Support Forum > General > Archives > "Solve equation(s) with a List as Variable"

 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic
 Author Comment/Response Bill Simpson 01/20/13 9:02pm In Response To 'Re: Re: Re: Re: Solve equation(s) with a List a...'---------Excellent! Now we have a specific number that I think shows the essence of your problem. In[1]:= mag=1.633333333333*10^-14; w=0.005; d:=148*10^(-9); mu0:=4*Pi*10^(-7); B:=5/10000; FindRoot[(w*d*B+mu0*mag)/(2*w*B)-x*Tanh[d/(2*x)],{x,1*10^(-8)}]; (w*d*B+mu0*mag)/(2*w*B)-x*Tanh[d/(2*x)] Out[7]= 7.400000410501439`*^-8 - x Tanh[37/(500000000 x)] In[8]:= Plot[%,{x,1,12}] Out[8]= ...PlotSnipped... Now I cannot be absolutely positive here, because numerical analysis can be a delicate process, but what I think you may be seeing at here is that the combination of extremely large and extremely small coefficients and the limited precision of the approximate decimal numbers you are dealing with algorithm being used behind the scene by FindRoot means that when the value of mag gets small enough and the value of x gets large enough that the near horizontal behavior of your function with larger x convinces the FindRoot algorithm that it has found a horizontal flat spot in your curve, gives you the warning and bails out. As you can see, Plot is no more happy with the result than FindRoot is. But if the plot can be depended on then it is clear that the result is not zero anywhere near x=10. Consider this In[10]:= mag=1.633333333333*10^-14; w=0.005; d:=148*10^(-9); mu0:=4*Pi*10^(-7); B:=5/10000; Table[{x,(w*d*B+mu0*mag)/(2*w*B)-x*Tanh[d/(2*x)]},{x,1,20}] Out[13]= { {1, 4.105014524035853`*^-15}, {2, 4.105014431391624`*^-15}, {3, 4.105014418156734`*^-15}, {4, 4.1050144049218444`*^-15}, {5, 4.1050144049218444`*^-15}, {6, 4.105014391686955`*^-15}, {7, 4.105014391686955`*^-15}, {8, 4.105014391686955`*^-15}, {9, 4.105014391686955`*^-15}, {10, 4.105014391686955`*^-15}, {11, 4.105014391686955`*^-15}, {12, 4.105014391686955`*^-15}, {13, 4.105014391686955`*^-15}, {14, 4.105014391686955`*^-15}, {15, 4.105014391686955`*^-15}, {16, 4.105014391686955`*^-15}, {17, 4.105014391686955`*^-15}, {18, 4.105014391686955`*^-15}, {19, 4.105014391686955`*^-15}, {20, 4.105014391686955`*^-15}} If that was your data and you had to find a zero in it then what would you do? URL: ,

 Subject (listing for 'Solve equation(s) with a List as Variable') Author Date Posted Solve equation(s) with a List as Variable Markus 01/17/13 12:15pm Re: Solve equation(s) with a List as Variable Bill Simpson 01/17/13 10:19pm Re: Re: Solve equation(s) with a List as Variable Markus 01/18/13 09:22am Re: Re: Re: Solve equation(s) with a List as Va... Bill Simpson 01/18/13 2:05pm Re: Re: Re: Re: Solve equation(s) with a List a... Markus 01/19/13 06:08am Re: Re: Re: Re: Re: Solve equation(s) with a Li... Bill Simpson 01/20/13 9:02pm Re: Re: Re: Re: Re: Solve equation(s) with a Li... Bill Simpson 01/20/13 9:30pm Re: Re: Re: Re: Re: Re: Solve equation(s) with ... Markus 01/21/13 12:25pm
 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic