34.11.1 problem 26

Internal problem ID [8022]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 16. Linear equations with constant coefficients (Short methods). Supplemetary problems. Page 107
Problem number : 26
Date solved : Tuesday, September 30, 2025 at 05:14:21 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y^{\prime }+y&={\mathrm e}^{3 x}+6 \,{\mathrm e}^{x}-3 \,{\mathrm e}^{-2 x}+5 \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 48
ode:=diff(diff(y(x),x),x)+diff(y(x),x)+y(x) = exp(3*x)+6*exp(x)-3*exp(-2*x)+5; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-\frac {x}{2}} \sin \left (\frac {\sqrt {3}\, x}{2}\right ) c_2 +{\mathrm e}^{-\frac {x}{2}} \cos \left (\frac {\sqrt {3}\, x}{2}\right ) c_1 +5+\frac {{\mathrm e}^{3 x}}{13}+2 \,{\mathrm e}^{x}-{\mathrm e}^{-2 x} \]
Mathematica. Time used: 1.76 (sec). Leaf size: 182
ode=D[y[x],{x,2}]+D[y[x],x]+y[x]==Exp[3*x]+6*Exp[x]-3*Exp[-2*x]+5; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-x/2} \left (\cos \left (\frac {\sqrt {3} x}{2}\right ) \int _1^x-\frac {2 e^{-\frac {3 K[2]}{2}} \left (-3+5 e^{2 K[2]}+6 e^{3 K[2]}+e^{5 K[2]}\right ) \sin \left (\frac {1}{2} \sqrt {3} K[2]\right )}{\sqrt {3}}dK[2]+\sin \left (\frac {\sqrt {3} x}{2}\right ) \int _1^x\frac {2 e^{-\frac {3 K[1]}{2}} \left (-3+5 e^{2 K[1]}+6 e^{3 K[1]}+e^{5 K[1]}\right ) \cos \left (\frac {1}{2} \sqrt {3} K[1]\right )}{\sqrt {3}}dK[1]+c_2 \cos \left (\frac {\sqrt {3} x}{2}\right )+c_1 \sin \left (\frac {\sqrt {3} x}{2}\right )\right ) \end{align*}
Sympy. Time used: 0.167 (sec). Leaf size: 51
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) - exp(3*x) - 6*exp(x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 5 + 3*exp(-2*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} \sin {\left (\frac {\sqrt {3} x}{2} \right )} + C_{2} \cos {\left (\frac {\sqrt {3} x}{2} \right )}\right ) e^{- \frac {x}{2}} + \frac {e^{3 x}}{13} + 2 e^{x} + 5 - e^{- 2 x} \]