51.1.4 problem 2. direct method

Internal problem ID [8215]
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
Date solved : Monday, January 27, 2025 at 03:46:09 PM
CAS classification : [[_linear, `class A`]]

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

With initial conditions

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

Solution by Maple

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

dsolve([diff(y(x),x)-2*y(x)=x^2,y(1) = 1],y(x), singsol=all)
 
\[ y = -\frac {x^{2}}{2}-\frac {x}{2}-\frac {1}{4}+\frac {9 \,{\mathrm e}^{2 x -2}}{4} \]

Solution by Mathematica

Time used: 0.038 (sec). Leaf size: 28

DSolve[{D[y[x],x]-2*y[x]==x^2,{y[1]==1}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{4} \left (-2 x^2-2 x+9 e^{2 x-2}-1\right ) \]