17.23 problem 5 solved directly

Internal problem ID [6426]

Book: Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section: Chapter 4. Power Series Solutions and Special Functions. Section 4.2. Series Solutions of First-Order Differential Equations Page 162
Problem number: 5 solved directly.
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [[_linear, `class A`]]

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

Solution by Maple

Time used: 0.0 (sec). Leaf size: 11

dsolve([diff(y(x),x)=x-y(x),y(0) = 0],y(x), singsol=all)
 

\[ y \left (x \right ) = x -1+{\mathrm e}^{-x} \]

Solution by Mathematica

Time used: 0.039 (sec). Leaf size: 13

DSolve[{y'[x]==x-y[x],{y[0]==0}},y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to x+e^{-x}-1 \]