Hello folks, how should I proceed to solve this differential equation through power series? The problem is:
$$
y'-y = x \\   
y(0) = 0
$$
I know I have use the general form and its derivatives
$$
\sum a_n(x-x_0)^n
$$
My problem is with the alone $x$ variable on the right side. Could someone give me any tips?
Thanks in advance!
 A: If$$y(x)=a_1x+a_2x^2+a_3x^3+\cdots$$then$$y'(x)=a_1+2a_2x+3a_3x^2+\cdots$$and therefore$$y'(x)-y(x)=a_1+(2a_2-a_1)x+(3a_3-a_2)x^2+\cdots$$You want this to be equal to $x$. This means that$$\left\{\begin{array}{l}a_1=0\\2a_2-a_1=1\\3a_3-a_2=0\\4a_4-a_3=0\\\vdots\end{array}\right.$$So, you get that $a_1=0$, $a_2=\frac12$, $a_3=\frac16$, $a_4=\frac1{24}$, … Can you take it from here?
A: $$y'-y = x $$
Power series may seem cool, but you can easily solve it by another way since it is a standard differential equation.
This is an Euler equation.
$$y'+P(x)y=Q(x)$$
$$\implies ye^{\int Pdx}=\int Qe^{\int Pdx}dx$$
A: Because of the initial condition you can use a power series about $\;x=0\;$ , so:
$$y=\sum_{n=0}^\infty a_nx^n\implies y'=\sum_{n=0}^\infty na_nx^{n-1}\implies$$
$$x=y'-y=\sum_{n=0}^\infty \left(a_nnx^{n-1}-a_nx^n\right)=(a_1-a_0)+(2a_2-a_1)x+(3a_3-a_2)x^2+\ldots$$
We can form a recursive sequence, or else observe that
$$a_1-a_0=0\implies a_1=a_0\;;\;\;2a_2-a_1=1\implies a_2=\frac{a_1=a_0}2+\frac12=\frac{a_0+1}2\;;$$
$$\;\;3a_3-a_2=0\implies a_3=\frac13a_2=\frac{a_0+1}6,\;etc. \text{(other relations are }\;a_n-(n+1)a_{n+1}=0)$$
So
$$a_4=\frac{a_0+1}{24}\,,\ldots,a_n=\frac{a_0+1}{n!}\;,\;\;n\ge2$$
Thus, the general solution is
$$y(x)=a_0+a_0x+\frac{a_0+1}2x^2+\frac{a_0+1}{3!}x^3+\ldots+\frac{a_0+1}{n!}x^n+\ldots=$$
$$=a_0\left(\sum_{n=0}^\infty \frac{x^n}{n!}\right)+\sum_{n=2}^\infty\frac{x^n}{n!}=a_0e^x+(e^x-x-1)=Ke^x-x-1,\,K=\text{constant} $$
With the inital condition $\;y(0)=0\;$ we get
$$0=y(0)=K-1\implies K=1\implies y(x)=e^x-x-1$$
If you need the above particular solution as power series just take the corresponding power series for the last function above...
