2.2 problem Problem 2

Internal problem ID [12165]

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 )} \]

Solution by Maple

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

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

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

Solution by Mathematica

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

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

\[ x(t)\to \frac {1}{3} \cos (2 t)+\left (-\frac {t}{2}+c_1\right ) \cos (t)+c_2 \sin (t) \]