# Solving equation with mathematica

• Mathematica
hi
i want to solve this equation
a/x=Cosh[b/x]

i set a=1 and b=5
and use NSolve code but mathematica say it can not solve it. but with maple i get real and imaginary parts.
1-is there another method to solve this equation numerically?
2-can this equation be solve for arbitrary a and b?

thanks

Last edited:

Related MATLAB, Maple, Mathematica, LaTeX News on Phys.org
Dale
Mentor
NSolve is only for polynomial equations. Use FindRoot instead.

it gives me x=25.16 which is incorrect!

SteamKing
Staff Emeritus
Homework Helper
If you rewrite the expression so that COSH(5/x) - 1/x = 0 = f(x) and plot, you will see that f(x) is asymptotic with the x axis. Therefore, there is no x value for which f(x) = 0

Dale
Mentor
Plotting it it seems that it does not have any real roots. So I think Maple is wrong, there are no real roots.

PS. SteamKing got it faster!

Dale
Mentor
I just found a new function: FindInstance. You can use it to find complex roots. Also, apparently you can specify a complex number for your initial value in FindRoot and it will search for a complex root, which I didn't know before.