65.8.2 problem 15.3

Internal problem ID [13779]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 15, Resonance. Exercises page 148
Problem number : 15.3
Date solved : Tuesday, January 28, 2025 at 06:03:20 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

With initial conditions

\begin{align*} x \left (0\right )&=0\\ x^{\prime }\left (0\right )&=0 \end{align*}

Solution by Maple

Time used: 0.011 (sec). Leaf size: 14

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

Solution by Mathematica

Time used: 0.061 (sec). Leaf size: 68

DSolve[{D[x[t],{t,2}]+w^2*x[t]==Cos[w*t],{x[0]==0,Derivative[1][x][0 ]==0}},x[t],t,IncludeSingularSolutions -> True]
 
\[ x(t)\to -\frac {\sin (t w) \left (-4 w^2 \int _1^t\frac {\cos ^2(w K[1])}{w}dK[1]+4 w^2 \int _1^0\frac {\cos ^2(w K[1])}{w}dK[1]+\sin (2 t w)\right )}{4 w^2} \]