49.6.11 problem 4(c)

Internal problem ID [7639]
Book : An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section : Chapter 2. Linear equations with constant coefficients. Page 69
Problem number : 4(c)
Date solved : Monday, January 27, 2025 at 03:08:50 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

With initial conditions

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

Solution by Maple

Time used: 0.018 (sec). Leaf size: 18

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

Solution by Mathematica

Time used: 0.064 (sec). Leaf size: 21

DSolve[{D[y[x],{x,2}]+\[Omega]^2*y[x]==A*Cos[\[Omega]*x],{y[0]==0,Derivative[1][y][0] ==1}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {(A x+2) \sin (x \omega )}{2 \omega } \]