65.8.1 problem 15.1

Internal problem ID [13778]
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.1
Date solved : Tuesday, January 28, 2025 at 06:03:16 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{\prime \prime }+\omega ^{2} x&=\cos \left (\alpha 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.029 (sec). Leaf size: 27

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

Solution by Mathematica

Time used: 0.081 (sec). Leaf size: 111

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