Power series solution of $y'-y=x^2$ $y'-y=x^2$
I try to get a power series solution.
$y(x)=\sum_{n=0}^{\infty}a_{n}X^{n},y'(x)=\sum_{n=1}^{\infty}na_{n}X^{n-1}=\sum_{n=0}^{\infty}(n+1)a_{n+1}X^{n}$.
$\sum_{n=0}^{\infty}(n+1)a_{n+1}X^{n}-\sum_{n=0}^{\infty}a_{n}X^{n}=X^{2}$
Then $  \space a_{n+1}=\frac{a_n}{n+1} \space \forall n\neq 2$
$n=2 \implies 3a_3-a_2=1$
Then $a_1=a_0, a_2=\frac{a_0}{2}, a_3=\frac{2+a_0}{6}, a_4=\frac{2+a_0}{4!}, a_5=\frac{2+a_0}{24\cdot 4}$
Then the solution is $y=a_0+a_0x^1+\frac{a_0}{2}x^2+\frac{2+a_0}{6}x^3+\frac{2+a_0}{4!}x^4+\frac{2+a_0}{24\cdot 4}x^5 \cdots$
Is it correct? Am I supposed to find $a_0$ ?
Thanks!

Maxima (Linux version of Macsyma) gives this solution to your
differential equation: $y(x) = C\exp(x)-(x^2+2x+2)$. You need a start value to get the integration constant $'C'$. Then you can proceed with the standard power series for $\exp(x)$.
