33.1.12 problem Problem 11.14

Internal problem ID [7804]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 11. THE METHOD OF UNDETERMINED COEFFICIENTS. page 95
Problem number : Problem 11.14
Date solved : Tuesday, September 30, 2025 at 05:05:42 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }-5 y&=x^{2} {\mathrm e}^{x}-x \,{\mathrm e}^{5 x} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 34
ode:=diff(y(x),x)-5*y(x) = x^2*exp(x)-x*exp(5*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {{\mathrm e}^{x} \left (x^{2}-2 c_1 \right ) {\mathrm e}^{4 x}}{2}+\frac {{\mathrm e}^{x} \left (-8 x^{2}-4 x -1\right )}{32} \]
Mathematica. Time used: 0.201 (sec). Leaf size: 35
ode=D[y[x],x]-5*y[x]==x^2*Exp[x]-x*Exp[5*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{5 x} \left (\int _1^xK[1] \left (e^{-4 K[1]} K[1]-1\right )dK[1]+c_1\right ) \end{align*}
Sympy. Time used: 0.141 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*exp(x) + x*exp(5*x) - 5*y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (- \frac {x^{2}}{4} - \frac {x}{8} + \left (C_{1} - \frac {x^{2}}{2}\right ) e^{4 x} - \frac {1}{32}\right ) e^{x} \]