Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solving equation with mathematica

Tags:
  1. Jul 29, 2011 #1
    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: Jul 29, 2011
  2. jcsd
  3. Jul 29, 2011 #2

    Dale

    Staff: Mentor

    NSolve is only for polynomial equations. Use FindRoot instead.
     
  4. Jul 30, 2011 #3
    it gives me x=25.16 which is incorrect!
     
  5. Jul 30, 2011 #4

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    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
     
  6. Jul 30, 2011 #5

    Dale

    Staff: 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!
     
  7. Jul 30, 2011 #6

    Dale

    Staff: 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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Solving equation with mathematica
Loading...