Re: Find the solution of a system of two nonlinear, complicated
- To: mathgroup at smc.vnet.net
- Subject: [mg108835] Re: Find the solution of a system of two nonlinear, complicated
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Fri, 2 Apr 2010 05:21:49 -0500 (EST)
Christian Schneider wrote:
> Dear members of the mathgroup email group,
>
> I have serious difficulties in solving the following problem in Mathematica
> v.7 and would very grateful if anyone could give me a helping hand with
> that.
>
> I want to solve a system of two nonlinear equations. Unfortunately the
> equations are rather bulky. I've tried to use FindRoot for this problem, but
> I get three error messages:
>
> General::ovfl : Overflow occurred in computation
>
> General::ovfl : Overflow occurred in computation
>
> FindRoot::nlnum : The function value {Overflow[], Overflow[]} is not a list
> of numbers with dimensions {2} at {sigmabare, dmu}={0.2, 4}.
>
> I think mathematica is telling me that the iterations or the starting points
> need to be changed. I tried to do that, but always end up with that error
> messages.
>
> I have a set of two equations with two variables and two parameters each,
> and I want to solve the two variables of the set.
>
> The variables of the two equations are: sigmabare, dmu
>
> The two parameters per equation are
>
> for equation1: epsilon1, c01
>
> for equation2: epsilon2, c02
>
>
>
> The complete syntax as plain text is:
>
>
>
> FindRoot[{c01*6.022*10^(23) ==
>
> Abs[sigmabare/(2*(437*10^(-12))*3*(1.602*10^(-19)))]*
>
> Exp[(-(4.11641*10^(-21))*(1.65*(1/(4*(4.11641*10^(-21))*
>
> epsilon1*(8.854*10^(-12)))*((1.602*10^(-19))^3*3^\
>
> 3*sigmabare/3.141592654)^(1/2)) -
>
> 2.61*(1/(4*(4.11641*10^(-21))*
>
> epsilon1*(8.854*10^(-12)))*((1.602*10^(-19))^3*3^\
>
> 3*sigmabare/3.141592654)^(1/2))^(1/4) +
>
> 0.26*Log[
>
> 1/(4*(4.11641*10^(-21))*
>
> epsilon1*(8.854*10^(-12)))*((1.602*10^(-19))^3*3^\
>
> 3*sigmabare/3.141592654)^(1/2)] + 1.95))/((4.11641*10^(-21)))]*
>
> Exp[dmu/((4.11641*10^(-21)))]/(6.022*10^(23)) /.
>
> c01 -> {0.5*10^(-5)} /. epsilon1 -> {54} ,
>
> c02*6.022*10^(23) ==
>
> Abs[sigmabare/(2*(437*10^(-12))*3*(1.602*10^(-19)))]*
>
> Exp[(-(4.11641*10^(-21))*(1.65*(1/(4*(4.11641*10^(-21))*
>
> epsilon2*(8.854*10^(-12)))*((1.602*10^(-19))^3*3^3*
>
> sigmabare/3.141592654)^(1/2)) -
>
> 2.61*(1/(4*(4.11641*10^(-21))*
>
> epsilon2*(8.854*10^(-12)))*((1.602*10^(-19))^3*3^3*
>
> sigmabare/3.141592654)^(1/2))^(1/4) + 0.26*Log[
>
> 1/(4*(4.11641*10^(-21))*
>
> epsilon2*(8.854*10^(-12)))*((1.602*10^(-19))^3*3^3*
>
> sigmabare/3.141592654)^(1/2)] +
>
> 1.95))/((4.11641*10^(-21)))]*
>
> Exp[dmu/((4.11641*10^(-21)))]/(6.022*10^(23))} /.
>
> c02 -> {1*10^(-5)} /.
>
> epsilon2 -> {78}, {{sigmabare, 0.2}, {dmu, 4}}]
>
>
>
> Sorry for this mess of equations.
>
>
>
> Has somebody an idea where I am going wrong and how to solve this?
>
>
>
> Thanks a lot in advance for your help,
>
>
>
> Chris
>
Here is your input in plain Mathematica InputForm, and with the excess
curly braces removed.
FindRoot[{3.011*^18 == 3953.3389353664143*
E^(2.429301260078564*^20*dmu -
1.*(1.95 - 5.769493817846426*sigmabare^(1/8) +
39.39787193680568*Sqrt[sigmabare] +
0.26*Log[23.87749814351859*Sqrt[sigmabare]]))*
Abs[sigmabare], 6.022*^18 ==
3953.3389353664143*E^(2.429301260078564*^20*dmu -
1.*(1.95 - 5.262747112219504*sigmabare^(1/8) +
27.27544980240393*Sqrt[sigmabare] +
0.26*Log[16.530575637820565*Sqrt[sigmabare]]))*
Abs[sigmabare]}, {{sigmabare, 0.2}, {dmu, 4}}]
You can take logs of both sides to avoid the overflow.
rt = FindRoot[{Log[3.011*^18] ==
PowerExpand[
Log[3953.3389353664143*
E^(2.429301260078564*^20*
dmu - (1.95 - 5.769493817846426*sigmabare^(1/8) +
39.39787193680568*Sqrt[sigmabare] +
0.26*Log[23.87749814351859*Sqrt[sigmabare]]))*
Abs[sigmabare]]],
Log[6.022*^18] ==
PowerExpand[
Log[3953.3389353664143*
E^(2.429301260078564*^20*dmu -
1.*(1.95 - 5.262747112219504*sigmabare^(1/8) +
27.27544980240393*Sqrt[sigmabare] +
0.26*Log[16.530575637820565*Sqrt[sigmabare]]))*
Abs[sigmabare]]]}, {{sigmabare, 0.2}, {dmu, 4}}]
{sigmabare -> 0.00502108, dmu -> 1.70676*10^-19}
Daniel Lichtblau
Wolfram Research