Finding Solution to cos(x*L)=x

  • Thread starter Thread starter wesimpson
  • Start date Start date
AI Thread Summary
The discussion focuses on finding the intersection point of the equations y=cos(x*L) and y=x, specifically in terms of pi and L. The user initially identifies an intersection point for y=cos(x) and y=x but struggles to plot y=cos(x*L) due to L being a variable. It is noted that while the cosine wave is compressed by L, the line y=x remains unchanged, complicating the solution. The conversation reveals that there is no closed expression for the solution of cos(Lx)-x=0, and numerical methods like the Newton-Raphson algorithm or spreadsheet tools like Excel's Solver are recommended for specific values of L. Ultimately, the user is encouraged to focus on numerical solutions rather than seeking a closed-form expression.
wesimpson

Homework Statement


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

Homework 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.

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.
 
Physics news on Phys.org
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.
 
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
 

Attachments

  • Jswd2Bb.jpg
    Jswd2Bb.jpg
    15 KB · Views: 511
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.
 
wesimpson said:
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).
View attachment 212646

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.
 
Back
Top