76.15.13 problem 13

Internal problem ID [17654]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 4. Second order linear equations. Section 4.5 (Nonhomogeneous Equations, Method of Undetermined Coefficients). Problems at page 260
Problem number : 13
Date solved : Tuesday, January 28, 2025 at 10:47:38 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} u^{\prime \prime }+w_{0}^{2} u&=\cos \left (w t \right ) \end{align*}

Solution by Maple

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

dsolve(diff(u(t),t$2)+w__0^2*u(t)=cos(w*t),u(t), singsol=all)
 
\[ u = \sin \left (w_{0} t \right ) c_{2} +\cos \left (w_{0} t \right ) c_{1} -\frac {\cos \left (w t \right )}{w^{2}-w_{0}^{2}} \]

Solution by Mathematica

Time used: 0.171 (sec). Leaf size: 49

DSolve[D[u[t],{t,2}]+w0^2*u[t]==Cos[w*t],u[t],t,IncludeSingularSolutions -> True]
 
\[ u(t)\to \frac {\cos (t w)-\left (w^2-\text {w0}^2\right ) (c_1 \cos (t \text {w0})+c_2 \sin (t \text {w0}))}{(\text {w0}-w) (w+\text {w0})} \]