65.7.7 problem 14.1 (vii)

Internal problem ID [13771]
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 (vii)
Date solved : Tuesday, January 28, 2025 at 06:02:34 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.008 (sec). Leaf size: 36

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

Solution by Mathematica

Time used: 0.052 (sec). Leaf size: 61

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