7.2 problem 2

Internal problem ID [12687]

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.
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [_linear]

\[ \boxed {y^{\prime }-y x=2} \] With initial conditions \begin {align*} [y \left (0\right ) = 1] \end {align*}

Solution by Maple

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

dsolve([diff(y(x),x)=x*y(x)+2,y(0) = 1],y(x), singsol=all)
 

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

Solution by Mathematica

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

DSolve[{y'[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 ) \]