35.8.13 problem 13

Internal problem ID [6220]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 13. Miscellaneous problems. page 466
Problem number : 13
Date solved : Wednesday, March 05, 2025 at 12:25:23 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+4 y^{\prime }+5 y&=26 \,{\mathrm e}^{3 x} \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 22
ode:=diff(diff(y(x),x),x)+4*diff(y(x),x)+5*y(x) = 26*exp(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left ({\mathrm e}^{5 x}+\cos \left (x \right ) c_{1} +\sin \left (x \right ) c_{2} \right ) {\mathrm e}^{-2 x} \]
Mathematica. Time used: 0.021 (sec). Leaf size: 27
ode=D[y[x],{x,2}]+4*D[y[x],x]+5*y[x]==26*Exp[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-2 x} \left (e^{5 x}+c_2 \cos (x)+c_1 \sin (x)\right ) \]
Sympy. Time used: 0.205 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(5*y(x) - 26*exp(3*x) + 4*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} \sin {\left (x \right )} + C_{2} \cos {\left (x \right )}\right ) e^{- 2 x} + e^{3 x} \]