Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.8K Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

6 non-linear equation system

Posted 10 years ago

I need to solve a non linear algebraic equation system of 6 equations. I used the NSolve Mathematica function but at the end of the running the program don't print the solution in the workspace of the program. This is my equation system:

NSolve [{((2*a - 2*b + 6 b*c + 2*d)^2 (1 - k)^2*3.5^2*(2*a + 2*b + 2*b*c)^2/(f^2*(1 - a - 2*b*c - d)^2*(2 - a - 2*b)^2)) == 1.13*10^-3, 
((2*b*(1 - c)*(2*a + 2*b + 2*b*c))/((2 - a - 2*b)*(2*a - 2*b + 3*2*b*c + 2*d)*(1 - k))) ==  0.236,
(((2*a - 2*b + 3*2*b*c + 2*d)*(1 - k))^3*(2*a + 2*b + 2*b*c))/(f^2*(1 - a - 2*b*c - d)*(2*b*(1 - c))) ==  2.15*10^-3, 
((2*a - 2*b + 6*b*c + 2*d)^2*3.5*(1 - k)^2)/(f*(1 - a - 2*b*c - d)) ==  0.154, 
(2*a - 2*b + 6*b*c + 2*d)*(1 - k)/f == 0.01/3.5, 
1 + 2 + 4*b*c - 2*a*k + 2*b*k + 6*b*c*k - 2*d*k + 2*a - f == 0}, {a, b, c, d, k, f}, Reals]

Thank you very much everybody for your attention and help.

POSTED BY: Leonardo Melone
5 Replies

Here's two solutions:

In[3]:= NSolve[{((2*a - 2*b + 6 b*c + 2*d)^2 (1 - 
        k)^2*3.5^2*(2*a + 2*b + 
         2*b*c)^2/(f^2*(1 - a - 2*b*c - d)^2*(2 - a - 2*b)^2)) == 
   1.13*10^-3, ((2*
       b*(1 - c)*(2*a + 2*b + 2*b*c))/((2 - a - 2*b)*(2*a - 2*b + 
         3*2*b*c + 2*d)*(1 - k))) == 
   0.236, (((2*a - 2*b + 3*2*b*c + 2*d)*(1 - k))^3*(2*a + 2*b + 
        2*b*c))/(f^2*(1 - a - 2*b*c - d)*(2*b*(1 - c))) == 
   2.15*10^-3, ((2*a - 2*b + 6*b*c + 2*d)^2*3.5*(1 - k)^2)/(f*(1 - 
        a - 2*b*c - d)) == 
   0.154, (2*a - 2*b + 6*b*c + 2*d)*(1 - k)/f == 0.01/3.5, 
  1 + 2 + 4*b*c - 2*a*k + 2*b*k + 6*b*c*k - 2*d*k + 2*a - f == 0}, {a,
   b, c, d, k, f}, Reals, Method -> {"UseSlicingHyperplanes" -> False}]

Out[3]= {{a -> 120.931, b -> -55.5727, c -> 1.00973, d -> -6.99815, 
  k -> 5.66587, f -> -3807.97}, {a -> 170.639, b -> -90.2124, 
  c -> 0.994008, d -> 9.23793, k -> -2.34647, f -> 2515.58}}
POSTED BY: Frank Kampas
Posted 10 years ago

This doesn't provide you an exact solution, but it is rapid and you might be able to carefully modify this to do even better.

NMinimize[
Norm[((2*a-2*b+6 b*c+2*d)^2(1-k)^2*3.5^2*(2*a+2*b+2*b*c)^2/(f^2*(1-a-2*b*c-d)^2*(2-a-2*b)^2))-1.13*10^-3]+
Norm[((2*b*(1 - c)*(2*a + 2*b + 2*b*c))/((2 - a - 2*b)*(2*a - 2*b + 3*2*b*c + 2*d)*(1 - k))) - 0.236]+
Norm[(((2*a-2*b+3*2*b*c+2*d)*(1-k))^3*(2*a+2*b+2*b*c))/(f^2*(1-a-2*b*c-d)*(2*b*(1-c))) - 2.15*10^-3]+
Norm[((2*a - 2*b + 6*b*c + 2*d)^2*3.5*(1 - k)^2)/(f*(1 - a - 2*b*c -d)) - 0.154]+
Norm[(2*a - 2*b + 6*b*c + 2*d)*(1 - k)/f - 0.01/3.5]+
Norm[1+2+4*b*c-2*a*k+2*b*k+6*b*c*k-2*d*k+2*a-f], {a,b,c,d,k,f}, MaxIterations->10^3, Method->"RandomSearch"]

which gives you

{0.0978409, {a -> -0.262655, b -> 0.341706, c -> -0.0542768, d -> 0.779509, k -> 0.0212756, f -> 2.39069}}
POSTED BY: Bill Simpson

Thank you both.

POSTED BY: Leonardo Melone

First thing to do is look at the FullForm of the input system. You will no doubt discover that you have more variables than equations. This might or might not be as expected; if not, pay close attention to how you are formulating the equations (e.g. ask yourself, "What exactly is the Mathematica interpretation of bc in my equation?")

Also it is important that you pose an actual question, and give a careful description of what has happened. Stating that no solution is printed could mean any of the following. (i) The Mathematica kernel is hanging. (ii) An empty solution set was given. (iii) The Mathematica kernel crashed.

It is also a good idea to have some sense of what might be feasible. There are some large exponents in that system and if might be simply outside the realm of possibility to get all possible solutions. In which case FindRoot might be a better choice than NSolve.

POSTED BY: Daniel Lichtblau

You need to put spaces between variables that are multiplied, so don't write bc, write b c or b*c, etc.

POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard