39.1.1 problem Problem 11.1

Internal problem ID [6506]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 11. THE METHOD OF UNDETERMINED COEFFICIENTS. page 95
Problem number : Problem 11.1
Date solved : Wednesday, March 05, 2025 at 12:53:50 AM
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 = c_2 \,{\mathrm e}^{-x}+{\mathrm e}^{2 x} c_1 -2 x^{2}+2 x -3 \]
Mathematica. Time used: 0.017 (sec). Leaf size: 31
ode=D[y[x],{x,2}]-D[y[x],x]-2*y[x]==4*x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -2 x^2+2 x+c_1 e^{-x}+c_2 e^{2 x}-3 \]
Sympy. Time used: 0.182 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*x**2 - 2*y(x) - 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^{2 x} - 2 x^{2} + 2 x - 3 \]