# Thread: Solve this equattion for x

1. ## Solve this equattion for x

Solve this equattion for x - if you can :
.
cos ( A-BX ) = C e^x/D

Where A,B,C,D are constants

2. ## Re: Solve this equattion for x

Just as with your other post there is no closed-form solution for this, and the answer(s) for x depends on the values of A, B, C and D. Depending on what they are there may be 0, 1, or more solutions. For example if A=0, B=0, and C=1 then x = 0 (as long as D is not 0). But if A=0, B=0, and C= 2 then there are no solutions if D is positive, and one solution if D is negative. And if B is non-zero and D is a negative number then there are an infinite number of solutions.

By the way, I assume you meant to write this:

cos(A-BX) = Ce^(x/D)

Parentheses matter!

3. ## Re: Solve this equattion for x

Consider the constants A,B,C,D as follow :

.
A=169.93
B=21600
C=.9846
D=.52

4. ## Re: Solve this equattion for x

Originally Posted by souky101
Consider the constants A,B,C,D as follow :

.
A=169.93
B=21600
C=.9846
D=.52
Using Newton's Method I get two results for x: 5.015080 x 10^(-6) and 2.127275 x 10^(-5)

5. ## Re: Solve this equattion for x

Well - I used a different method.
Two graphs and intersection points.
.
cos(169.93 - 21600x) & .9846e^(x /.52)
.
But my first intersection point is at X= 7.8X10^(-3)
.
I do not know why we have different results.

6. ## Re: Solve this equattion for x

Actually there are many solutions to this. The solution I gave are the smallest two solutions. Because the cosine function is periodic, with period 2 pi/B, while the exponent function increases very slowly, there are solutions approximately every 2*pi/21600 = 0.0002909. See the attached plot which covers from x = 0 to x = 0.0025. It's hard to see but the orange line crosses the cosine function twice with each cycle. There are two solutions in the vicinity of 7.86x10^(-3): they are 7.865831x10^(-3) and 7.868420x10(-3). These are the 55th and 56th solutions, and they are the highest two.

7. ## Re: Solve this equattion for x

Can you give idea about the method you used ( Newton's Method ).
How is used ??

8. ## Re: Solve this equattion for x

Originally Posted by souky101
Can you give idea about the method you used ( Newton's Method ).
How is used ??
See: https://en.wikipedia.org/wiki/Newton%27s_method

You rearrange the equation into the form f(x) = 0. Then make a guess for a solution - call it x1. Calculate f(x1), which gives the amount of error in the guess. Then calculate the slope at x, in other words the derivative f'(x1). The next guess x2 is equal to x1 - f(x1)/f'(x1). Repeat the process until the error becomes acceptably small.

9. ## Re: Solve this equattion for x

Well---- That is another way - but it takes long time through guessing several times ( try and error method ), until you reach acceptable solution.
You can also guess a value and substitute it in bother sides of the equation until they are equal ... time consuming.
.
I am still looking for a method to solve the above equation to get :
x = function of ( A,B,C,D).
.
The challenge is still there.
.
Thanks for your help any way.

10. ## Re: Solve this equattion for x

Originally Posted by souky101
I am still looking for a method to solve the above equation to get :
x = function of ( A,B,C,D).

The challenge is still there.
You won't find a solution. But if you want to keep trying you might start by considering a simpler equation:

cos(x) = e^x

and see if you can solve for x. Even a seemingly "easy" equation such as cos(x) = x can't be solved except through numerical techniques like the one I described.

11. ## Re: Solve this equattion for x

I am agree with you - the reason may be because there are infinite solutions and not only one or two.

12. ## Re: Solve this equattion for x

Do you know a software which can do this "Newton's Method" ? ---- If I assign for it the first approximation value.