66.2.23 problem Problem 32

Internal problem ID [13922]
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 32
Date solved : Tuesday, January 28, 2025 at 06:08:39 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{\prime \prime }+9 x&=t \sin \left (3 t \right ) \end{align*}

Solution by Maple

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

dsolve(diff(x(t),t$2)+9*x(t)=t*sin(3*t),x(t), singsol=all)
 
\[ x \left (t \right ) = \frac {\left (-3 t^{2}+36 c_{1} \right ) \cos \left (3 t \right )}{36}+\frac {\sin \left (3 t \right ) \left (36 c_{2} +t \right )}{36} \]

Solution by Mathematica

Time used: 0.132 (sec). Leaf size: 38

DSolve[D[x[t],{t,2}]+9*x[t]==t*Sin[3*t],x[t],t,IncludeSingularSolutions -> True]
 
\[ x(t)\to \left (-\frac {t^2}{12}+\frac {1}{216}+c_1\right ) \cos (3 t)+\frac {1}{36} (t+36 c_2) \sin (3 t) \]