Re: Can I solve this system of nonlinear equations?

• To: mathgroup at smc.vnet.net
• Subject: [mg125274] Re: Can I solve this system of nonlinear equations?
• From: Ray Koopman <koopman at sfu.ca>
• Date: Sat, 3 Mar 2012 06:56:03 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <jil5ld\$rrm\$1@smc.vnet.net>

```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)};

{}

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.

```

• Prev by Date: Re: Can you call 32 Bit DLLs from Mathematica
• 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?