79.14.1 problem (a)

Internal problem ID [21116]
Book : Ordinary Differential Equations. By Wolfgang Walter. Graduate texts in Mathematics. Springer. NY. QA372.W224 1998
Section : Chapter IV. Linear Differential Equations. Excercise VIII at page 210
Problem number : (a)
Date solved : Thursday, October 02, 2025 at 07:08:35 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} u^{\prime \prime }+2 a u^{\prime }+\omega ^{2} u&=c \cos \left (\omega t \right ) \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 64
ode:=diff(diff(u(t),t),t)+2*a*diff(u(t),t)+omega^2*u(t) = c*cos(omega*t); 
dsolve(ode,u(t), singsol=all);
 
\[ u = \frac {2 \,{\mathrm e}^{-\left (a +\sqrt {a^{2}-\omega ^{2}}\right ) t} c_1 a \omega +2 \,{\mathrm e}^{\left (-a +\sqrt {a^{2}-\omega ^{2}}\right ) t} c_2 a \omega +\sin \left (\omega t \right ) c}{2 a \omega } \]
Mathematica. Time used: 0.022 (sec). Leaf size: 66
ode=D[u[t],{t,2}]+2*a*D[u[t],t]+\[Omega]^2*u[t]==c*Cos[\[Omega]*t]; 
ic={}; 
DSolve[{ode,ic},u[t],t,IncludeSingularSolutions->True]
 
\begin{align*} u(t)&\to \frac {c \sin (t \omega )}{2 a \omega }+e^{-t \left (\sqrt {a^2-\omega ^2}+a\right )} \left (c_2 e^{2 t \sqrt {a^2-\omega ^2}}+c_1\right ) \end{align*}
Sympy. Time used: 0.198 (sec). Leaf size: 48
from sympy import * 
t = symbols("t") 
a = symbols("a") 
w = symbols("w") 
c = symbols("c") 
u = Function("u") 
ode = Eq(2*a*Derivative(u(t), t) - c*cos(t*w) + w**2*u(t) + Derivative(u(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=u(t),ics=ics)
 
\[ u{\left (t \right )} = C_{1} e^{t \left (- a + \sqrt {a^{2} - w^{2}}\right )} + C_{2} e^{- t \left (a + \sqrt {a^{2} - w^{2}}\right )} + \frac {c \sin {\left (t w \right )}}{2 a w} \]