Solving equation with mathematica

  • Mathematica
  • Thread starter yashar
  • Start date
  • Tags
    maple
  • #1
31
0
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:

Answers and Replies

  • #2
29,956
6,353
NSolve is only for polynomial equations. Use FindRoot instead.
 
  • #3
31
0
it gives me x=25.16 which is incorrect!
 
  • #4
SteamKing
Staff Emeritus
Science Advisor
Homework Helper
12,796
1,668
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
 
  • #5
29,956
6,353
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!
 
  • #6
29,956
6,353
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.
 

Related Threads on Solving equation with mathematica

Replies
6
Views
3K
Replies
4
Views
6K
  • Last Post
Replies
5
Views
6K
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
7
Views
2K
  • Last Post
Replies
11
Views
4K
Replies
4
Views
3K
  • Last Post
Replies
1
Views
3K
Top