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

Homework Help: Finding Solution to cos(x*L)=x

  1. Oct 9, 2017 #1
    1. The problem statement, all variables and given/known data
    I'm trying to find the intersection point of y=cos(x*L) and y=x. I need the solution in terms of pi and L and only need the x component of the intersection point. I think the solution will be in the form of x = some_number*pi/L


    2. Relevant equations
    I know that the L in cos(x*L) just compresses the cosine wave so that instead of the period being 2*pi it is 2*pi/L.
    I also know that y=x is simply a 45 degree line.

    3. The attempt at a solution
    First, I plotted y=cos(x) and y = x and found this intersection point to be 0.235*pi.
    Then, I tried to plot y=cos(x*L) but can't seem to find a tool to actually give me this plot because L is a variable.
    I know the actual intersection point will depend on L, but that's OK because I need the result in terms of L.
    I tried to use x = 0.235*pi/L as the solution but that fails because only the cosine wave is compressed by L, not the y=x line. For example, if L=2, the result is NOT 0.235*pi/2 = 0.1175*pi. Instead it would be 0.1639*pi.

    I think I am so close, but can't make the final step.
     
  2. jcsd
  3. Oct 9, 2017 #2
    You're not as close as you think because there is no closed expression for the solution of cos(Lx)-x=0. All you can do is numerics. Be careful about multiple solutions.
     
  4. Oct 9, 2017 #3
    That's discouraging. Here's a hand plot I did. Yes, there are multiple solutions, but there's only one that I'm interested in (shown in the sketch).
    i4sHlgU.jpg
     

    Attached Files:

  5. Oct 9, 2017 #4

    I like Serena

    User Avatar
    Homework Helper

    We can make a 3rd order estimate by writing
    $$\cos(xL)\approx 1-\frac 12 (xL)^2$$
    after which we can solve the quadratic equation.
    Similarly we can make a 5th order estimate.
    Or otherwise we can use the Newton-Raphson algorithm to find the intersection for specific values of L.
     
  6. Oct 9, 2017 #5

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    If you have EXCEL (or even other, open-source spreadsheets) you can use the Solver tool to get a numerical solution when a numerical value of L is known.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted