33.2.1 problem Problem 11.44

Internal problem ID [7805]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 11. THE METHOD OF UNDETERMINED COEFFICIENTS. Supplementary Problems. page 101
Problem number : Problem 11.44
Date solved : Tuesday, September 30, 2025 at 05:05:44 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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