88.15.7 problem 7

Internal problem ID [24103]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 4. Linear equations. Exercises at page 97
Problem number : 7
Date solved : Thursday, October 02, 2025 at 09:59:16 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-9 y&={\mathrm e}^{x}+3 \,{\mathrm e}^{-3 x} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 31
ode:=diff(diff(y(x),x),x)-9*y(x) = exp(x)+3*exp(-3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (24 c_2 \,{\mathrm e}^{6 x}-3 \,{\mathrm e}^{4 x}+24 c_1 -12 x -2\right ) {\mathrm e}^{-3 x}}{24} \]
Mathematica. Time used: 0.132 (sec). Leaf size: 39
ode=D[y[x],{x,2}]-9*y[x]==Exp[x]+3*Exp[-3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{24} e^{-3 x} \left (-12 x-3 e^{4 x}+24 c_1 e^{6 x}-2+24 c_2\right ) \end{align*}
Sympy. Time used: 0.065 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-9*y(x) - exp(x) + Derivative(y(x), (x, 2)) - 3*exp(-3*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{3 x} + \left (C_{1} - \frac {x}{2}\right ) e^{- 3 x} - \frac {e^{x}}{8} \]