1.4 problem 2. direct method

Internal problem ID [5793]

Book: A course in Ordinary Differential Equations. by Stephen A. Wirkus, Randall J. Swift. CRC Press NY. 2015. 2nd Edition
Section: Chapter 8. Series Methods. section 8.2. The Power Series Method. Problems Page 603
Problem number: 2. direct method.
ODE order: 1.
ODE degree: 1.

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

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

Solution by Maple

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

dsolve([diff(y(x),x)-2*y(x)=x^2,y(1) = 1],y(x), singsol=all)
 

\[ y \left (x \right ) = -\frac {x^{2}}{2}-\frac {x}{2}-\frac {1}{4}+\frac {9 \,{\mathrm e}^{2 x -2}}{4} \]

Solution by Mathematica

Time used: 0.037 (sec). Leaf size: 26

DSolve[{y'[x]-2*y[x]==x^2,{y[1]==1}},y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \frac {1}{4} \left (-2 x (x+1)+9 e^{2 x-2}-1\right ) \\ \end{align*}