59.7.10 problem 14.1 (x)

Internal problem ID [15055]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 14, Inhomogeneous second order linear equations. Exercises page 140
Problem number : 14.1 (x)
Date solved : Thursday, October 02, 2025 at 10:02:27 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{\prime \prime }+6 x^{\prime }+10 x&={\mathrm e}^{-2 t} \cos \left (t \right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 32
ode:=diff(diff(x(t),t),t)+6*diff(x(t),t)+10*x(t) = exp(-2*t)*cos(t); 
dsolve(ode,x(t), singsol=all);
 
\[ x = \left (\cos \left (t \right ) c_1 +\sin \left (t \right ) c_2 \right ) {\mathrm e}^{-3 t}+\frac {{\mathrm e}^{-2 t} \left (\cos \left (t \right )+2 \sin \left (t \right )\right )}{5} \]
Mathematica. Time used: 0.026 (sec). Leaf size: 33
ode=D[x[t],{t,2}]+6*D[x[t],t]+10*x[t]==Exp[-3*t]*Cos[t]; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{2} e^{-3 t} ((1+2 c_2) \cos (t)+(t+2 c_1) \sin (t)) \end{align*}
Sympy. Time used: 0.262 (sec). Leaf size: 32
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(10*x(t) + 6*Derivative(x(t), t) + Derivative(x(t), (t, 2)) - exp(-2*t)*cos(t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \left (\left (C_{1} \sin {\left (t \right )} + C_{2} \cos {\left (t \right )}\right ) e^{- t} + \frac {2 \sin {\left (t \right )}}{5} + \frac {\cos {\left (t \right )}}{5}\right ) e^{- 2 t} \]