1.4 problem 2. direct method

Internal problem ID [5794]

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]]

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

Solution by Maple

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

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

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

Solution by Mathematica

Time used: 0.061 (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*}