86.7.3 problem 3

Internal problem ID [23150]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 5. Linear equations of the second order with constant coefficients. Exercise 5c at page 83
Problem number : 3
Date solved : Thursday, October 02, 2025 at 09:23:31 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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