Re: Re: problem with FindRoot
- To: mathgroup at smc.vnet.net
- Subject: [mg54146] Re: [mg54088] Re: problem with FindRoot
- From: "Janos D. Pinter" <jdpinter at hfx.eastlink.ca>
- Date: Fri, 11 Feb 2005 03:35:04 -0500 (EST)
- References: <cud7jj$2vm$1@smc.vnet.net> <200502100746.CAA16603@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Jose, as I said earlier, try NMinimize. At 03:46 AM 2/10/2005, qfwfq wrote: >Thanks Mr. Wolf, > >Your solution works very well. The only problem was Mathematica 5.0 >does not like your assignment. It said: > >function::lvset: Local variable specification spec contains expr which >is an assignment to var; only assignments to symbols are allowed. > >But it has been easy to solve it. > >BTW, and about your last comment > >but this won't garantee anything for your solutions. >you're right. Sometimes, the solutions Mathematica provides to the >simultaneous solution of the set of equations are not correct. This is >the reason because my initial guess to FindRoot is {24}. Do you know a >better way to solve a set of equations with lots of exponentials. I >only know an estimation of where the solutions are. > >Thnaks again, > >Jose > > > >Wolf, Hartmut wrote: > > >-----Original Message----- > > >From: qfwfq [mailto:qfwfq_0 at yahoo.com] To: mathgroup at smc.vnet.net > > >Sent: Tuesday, February 08, 2005 11:31 AM > > >To: mathgroup at smc.vnet.net > > >Subject: [mg54146] [mg54088] problem with FindRoot > > > > > >Hi all! > > > > > >I have four equations (eq1=0, ..., eq4=0) with the the four > > >unknowns (y1, y2, y3, y4) in exponentials. I know the interval > > >where the solutions are, and I solve this equation set by > > >means of FindRoot by obtaining set of solutions. Then, I make > > >a selection between the obtained results. > > > > > >However, I have a dependency between variables: y1<y2<y3<y4 > > > > > > > > >mR = Table[FindRoot[{eqn1 == 0, eqn2 == 0, eqn3 == 0, eqn4 == > > >0}, {y1, Random[Real, {a, b}]}, {y2, Random[Real, {a, b}]}, > > >{y3, Random[Real, {a, b}]}, {y4, Random[Real, {a, b}]}], {24}]; > > > > > >My question is > > > > > >Is there any way of include the relation between y1, ..., y4 > > >in the selection of them by Random. Something like {y2, > > >Random[Real, {y1, b}]}, {y3, Random[Real, {y2, b}]}, ... > > > > > >I hope I have clearly explained my problem. > > > > > >Thanks > > > > > > > > > > Would this be what you intended, ordered starting values? > > > > mR = Table[ > > With[{{s1, s2, s3, s4} = Sort[Table[Random[Real, {a, b}], >{4}]]}, > > FindRoot[{eqn1 == 0, eqn2 == 0, eqn3 == 0, eqn4 == 0}, {y1, >s1}, > > {y2, > > s2}, {y3, s3}, {y4, s4}]], {24}]; > > > > but this won't garantee anything for your solutions. > > > > -- > > Hartmut Wolf
- References:
- Re: problem with FindRoot
- From: "qfwfq" <qfwfq_0@yahoo.com>
- Re: problem with FindRoot