84.23.1 problem 14.1

Internal problem ID [22245]
Book : Schaums outline series. Differential Equations By Richard Bronson. 1973. McGraw-Hill Inc. ISBN 0-07-008009-7
Section : Chapter 14. The method of undetermined coefficients. Solved problems. Page 71
Problem number : 14.1
Date solved : Thursday, October 02, 2025 at 08:36:33 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-y^{\prime }-2 y&=4 x^{2} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 26
ode:=diff(diff(y(x),x),x)-diff(y(x),x)-2*y(x) = 4*x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-x} c_2 +{\mathrm e}^{2 x} c_1 -2 x^{2}+2 x -3 \]
Mathematica. Time used: 0.01 (sec). Leaf size: 31
ode=D[y[x],{x,2}]-D[y[x],{x,1}]-2*y[x]==4*x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -2 x^2+2 x+c_1 e^{-x}+c_2 e^{2 x}-3 \end{align*}
Sympy. Time used: 0.116 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*x**2 - 2*y(x) - 2*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 \left (1 - \sqrt {3}\right )} + C_{2} e^{x \left (1 + \sqrt {3}\right )} - 2 x^{2} + 4 x - 6 \]