37.2.3 problem 10.3.4

Internal problem ID [6400]
Book : Basic Training in Mathematics. By R. Shankar. Plenum Press. NY. 1995
Section : Chapter 10, Differential equations. Section 10.3, ODEs with variable Coefficients. First order. page 315
Problem number : 10.3.4
Date solved : Monday, January 27, 2025 at 02:00:33 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+y&=\left (1+x \right )^{2} \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=0 \end{align*}

Solution by Maple

Time used: 0.006 (sec). Leaf size: 15

dsolve([diff(y(x),x)+y(x)=(x+1)^2,y(0) = 0],y(x), singsol=all)
 
\[ y = x^{2}+1-{\mathrm e}^{-x} \]

Solution by Mathematica

Time used: 0.142 (sec). Leaf size: 17

DSolve[{D[y[x],x]+y[x]==(x+1)^2,{y[0]==0}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to x^2-e^{-x}+1 \]