Results 1 to 9 of 9

Thread: should be simple...but....

  1. #1

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544

    should be simple...but....

    Hi
    Can anyone help me isolate x in the following equation:

    x*cosh(L/x) = x+s

    Maple outputs complex solutions, but I now its a real solution....
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  2. #2
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: should be simple...but....

    Quote Originally Posted by CyberCarsten
    Hi
    Can anyone help me isolate x in the following equation:

    x*cosh(L/x) = x+s

    Maple outputs complex solutions, but I now its a real solution....
    You can't isolate x, you need numerical methods to solve the equation.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  3. #3

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544

    Re: should be simple...but....

    hi
    Can you tell me how to do it numerical methods?
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  4. #4
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: should be simple...but....

    Quote Originally Posted by CyberCarsten
    hi
    Can you tell me how to do it numerical methods?
    Hold on, I have to take some time to check my notes... I think I used to do this type of eqs. with a method other than Newton's. I'll be back to you a.s.a.p.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  5. #5
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: should be simple...but....

    What is the approximate range of values you're interested in? I should give actual values to L and s and then see what initial values I pick for checking the procedure I have in mind.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  6. #6
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: should be simple...but....

    You can rewrite the equation in a modified fahsion:

    Ch(L/x) = (x+s)/x

    exp(L/x) + exp(-L/x) = 2(1 + s/x)

    For convenience let y = L/x and multiply the whole equation by exp(y). Then:

    exp(2y) -2(1 + sy/L)exp(y) + 1 = 0

    Solving this 2nd degree equation where the unknown is exp(y) we arrive at these 2 solutions:

    exp(y) = z + sqrt(z*z - 1)
    and
    exp(y) = z - sqrt(z*z + 1)

    where z = 1 + sy/L

    This means that if we plot exp(y) vs. z +/- sqrt(z*z - 1) the x corresponding to their crosspoint will be the sought value (see graph). In this graph I have plotted the left and right hand sides for s = L = 1. In this case it is obvious that there is a solution for the "positive" branch.
    To determine it numerically you start by picking a value in the vicinity of the solution, say y0 = 1. Then you calculate z + sqrt(z*z - 1) (red curve) for z = 1 + sy0/L. Call this z1. Now derive y1 = (z1 - 1)L/s. Next find y2 such that y2 = exp(y1). For this y2 calculate z + sqrt(z*z - 1), and so on. You get ever closer to the solution.

    I suppose it's a bit confusing. If you like I could explain the method using a much simpler equation.
    Attached Images Attached Images  
    Last edited by krtxmrtz; Jun 13th, 2005 at 11:44 AM.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  7. #7

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544

    Re: should be simple...but....

    Thank you so much!
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  8. #8
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: should be simple...but....

    Quote Originally Posted by CyberCarsten
    Thank you so much!
    It's been a pleasure!
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  9. #9
    Junior Member
    Join Date
    Jun 2005
    Posts
    20

    Re: should be simple...but....

    superb stuff sir!!!! bravo!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width