Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Can I solve this system of nonlinear equations?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125283] Re: Can I solve this system of nonlinear equations?
  • From: Ray Koopman <koopman at sfu.ca>
  • Date: Sun, 4 Mar 2012 04:34:51 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jil5ld$rrm$1@smc.vnet.net> <jit112$e7i$1@smc.vnet.net>

On Mar 3, 3:58 am, Ray Koopman <koop... at sfu.ca> wrote:
> On Feb 29, 4:28 am, Andy <andy7... at gmail.com> wrote:
>> I'm dealing with systems of nonlinear equations that have 8 equations
>> and 8 unknowns.  Here's an example:
>>
>> Solve[{(((c - a)/0.002) - (0.995018769272803 + h*b)) == 0,
>>   (((d - b)/0.002) - (0.990074756047929 + h*c)) == 0,
>>   (((e - c)/0.002) - (0.985167483257382 + h*d)) == 0,
>>   (((f - d)/0.002) - (0.980296479563062 + h*e)) == 0,
>>   (((g - e)/0.002) - (0.975461279165159 + h*f)) == 0,
>>   (((-1*e + 8*d - 8*b + a)/(12*0.001)) - (0.990074756047929 + h*c)) ==
>> 0,
>>   (((-1*f + 8*e - 8*c + b)/(12*0.001)) - (0.985167483257382 + h*d)) ==
>> 0,
>>   (((-1*g + 8*f - 8*d + c)/(12*0.001)) - (0.980296479563062 + h*e)) ==
>> 0}, {a, b, c, d, e, f, g, h}]
>>
>> Whenever I try this, Mathematica 7 just returns the empty set {}.  How
>> can I tell if this is unsolvable?  Shouldn't I at least be able to get
>> a numerical approximation with NSolve?  I've tried using stochastic
>> optimization to get approximate answers but every method gives poor
>> results, and that's why I would like to at least approximately solve
>> this if possible.  Thanks very much for any help~
>
> To see if there is an exact solution to the problem,
> make all the coefficients exact and use Solve:
>
> x = {              500(c - a) - (995018769272803*^-15 + h*b),
>                    500(d - b) - (990074756047929*^-15 + h*c),
>                    500(e - c) - (985167483257382*^-15 + h*d),
>                    500(f - d) - (980296479563062*^-15 + h*e),
>                    500(g - e) - (975461279165159*^-15 + h*f),
> (-1*e + 8*d - 8*b + a)1000/12 - (990074756047929*^-15 + h*c),
> (-1*f + 8*e - 8*c + b)1000/12 - (985167483257382*^-15 + h*d),
> (-1*g + 8*f - 8*d + c)1000/12 - (980296479563062*^-15 + h*e)};
>
> Solve[Thread[x == 0],{a,b,c,d,e,f,g,h}]
>
> {}
>
> To get an approximate solution, minimize some measure of the
> differences between the two sides of the equations. The sum of
> the squared differences is convenient and not obviously improper;
> that is, there is nothing to suggest that the equations are on
> vastly different scales.
>
> TimeConstrained[Minimize[x.x,{a,b,c,d,e,f,g,h}],300] aborted.
>
> Both Minimize[N[x.x],{a,b,c,d,e,f,g,h}] and
> NMinimize[x.x,{a,b,c,d,e,f,g,h}] finished in < 2 sec
> and gave identical results:
>
> {3.7850320584543324`*^-11,
>  {a -> 1.78322069825487`,
>   b -> 1.7856155567256693`,
>   c -> 1.7880252569409105`,
>   d -> 1.79041402958568`,
>   e -> 1.7928176848807527`,
>   f -> 1.7952004996719013`,
>   g -> 1.7975982365756977`,
>   h -> 0.7881096531282696`}}
>
> The fit is a little better than Stephen Luttrell got,
> but the parameter estimates are far what he got.
>
> x /. %[[2]]
>
> {-2.832840262367853`*^-7,
>   1.7089251762580915`*^-6,
>   3.9068509285478115`*^-6,
>   1.6397939603951528`*^-6,
>  -2.7478474384778906`*^-7,
>  -1.6998965117753784`*^-6,
>  -3.348694662008711`*^-6,
>  -1.6487347667126784`*^-6}
>
> It looks like only the first 5 digits of the 15-digit constants
> are accurate.

Not only is there no exact solution, there is also no finite
approximate solution. To see why, note that if the last unknown, h,
is treated as a fixed constant then the system is linear in the
seven other unknowns, a,...,g. Hence for any given value of h we
can get a closed-form expression for a,...,g that minimizes x.x .
The conditionally minimized value of x.x turns out to be

              8782274623591681
 ------------------------------------------ .
 320000000000000000000000*(6312500 + 9*h^2)

The corresponding conditional values of {a,...,g} are

{(-57239352511710937500000 + h*(7888018985908781250000 +
  h*(-1578205521876264250000 + 9*(1249663134566125 -
  249999762898476*h)*h)))/(250000000000000*h^3*(6312500 + 9*h^2)),
 (-228957410046843750000000 + 3*h*(10441039511196093750000 +
  h*(-2093794831545500750000 + 3*(4962147772987500 -
  995018769272803*h)*h)))/(1000000000000000*h^3*(6312500 + 9*h^2)),
 (-228957410046843750000000 + h*(31094161123541437500000 +
  h*(-6250175850437880437500 + 9*(4925643007710500 -
  990074756047929*h)*h)))/(1000000000000000*h^3*(6312500 + 9*h^2)),
 (3*((-610553093458250000 + (82307209902652250 -
  16583652634832597*h)*h)/h^3 - 66361078251875/(6312500 + 9*h^2)))/
  50500000000000000,
 (-114478705023421875000000 + h*(15318123151723875000000 +
  h*(-3094222721505445625000 + 9*(2426551023055750 -
  490148239781531*h)*h)))/(500000000000000*h^3*(6312500 + 9*h^2)),
 (-228957410046843750000000 + 3*h*(10135762964466968750000 +
  h*(-2052641226594174625000 + 3*(4817065849789500 -
  975461279165159*h)*h)))/(1000000000000000*h^3*(6312500 + 9*h^2)),
 (-228957410046843750000000 + h*(30178331483354062500000 +
  h*(-6127630865224089437500 + 9*(4781029653467500 -
  970662347863483*h)*h)))/(1000000000000000*h^3*(6312500 + 9*h^2))}.

All those go to 0 as h -> Infinity.



  • Prev by Date: When to use FinishDynamic[] in Manipulate?
  • Next by Date: Re: Can I solve this system of nonlinear equations?
  • Previous by thread: Re: Can I solve this system of nonlinear equations?
  • Next by thread: Re: Can I solve this system of nonlinear equations?