Re: Find the solution of a system of two nonlinear, complicated equations

*To*: mathgroup at smc.vnet.net*Subject*: [mg108824] Re: Find the solution of a system of two nonlinear, complicated equations*From*: Alois Steindl <Alois.Steindl at tuwien.ac.at>*Date*: Fri, 2 Apr 2010 05:19:47 -0500 (EST)*References*: <hp1ufs$6d4$1@smc.vnet.net>

Christian Schneider schrieb: > 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 > Hello, this looks really like a mess of equations! I do not want to play around with your equations, instead I want to give you some general advices: First you use several constants (like some numeric appoximation of pi and Avogadro's constant) throughout your equations without assigning them to symbols. Second you use very large and small quantities simultaneously. You surely are aware of the limits of floating point calculations? I would advice to rescale your system before trying to solve it. You should use non-dimensional quantities and scale the system, such that all expressions in the equations are of order 1; also the expected solution should be of that order. Alois