Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8824 > unrolled thread

Re: Can I solve this system of nonlinear equations?

Started byDana DeLouis <dana01@me.com>
First post2012-03-02 12:49 +0000
Last post2012-03-02 12:49 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Can I solve this system of nonlinear equations? Dana DeLouis <dana01@me.com> - 2012-03-02 12:49 +0000

#8824 — Re: Can I solve this system of nonlinear equations?

FromDana DeLouis <dana01@me.com>
Date2012-03-02 12:49 +0000
SubjectRe: Can I solve this system of nonlinear equations?
Message-ID<jiqfkk$38$1@smc.vnet.net>
> Solve[{(((c - a)/0.002) - (0.995018769272803 + h*b)) == 0,
>   (((d - b)/0.002) - (0.990074756047929 + h*c)) == 0, ...etc

>  just returns the empty set {}. 
>  How can I tell if this is unsolvable? 
>  ...every method gives poor results ...
> I would like to at least approximately solve this if possible.  

Hi.  Just an observation.  All RHS values are zero, so basically all the LHS equations are equal to each other.
The variable h is common to them all, so each equation 'could be solved for h, and each one set equal to each other.

I don't have a solution, but one technique is to substitute a variable for your common zero on the RHS.
I'll use z for zero (1-8)

Your equation...
equ={(((c-a)/0.002)-(0.995018769272803+h*b))==0,(((d-b)/0.002) .....

Set RHS to a variable (to represent 0)

m = Thread[equ[[All,1]]=={z1,z2,z3,z4,z5,z6,z7,z8}];

-0.995019+500. (-a+c)-b h==z1
-0.990075+500. (-b+d)-c h==z2
-0.985167+500. (-c+e)-d h==z3
-0.980296+500. (-d+f)-e h==z4
-0.975461+500. (-e+g)-f h==z5
-0.990075+83.3333 (a-8 b+8 d-e)-c h==z6
-0.985167+83.3333 (b-8 c+8 e-f)-d h==z7
-0.980296+83.3333 (c-8 d+8 f-g)-e h==z8


ans = Simplify[Solve[m, {a,b,c,d,e,f,g,h}]];

Solve::ratnz: Solve was unable to solve the system with inexact coefficients.
The answer was obtained by solving a corresponding exact system and numericizing the result. >>

The anser is a real mess.  There are even large numbers such as 10^108.

The shortest answer is for h, so here it is...

h/.ans
{(0.0000780948 +83.3333 z1-666.667 z2+666.667 z4-83.3333 z5+500. z6-500. z8)/(z3-1. z7)}

Notice that if z3 and z7 are back to being 0, then you get a divide by zero error.
I think this is the easiest way to show there is no solution.

Out of curiosity, here it is at full precision...


mm = Simplify[Rationalize[m,0]];

ans = Simplify[Solve[mm, {a,b,c,d,e,f,g,h}]];

h/.ans

{2321109176622379997592951205/(29721676851288267940055959767198 (z3-z7))+(250 z1)  /  (3 (z3-z7))-(2000 z2)/(3 (z3-z7))+(2000 z4)/(3 (z3-z7))-(250 z5)/(3 (z3-z7))+(500 z6)/(z3-z7)-(500 z8)/(z3-z7)}

Looking at h again, as it's the shortest.
Values of 0 give divide by zero error.

Hense, I believe this problem has no solution.

= = = = = = = = = = = = = = =
HTH  :>)
Dana DeLouis
Mac & Math 8.0
= = = = = = = = = = = = = = =



On Feb 29, 7:28 am, Andy <andy7...@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~



[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web