50.5.16 problem 16

Internal problem ID [10263]
Book : Own collection of miscellaneous problems
Section : section 5.0
Problem number : 16
Date solved : Tuesday, September 30, 2025 at 07:16:06 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+2 y^{\prime }-24 y&=16-\left (x +2\right ) {\mathrm e}^{4 x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 31
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)-24*y(x) = 16-(x+2)*exp(4*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {2}{3}+\frac {\left (-50 x^{2}+1000 c_2 -190 x +19\right ) {\mathrm e}^{4 x}}{1000}+{\mathrm e}^{-6 x} c_1 \]
Mathematica. Time used: 0.148 (sec). Leaf size: 73
ode=D[y[x],{x,2}]+2*D[y[x],x]-24*y[x]==16-(x+2)*Exp[4*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-6 x} \int _1^x\frac {1}{10} e^{6 K[1]} \left (e^{4 K[1]} (K[1]+2)-16\right )dK[1]-\frac {1}{20} e^{4 x} \left (x^2+4 x-20 c_2\right )+c_1 e^{-6 x}-\frac {2}{5} \end{align*}
Sympy. Time used: 0.185 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 2)*exp(4*x) - 24*y(x) + 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 16,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{- 6 x} + \left (C_{1} - \frac {x^{2}}{20} - \frac {19 x}{100}\right ) e^{4 x} - \frac {2}{3} \]