86.10.3 problem 3

Internal problem ID [23183]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 9. The operational method. Exercise 9b at page 134
Problem number : 3
Date solved : Thursday, October 02, 2025 at 09:24:07 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-5 y^{\prime }+4 y&=x^{2} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 24
ode:=diff(diff(y(x),x),x)-5*diff(y(x),x)+4*y(x) = x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} c_2 +{\mathrm e}^{4 x} c_1 +\frac {x^{2}}{4}+\frac {5 x}{8}+\frac {21}{32} \]
Mathematica. Time used: 0.01 (sec). Leaf size: 35
ode=D[y[x],{x,2}]-5*D[y[x],x]+4*y[x]==x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^2}{4}+\frac {5 x}{8}+c_1 e^x+c_2 e^{4 x}+\frac {21}{32} \end{align*}
Sympy. Time used: 0.111 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + 4*y(x) - 5*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} + \frac {x^{2}}{4} + \frac {5 x}{8} + \frac {21}{32} \]