# Why Wolfram|Alpha can solve an equation but not Mathematica? [duplicate]

This question already has an answer here:

I want to numerically solve $$\cosh\left(\frac{1}{x}\right)-\frac{1}{x^2}\sinh\left(\frac{1}{x}\right)=0.$$

A strange thing is that Wolfram|Alpha it solves it perfectly, but Mathematica I have this: How can this be possible?

## marked as duplicate by Artes, m_goldberg, Daniel Lichtblau, MarcoB, LCarvalhoDec 18 '17 at 22:41

• what is the output from Wolfram? – Sumit Dec 17 '17 at 11:32
• Please post the input you gave to Wolfram alpha language also. The Wolfram alpha is different from the Wolfram Mathematica language. You could have typed something which Wolfram alpha understood to be something different from Wolfram mathematica, since Wolfram alpha is AI based and uses natural language input which is not the case with the Wolfram Mathematica language. – Nasser Dec 17 '17 at 11:40
• Use FindRoot[Cosh[1/x] - 1/x^2 Sinh[1/x], {x, 1}] – Raffaele Dec 17 '17 at 15:01
• @Nasser - this is the OP's input: wolframalpha.com/input/… – Jason B. Dec 17 '17 at 16:57
• NSolve requires some domain restrictions so that there will be finitely many solutions. In:= NSolve[ Cosh[1/x] - Sinh[1/x]/x^2 == 0 && 0 < x < 100, x, Reals] Out= {{x -> 0.897517}} – Daniel Lichtblau Dec 17 '17 at 17:17

Usually NSolve is preferable for polynomical functions. You can solve your problems in this way:

FindRoot[Cosh[1/x] - Sinh[1/x]/x^2, {x, .1}] (* with startvalue *)
(* {x -> 0.897517} *)


or

NMinimize[{1, Cosh[1/x] - Sinh[1/x]/x^2 == 0}, x] (* without startvalue *)
(* {1., {x -> 0.897517}} *)

• I did not know the f[x]==0 constraint + nminimize trick... is it yours? – Picaud Vincent Dec 17 '17 at 12:18
• @Picaud Vincent: Unfortunately not ( ;-) ). I found it by chance someware in the advanced NMinimze documentation... – Ulrich Neumann Dec 17 '17 at 12:26
• @PicaudVincent Related to this trick: mathematica.stackexchange.com/questions/159589/…. – anderstood Dec 17 '17 at 13:10
• @anderstood thanks – Picaud Vincent Dec 17 '17 at 13:12
• The NMinimize-trick can be found in the help NMinimize\NeatEaxamples! – Ulrich Neumann Dec 17 '17 at 15:44