0
$\begingroup$

Please help me to solve the following nonlinear equation, such that I used ''FindRoot" but no result

the equation is -10.499999997354678` (-0.006630671819814823+ x^3 +x^2(1.1599999999940591- 0.7999999999851477 Sqrt[1 + x]))-(-0.7(-0.1233952365163843+x) + 3.4999999989155866` (-0.13078703184428012` + x Sqrt[1 + x])) == 0

$\endgroup$

2 Answers 2

2
$\begingroup$

You could try NSolve instead. In Version 12.2 it gives

ClearAll[x];
eq = -10.499999997354678 (-0.006630671819814823 + x^3 + 
       x^2 (1.1599999999940591 - 
          0.7999999999851477 Sqrt[
            1 + x])) - (-0.7 (-0.1233952365163843 + x) + 
      3.4999999989155866 (-0.13078703184428012` + x Sqrt[1 + x])) == 0;
NSolve[eq, x]

This solution

{{x -> -0.962771}, {x -> -0.510822 - 0.680662 I}, {x -> -0.510822 + 
    0.680662 I}, {x -> 0.123395}}

If you want in Reals, you could do

NSolve[eq, x, Reals]

which gives

{{x -> -0.962771}, {x -> 0.123395}}
$\endgroup$
1
$\begingroup$
$Version

(* "12.2.0 for Mac OS X x86 (64-bit) (December 12, 2020)" *)

Clear["Global`*"]

f[x_] = -10.499999997354678 (-0.006630671819814823 + x^3 + 
      x^2 (1.1599999999940591 - 
         0.7999999999851477 Sqrt[
           1 + x])) - (-0.7 (-0.1233952365163843 + x) + 
     3.4999999989155866 (-0.13078703184428012` + x Sqrt[1 + x]));

FunctionDomain[f[x], x]

(* x >= -1 *)

Plot[f[x], {x, -1, 1}]

enter image description here

NSolve[{f[x] == 0, -1 < x < 1}, x]

(* {{x -> -0.962771}, {x -> 0.123395}} *)

Solve[{f[x] == 0, -1 < x < 1}, x] // Quiet

(* {{x -> -0.962771}, {x -> 0.123395}} *)

FindRoot[f[x] == 0, {x, #}] & /@ {-1, .5}

(* {{x -> -0.962771}, {x -> 0.123395}} *)
$\endgroup$
1
  • $\begingroup$ Thank you so much dears. Thanks for all your Help $\endgroup$
    – Sara yaqob
    Jan 24, 2021 at 6:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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