35.6.4 problem 4

Internal problem ID [6154]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 6. SECOND-ORDER LINEAR EQUATIONSWITH CONSTANT COEFFICIENTS AND RIGHT-HAND SIDE NOT ZERO. page 422
Problem number : 4
Date solved : Sunday, March 30, 2025 at 10:41:27 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }-3 y&=24 \,{\mathrm e}^{-3 x} \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 23
ode:=diff(diff(y(x),x),x)-2*diff(y(x),x)-3*y(x) = 24*exp(-3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left ({\mathrm e}^{6 x} c_1 +c_2 \,{\mathrm e}^{2 x}+2\right ) {\mathrm e}^{-3 x} \]
Mathematica. Time used: 0.019 (sec). Leaf size: 29
ode=D[y[x],{x,2}]-2*D[y[x],x]-3*y[x]==24*Exp[-3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-3 x} \left (c_1 e^{2 x}+c_2 e^{6 x}+2\right ) \]
Sympy. Time used: 0.229 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*y(x) - 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 24*exp(-3*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- x} + C_{2} e^{3 x} + 2 e^{- 3 x} \]