71.7.2 problem 2

Internal problem ID [14423]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.3.3, page 71
Problem number : 2
Date solved : Tuesday, January 28, 2025 at 06:30:33 AM
CAS classification : [_linear]

\begin{align*} y^{\prime }&=y x +2 \end{align*}

With initial conditions

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

Solution by Maple

Time used: 0.049 (sec). Leaf size: 27

dsolve([diff(y(x),x)=x*y(x)+2,y(0) = 1],y(x), singsol=all)
 
\[ y = \left (\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, x}{2}\right )+1\right ) {\mathrm e}^{\frac {x^{2}}{2}} \]

Solution by Mathematica

Time used: 0.058 (sec). Leaf size: 33

DSolve[{D[y[x],x]==x*y[x]+2,{y[0]==1}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^{\frac {x^2}{2}} \left (\sqrt {2 \pi } \text {erf}\left (\frac {x}{\sqrt {2}}\right )+1\right ) \]