58.11.6 problem 6

Internal problem ID [14737]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number : 6
Date solved : Thursday, October 02, 2025 at 09:50:39 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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