2
$\begingroup$

I have the following equation:

Solve[1000 Sqrt[2] == (702.762 S^2)/(
0.5[1 + 930.132/S^2 + 0.5[-0.2 + 30.4981 Sqrt[1/S^2]]] + 
Sqrt[-(930.132/S^2) + 
0.5[1 + 930.132/S^2 + 0.5[-0.2 + 30.4981 Sqrt[1/S^2]]]^2]), S]

but it doesn't work. "Solve was unable to solve the system with inexact coefficients or the \ system obtained by direct rationalization of inexact numbers present \ in the system. Since many of the methods used by Solve require exact \ input, providing Solve with an exact version of the system may help" How ca

$\endgroup$
2
  • 3
    $\begingroup$ Focus on: 0.5[1 + 930.132/S^2 + 0.5[-0.2 + 30.4981 Sqrt[1/S^2]]]. [] is used specifically for function calls in Mathematica. If you're intending to multiply these values, make sure to use () instead. $\endgroup$
    – eyorble
    Feb 7, 2018 at 10:06
  • 3
    $\begingroup$ And never use an upper-case letter to start a variable name, as it may conflict with internal Mathematica names. $\endgroup$ Feb 7, 2018 at 10:14

1 Answer 1

4
$\begingroup$

Numerical solve is the method you need:

NSolve[0 == -1000 Sqrt[2] + (702.762 S^2)/(0.5 (1 + 930.132/S^2 +0.5 (-0.2 + 30.4981 Sqrt[1/S^2])) +Sqrt[-(930.132/S^2) +0.5 (1 + 930.132/S^2 + 0.5 (-0.2 +30.4981 Sqrt[1/S^2]))^2]), S]
(* {{S -> -7.12064}, {S -> 7.12064}} *)
$\endgroup$
2
  • $\begingroup$ Furthermore, I want to use the positive value of this solution as a coefficient of another equation. How can I do this? $\endgroup$
    – Gae P
    Feb 7, 2018 at 10:47
  • 1
    $\begingroup$ Just take the second part([[2]]) of the NSolve-result or give a constraint inside NSOlve NSolve[{0 == -1000 Sqrt[2] + (702.762 S^2)/(0.5 (1 + 930.132/S^2 +0.5 (-0.2 + 30.4981 Sqrt[1/S^2])) +Sqrt[-(930.132/S^2) +0.5 (1 + 930.132/S^2 + 0.5 (-0.2 +30.4981 Sqrt[1/S^2]))^2]),S>0}, S] $\endgroup$ Feb 7, 2018 at 11:15

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