# Finding Solution to cos(x*L)=x

1. Oct 9, 2017

### wesimpson

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. Oct 9, 2017

### Gigaz

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.

3. Oct 9, 2017

### wesimpson

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

File size:
19.1 KB
Views:
10
4. Oct 9, 2017

### I like Serena

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.

5. Oct 9, 2017

### Ray Vickson

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.