2
$\begingroup$

I want to solve the following equation

2 x == Sinh[x]

Mathematica is unable to do so

In[1]:= Solve[2 x == Sinh[x], x]
During evaluation of In[20]:= Solve::nsmet: This system cannot be solved with the methods available to Solve. >>
Out[1]= Solve[2 x == Sinh[x], x]

However, Wolfram|Alpha can successfully solve the equation

Wolfram|Alpha query

How can I achieve the same in Mathematica?

$\endgroup$
  • 3
    $\begingroup$ Try Solve[2 x == Sinh[x], x, Reals]. This is a common question - here's a similar example. $\endgroup$ – Mark McClure Jul 21 '14 at 23:46
  • 1
    $\begingroup$ You didn't ask Mathematica for a numerical solution, you asked for a symbolic one. $\endgroup$ – m_goldberg Jul 21 '14 at 23:53
  • $\begingroup$ If I ask Mathematica for a numerical solution, using NSolve, it gives me the same error, though. $\endgroup$ – Gregger Jul 21 '14 at 23:55
  • 2
    $\begingroup$ @Sven86, Use NSolve[2 x == Sinh[x], x, Reals]. NSolve has a default domain of Complexes just like Solve. $\endgroup$ – Chip Hurst Jul 22 '14 at 0:43
4
$\begingroup$
Plot[2 x - Sinh[x], {x, -Pi, Pi}]

enter image description here

FindRoot[2 x == Sinh[x], {x, #}] & /@ {-2, 0, 2}

{{x -> -2.17732}, {x -> 0.}, {x -> 2.17732}}
$\endgroup$
  • 1
    $\begingroup$ @Sven86 This syntax also works, though I believe it is undocumented: FindRoot[2 x == Sinh[x], {x, {-2, 0, 2}}]. Note that the output form is different: {x -> {-2.17732, 0., 2.17732}}. $\endgroup$ – Mr.Wizard Jul 22 '14 at 17:33

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.