Re: Can I solve this system of nonlinear equations?
- To: mathgroup at smc.vnet.net
- Subject: [mg125287] Re: Can I solve this system of nonlinear equations?
- From: Dana DeLouis <dana01 at me.com>
- Date: Sun, 4 Mar 2012 04:36:15 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
> I'm dealing with systems of nonlinear equations that have 8 equations > and 8 unknowns. Here's an example: > ... How can I tell if this is unsolvable? Hi. Variable h is common to each equation, and appears with each other variable just once. I believe this is almost similar to having 7 variables with 8 equations. Rationalize your equation, and multiply by 3 those lines that have a denominator of 3. Move the constant to the Right Hand side. (out of the way for now) What you have is: -500 a+500 c-b h -500 b+500 d-c h -500 c+500 e-d h -500 d+500 f-e h -500 e+500 g-f h 250 a-2000 b+2000 d-250 e-3 c h 250 b-2000 c+2000 e-250 f-3 d h 250 c-2000 d+2000 f-250 g-3 e h Look at the coefficient list var={a,b,c,d,e,f,g,h}; m = Table[Coefficient[lhs,var[[j]]],{j,8}] //Transpose ; {-500,-h,500,0,0,0,0,-b} {0,-500,-h,500,0,0,0,-c} {0,0,-500,-h,500,0,0,-d} {0,0,0,-500,-h,500,0,-e} {0,0,0,0,-500,-h,500,-f} {250,-2000,-3 h,2000,-250,0,0,-3 c} {0,250,-2000,-3 h,2000,-250,0,-3 d} {0,0,250,-2000,-3 h,2000,-250,-3 e} On the first line, h is in b column, and b is in h column. This won't work, as you would have doubles. {-500,-h,500,0,0,0,0,-b}.{a,b,c,d,e,f,g,h} -500 a+500 c-2 b h Dropping the h column to 0 works. {-500,-h,500,0,0,0,0,0}.var -500 a+500 c-b h The second line would also require dropping the -c in the h column to 0. {0,-500,-h,500,0,0,0,0}.var -500 b+500 d-c h You would have to make the last column of the matrix all zero's for this matrix. Hence, a zero column has no solution. Just another technique to get a close guess... Solve the first equation for h h -> (-85218681 - 42822650000 a + 42822650000 c)/(85645300 b) Substitute this h for the remaining 7 equations. Now, you have 7 equations, with 7 unknowns. Using NMinimize gets you close to what others have mentioned. = = = = = = = = = = HTH :>) Dana DeLouis Mac & Math 8 = = = = = = = = = = On Feb 29, 7: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~