65.7.6 problem 14.1 (vi)

Internal problem ID [13770]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 14, Inhomogeneous second order linear equations. Exercises page 140
Problem number : 14.1 (vi)
Date solved : Tuesday, January 28, 2025 at 06:02:31 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{\prime \prime }+\omega ^{2} x&=\sin \left (\alpha t \right ) \end{align*}

Solution by Maple

Time used: 0.009 (sec). Leaf size: 33

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

Solution by Mathematica

Time used: 0.109 (sec). Leaf size: 73

DSolve[D[x[t],{t,2}]+w^2*x[t]==Sin[a*t],x[t],t,IncludeSingularSolutions -> True]
 
\[ x(t)\to \cos (t w) \int _1^t-\frac {\sin (a K[1]) \sin (w K[1])}{w}dK[1]+\sin (t w) \int _1^t\frac {\cos (w K[2]) \sin (a K[2])}{w}dK[2]+c_1 \cos (t w)+c_2 \sin (t w) \]