I have to solve this non-linear DE
$y' -e^y -x^2 = 0 , y(0)=c$
using powerseries.
$y(x) = \sum_{n=0}^\infty a_{n}x^n $
$y'(x) = \sum_{n=1}^\infty na_{n}x^{n-1} $
so we get
$\sum_{n=1}^\infty na_{n}x^{n-1} -e^{\sum_{n=0}^\infty a_{n}x^n} -x^2 = 0 $
changing the sum indexes
$\sum_{n=0}^\infty (n+1)a_{n+1}x^{n} -e^{\sum_{n=0}^\infty a_{n}x^n} -x^2 = 0 $
I want to find the recurrence relation of the coefficients. But i cannot merge/group them into the same sum, meaning, the sum of $y'(x) = \sum_{n=1}^\infty na_{n}x^{n-1} $ and the sum of $y(x) = \sum_{n=0}^\infty a_{n}x^n $ cause it is power of $e$ in order to get the equality of them with $0$.
The differential equation to be solved is $$ y' -e^y -x^2 = 0 ,\qquad y(0)=c $$ and the suggested approach is with power series. It may not be immediately obvious, but after working with the power series for $\,y\,$ a good step is to define $\, u := e^{-y}.\,$ Rewrite$\,y\,$ in terms of $\,u\,$ in the D.E. to get $$ -\log(u)' - 1/u - x^2 = 0, \qquad u(0) = c_0 := e^{-c}. $$ Simplify to get a new differential equation $$ u' = -1 - u\,x^2. $$ Expand $\,u\,$ as a power series to get $$ u \!=\! \sum_{n=0}^\infty c_n \frac{x^n}{n!}, u' \!=\! \sum_{n=0}^\infty c_{n+1} \frac{x^n}{n!}, u\,x^2 \!=\! \sum_{n=0}^\infty c_{n-2}n(n\!-\!1) \frac{x^n}{n!}. $$ Substitute these series into the new D.E. to get $$ c_1 = -1,\quad c_{n+1} = -c_{n-2}n(n-1) \quad\text{ unless } \quad n=0. $$ Use this recursion relation to get $$ u = c_0-x-2c_0\frac{x^3}{3!} +6\frac{x^4}{4!} +40c_0\frac{x^6}{6!}-180\frac{x^7}{7!}+\cdots.$$ Use $\,y = -\log(u/c_0)+c\,$ to get the solution $$ c + \frac1{c_0}\frac{x^1}{1!} + \frac1{c_0^2} \frac{x^2}{2!} + 2\frac{1+c_0^3}{c_0^3}\frac{x^3}{3!} + 2\frac{3+c_0^3}{c_0^4}\frac{x^4}{4!} + \cdots. $$