58.11.1 problem 1

Internal problem ID [14732]
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 : 1
Date solved : Thursday, October 02, 2025 at 09:50:36 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-3 y^{\prime }+8 y&=4 x^{2} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 40
ode:=diff(diff(y(x),x),x)-3*diff(y(x),x)+8*y(x) = 4*x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\frac {3 x}{2}} \sin \left (\frac {\sqrt {23}\, x}{2}\right ) c_2 +{\mathrm e}^{\frac {3 x}{2}} \cos \left (\frac {\sqrt {23}\, x}{2}\right ) c_1 +\frac {x^{2}}{2}+\frac {3 x}{8}+\frac {1}{64} \]
Mathematica. Time used: 0.014 (sec). Leaf size: 63
ode=D[y[x],{x,2}]-3*D[y[x],x]+8*y[x]==4*x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^2}{2}+\frac {3 x}{8}+c_2 e^{3 x/2} \cos \left (\frac {\sqrt {23} x}{2}\right )+c_1 e^{3 x/2} \sin \left (\frac {\sqrt {23} x}{2}\right )+\frac {1}{64} \end{align*}
Sympy. Time used: 0.133 (sec). Leaf size: 46
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*x**2 + 8*y(x) - 3*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x^{2}}{2} + \frac {3 x}{8} + \left (C_{1} \sin {\left (\frac {\sqrt {23} x}{2} \right )} + C_{2} \cos {\left (\frac {\sqrt {23} x}{2} \right )}\right ) e^{\frac {3 x}{2}} + \frac {1}{64} \]