58.9.8 problem 9

Internal problem ID [14687]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.1. Basic theory of linear differential equations. Exercises page 124
Problem number : 9
Date solved : Thursday, October 02, 2025 at 09:50:12 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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