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.

  • $\begingroup$ 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. $\endgroup$ – André Nicolas Oct 17 '12 at 20:24
  • $\begingroup$ Ok, where does that lead me? $\frac{d^3 y}{dx^3}=\frac{d y}{dx}(Asin(y)+Bcos(y))$ $\endgroup$ – gamma4 Oct 17 '12 at 20:30
  • $\begingroup$ Will this be a good way to approach this? $d^2 y=(Asin(y)+Bsin(y))dx^2 $ don't think so.. $\endgroup$ – gamma4 Oct 17 '12 at 20:36
  • $\begingroup$ 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$. $\endgroup$ – André Nicolas Oct 17 '12 at 21:37

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$$

  • $\begingroup$ 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? $\endgroup$ – gamma4 Oct 17 '12 at 21:01
  • $\begingroup$ @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). $\endgroup$ – mrs Oct 17 '12 at 21:19
  • $\begingroup$ @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... $\endgroup$ – gamma4 Oct 17 '12 at 21:40
  • $\begingroup$ 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. $\endgroup$ – Robert Israel Oct 17 '12 at 23:47
  • $\begingroup$ You might also look up "pendulum equation" $\endgroup$ – Robert Israel Oct 17 '12 at 23:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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