3
$\begingroup$

I am having a problem to solve a nonlinear overdetermined system of equations. According to one of the previous posts, I tried NMinimize, but it didn’t work. Shall I use any other method? I will appreciate if somebody can give me some helps. This is what I did:

eqn1=c[2]+a[2] Cosh[(20048005 d)/80227844]==9;
eqn11=5000 c[3]==21;
eqn2=1/400 (127-10 d)2 a[3]+(127/20-d/2) b[3]+c[3]==1330711849393/15087435934161;
eqn3=10627269662 b[3]==2478589 a[2] Sinh[(20048005 d)/80227844];
eqn4=6400000 a[3]==373 a[2] Cosh[(20048005 d)/80227844];
eqn5=(127/10-d) a[3]+b[3]==2321294/1027365129;
eqn6=4009601 (95161+1270 d (-9+c[2]))+20377872376 a[2] Sinh[(20048005 d)/80227844]==0;

I considered one of the equations as a constrain, also I know that $0<=d<=12.7$ and all unknown are Reals.

NMinimize[{eqn1,eqn11,eqn2,eqn3,eqn4,eqn5&&eqn6&&0<= d<= 12.7&&{a[2],c[2],a[3],b[3],c[3],d}∈Reals},{a[2],c[2],a[3],b[3],c[3],d}]
NMinimize::nnum: The function value False is not a number at {d,a[2],a[3],b[3],c[2],c[3]} = {11.7176,0.212654,0.277116,0.987641,-0.332112,0.0042}. >>
NMinimize::nnum: The function value False is not a number at {d,a[2],a[3],b[3],c[2],c[3]} = {11.7176,0.212654,0.277116,0.987641,-0.332112,0.0042}. >>
NMinimize::nnum: The function value False is not a number at {d,a[2],a[3],b[3],c[2],c[3]} = {11.7176,0.212654,0.277116,0.987641,-0.332112,0.0042}. >>
$\endgroup$
3
$\begingroup$

NMinimize requires a function rather than a list of equations.

Let's take your equations and try three things.

  1. Use eqn11 to solve for c3. Replace c3 with 21/5000 in the other equations.

  2. Replace the equality in the remaining equations with a subtraction.

    eqn1 = c2 + a2 Cosh[(20048005 d)/80227844] - 9;
    
    eqn2 = 1/400 (127 - 10 d) 2 a3 + (127/20 - d/2) b3 + 21/5000 - 1330711849393/15087435934161;
    
    eqn3 = 10627269662 b3 - 2478589 a2 Sinh[(20048005 d)/80227844];
    
    eqn4 = 6400000 a3 - 373 a2 Cosh[(20048005 d)/80227844];
    
    eqn5 = (127/10 - d) a3 + b3 - 2321294/1027365129;
    
    eqn6 = 4009601 (95161 + 1270 d (-9 + c2)) + 20377872376 a2 Sinh[(20048005 d)/80227844] - 0;
    
  3. Reformulate the NMinimize into a function which is the sum of the square of the difference between the left hand and right hand side of your equations.

    NMinimize[{
       eqn1^2 + eqn2^2 + eqn3^2 + eqn4^2 + eqn5^2 + eqn6^2,
       0 <= d <= 12.7 && {a2, c2, a3, b3, d} ∈ Reals
      },
      {a2, c2, a3, b3, d}]
    
    (* {31.4845, {a2 -> 0.844706, c2 -> -0.921421, a3 -> 0.000251246, b3 -> 0.000985941, d -> 9.25743}} *)
    

In the formulation I took the liberty of replacing a[2] with a2, c[2] with c2, etc., which I found easier to follow.

$\endgroup$
2
  • $\begingroup$ Thanks for your professional answer. But eqn1, eqn2 and eqn3 didn't satisfy?? Would you please give me some tips or comments about solving a nonlinear overdetermined system of equations. For example, What other methods do you recommend for solution such as FindFit[], NonlinearRegress[], etc. $\endgroup$
    – user37495
    Feb 6 '16 at 7:12
  • $\begingroup$ With an overdetermined set of equations one should not expect all equations to evaluate to zero. They are minimized in a least square sense. If you go to the help page for NMinimize and look at the top center, there is a pull down menu for Tutorials. There are four great tutorials there explaining the Mathematica optimizations that are available. $\endgroup$ Feb 6 '16 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.