26.4.4 problem 2(d)

Internal problem ID [4272]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, section 11, page 49
Problem number : 2(d)
Date solved : Monday, January 27, 2025 at 08:47:16 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+y&=2 x \,{\mathrm e}^{-x}+x^{2} \end{align*}

Solution by Maple

Time used: 0.001 (sec). Leaf size: 22

dsolve(diff(y(x),x)+y(x)=2*x*exp(-x)+x^2,y(x), singsol=all)
 
\[ y \left (x \right ) = \left (x^{2}+c_{1} \right ) {\mathrm e}^{-x}+x^{2}-2 x +2 \]

Solution by Mathematica

Time used: 0.133 (sec). Leaf size: 29

DSolve[D[y[x],x]+y[x]==2*x*Exp[-x]+x^2,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^{-x} \left (x^2+e^x \left (x^2-2 x+2\right )+c_1\right ) \]