2.2 problem Problem 2

Internal problem ID [10817]

Book: Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section: Chapter 2, DIFFERENTIAL EQUATIONS OF THE SECOND ORDER AND HIGHER. Problems page 172
Problem number: Problem 2.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {x^{\prime \prime }+x-\sin \left (t \right )+\cos \left (2 t \right )=0} \]

Solution by Maple

Time used: 0.0 (sec). Leaf size: 28

dsolve(diff(x(t),t$2)+x(t)=sin(t)-cos(2*t),x(t), singsol=all)
 

\[ x \left (t \right ) = c_{2} \sin \left (t \right )+c_{1} \cos \left (t \right )+\frac {\cos \left (2 t \right )}{3}+\frac {\sin \left (t \right )}{4}-\frac {t \cos \left (t \right )}{2} \]

Solution by Mathematica

Time used: 0.021 (sec). Leaf size: 30

DSolve[x''[t]+x[t]==Sin[t]-Cos[2*t],x[t],t,IncludeSingularSolutions -> True]
 

\begin{align*} x(t)\to \frac {1}{3} \cos (2 t)+\left (-\frac {t}{2}+c_1\right ) \cos (t)+c_2 \sin (t) \\ \end{align*}