Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I need to solve a differential equation on the following form

$$\frac{d^2 f(x)}{dx^2}=A\sin(f(x))+B\cos(f(x))$$

Where $A$ and $B$ are constants. I am not sure how to approach this, which method to use etc. And I am not even sure if it is possible to solve analytically.

share|improve this question
    
Let $y=f(x)$. Multiply both sides by $\dfrac{dy}{dx}$. This is a general trick. With these particular functions one can undoubtedly do better. –  André Nicolas Oct 17 '12 at 20:24
    
Ok, where does that lead me? $\frac{d^3 y}{dx^3}=\frac{d y}{dx}(Asin(y)+Bcos(y))$ –  gamma4 Oct 17 '12 at 20:30
    
Will this be a good way to approach this? $d^2 y=(Asin(y)+Bsin(y))dx^2 $ don't think so.. –  gamma4 Oct 17 '12 at 20:36
    
Robert Israel has given some of details. When you multiply both sides by $\frac{dy}{dx}$, the left side is the derivative of $(1/2)\left(\frac{dy}{dx}\right)^2$, the right is the derivative of $-A\cos y+B\sin y$. So we get $(1/2)\left(\frac{dy}{dx}\right)^2=-A\cos y+B\sin y +C$. –  André Nicolas Oct 17 '12 at 21:37

1 Answer 1

up vote 2 down vote accepted

With $y = f(x)$ and $v = df/dx$, this autonomous second-order DE becomes $$ \dfrac{dv}{dy} = \frac{A \sin(y) + B \cos(y)}{v}$$ and that is separable, so $$ \frac{v^2}{2} = \int (A \sin(y) + B \cos(y)) \ dy = - A \cos(y) + B \sin(y) + C$$

share|improve this answer
    
Yes, I did something similar and came this far $ \int (2(Bsin(y)-Acos(y)+C_1)^{-1/2} \ dy=x+C_2$ Is this correct? –  gamma4 Oct 17 '12 at 21:01
    
@gamma4: What Robert did was: $y=f(x)$ and $y'=v$ so when the variable is not included in your second order equation, you can use the chain rule to set your equation to $y$ and $y'$. So you have $\frac{d^2y}{dx^2}=\frac{dy'}{dx}=\frac{dy'}{dy}.\frac{dy}{dx}$. This means that $y''=vv'$. Now continue from the first fraction he made above (+1). –  Babak S. Oct 17 '12 at 21:19
    
@Babak Sorouh: Thanks for the clarification. I just did it, and I ended up with the same integral as in my last comment. Guess I 'just' have do that integral then... –  gamma4 Oct 17 '12 at 21:40
    
Yes. You might also note that $B \sin(y) - A \cos(y) = K \sin(y-y_0)$ for appropriate constants $K$ and $y_0$. The antiderivative is not elementary: it is related to an incomplete elliptic integral. –  Robert Israel Oct 17 '12 at 23:47
    
You might also look up "pendulum equation" –  Robert Israel Oct 17 '12 at 23:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.