1
$\begingroup$

I am trying to solve a system of three non-linear equations for three unknowns (e1, e2, phi). I am using FindMinimum to solve the system (I am minimizing the norm of residuals of the system). The system gives me an answer which kind of makes sense given the context. But also gives me an error message:

FindMinimum: Line search unable to find a sufficient decrease in the function value with MachinePrecision digit precision.

Here is a simplified version of the code that I am running:

a1p0 = (-29.2 e2 - 
  1.4427 ProductLog[-277.259 2.^(e1 - 29.2 e2) e2])/e2;

a1p1 = -9.7 + 
  400. 2.^(e1 - 29.2 e2 - 
    1.4427 ProductLog[-277.259 2.^(e1 - 29.2 e2) e2]);

a2 = (-18.8 e2 - 1.4427 ProductLog[-554.518 2.^(e1 - 18.8 e2) e2])/e2;


t0 = SetPrecision[0, 100];
t1 = 0.5;
b1p0 = 2.92;
b1p1 = 1.95;
b2 = 1.88;
zstar1 = 400;
zstar2 = 800;
delta = 10;

 FindMinimum[{Norm[
    Evaluate[{(1 - t1) (((1 - t0)/(1 - t1))^(e1 + a1p0 e2) zstar1 - 
          delta b1p0 - zstar1) - (1 - t0)/(
        1 + 1/(e1 + 
          a1p0 e2)) (((1 - t0)/(1 - t1))^(e1 + a1p0 e2) zstar1 - 
          delta b1p0 - (((1 - t0)/(1 - t1))^(e1 + a1p0 e2) zstar1 - 
             delta b1p0)^(-1/(e1 + a1p0 e2)) zstar1^(
           1 + 1/(e1 + a1p0 e2))) + phi,  (1 - t0) (zstar1 - 
          1/(1 + 1/(
            e1 + e2 a1p1)) ((((1 - t0)/(
                 1 - t1))^(e1 + a1p0 e2) zstar1 - delta b1p0 + 
               delta b1p1)^(-1/(e1 + e2 a1p1)) zstar1^(
             1 + 1/(e1 + e2 a1p1))) - (((1 - t0)/(
             1 - t1))^(e1 + a1p0 e2) zstar1 - delta b1p0 + 
           delta b1p1)/(1 + e1 + e2 a1p1)) + phi, (1 - 
          t1) ((((1 - t0)/(1 - t1))^(e1 + a2 e2) zstar2 - delta b2)/(
           1 + e1 + e2  a2) ((1 - t1)/(1 - t0))^(e1 + e2 a2) - 
          zstar2) + (1 - t0)/(
        1 + 1/(e1 + 
          a2 e2)) ((((1 - t0)/(1 - t1))^(e1 + a2 e2) zstar2 - 
            delta b2)^(-1/(e1 + a2 e2)) zstar2^(
          1 + 1/(e1 + a2 e2))) + phi}]]}, {e1, 1}, {e2, 
   0}, {phi, 10}, MaxIterations -> 1000]

Mathematica then outputs:

    FindMinimum: Line search unable to find a sufficient decrease in the function value with MachinePrecision digit precision.

along with the solution. What does that really mean?

$\endgroup$
2
$\begingroup$

This means that it is necessary to lower WorkingPrecision to 10, and all data to enter with no less accuracy. I'll give an example of the code, but I'm not sure that in this case there is an unambiguous answer.

p = 10;
a1p0 = SetPrecision[(-292/10 e2 - (14427/10^4) N[
        ProductLog[-(277259/1000) 2^(e1 - (292/10) e2) e2], p])/e2, p];

a1p1 = SetPrecision[-97/10 + 
    400 2^(e1 - (292/10) e2 - 
        1.4427 N[ProductLog[-(277259/1000) 2^(e1 - (292/10) e2) e2], 
          p]), p];

a2 = SetPrecision[(-188/10 e2 - (14427/10^4) N[
        ProductLog[-(554518/1000) 2^(e1 - (188/10) e2) e2], p])/e2, p];


t0 = SetPrecision[0, p];
t1 = 1/2;
b1p0 = 292/100;
b1p1 = 195/100;
b2 = 188/100;
zstar1 = 400;
zstar2 = 800;
delta = 10;

FindMinimum[
 Norm[Evaluate[{(1 - t1) (((1 - t0)/(1 - t1))^(e1 + a1p0 e2) zstar1 - 
        delta b1p0 - 
        zstar1) - (1 - t0)/(1 + 
         1/(e1 + a1p0 e2)) (((1 - t0)/(1 - t1))^(e1 + 
            a1p0 e2) zstar1 - 
        delta b1p0 - (((1 - t0)/(1 - t1))^(e1 + a1p0 e2) zstar1 - 
            delta b1p0)^(-1/(e1 + a1p0 e2)) zstar1^(1 + 
            1/(e1 + a1p0 e2))) + 
     phi, (1 - t0) (zstar1 - 
        1/(1 + 1/(e1 + 
               e2 a1p1)) ((((1 - t0)/(1 - t1))^(e1 + a1p0 e2) zstar1 -
               delta b1p0 + 
              delta b1p1)^(-1/(e1 + e2 a1p1)) zstar1^(1 + 
              1/(e1 + e2 a1p1))) - (((1 - t0)/(1 - t1))^(e1 + 
               a1p0 e2) zstar1 - delta b1p0 + delta b1p1)/(1 + e1 + 
           e2 a1p1)) + 
     phi, (1 - 
        t1) ((((1 - t0)/(1 - t1))^(e1 + a2 e2) zstar2 - delta b2)/(1 +
             e1 + e2 a2) ((1 - t1)/(1 - t0))^(e1 + e2 a2) - 
        zstar2) + (1 - t0)/(1 + 
         1/(e1 + a2 e2)) ((((1 - t0)/(1 - t1))^(e1 + a2 e2) zstar2 - 
           delta b2)^(-1/(e1 + a2 e2)) zstar2^(1 + 1/(e1 + a2 e2))) + 
     phi}]], {e1, 1}, {e2, 0}, {phi, 10}, WorkingPrecision -> p]
{8.185352772, {e1 -> 82555.79812, e2 -> -2302.430797, 
  phi -> 5.888522753}}
$\endgroup$

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.