Anyone knows how to solve the following differential equation with power series? $$ y' + y = 1+x $$ I got completely lost because all the examples I found always equals to zero, and I don't know what to do with the $1+x$
Thank you in advance!
Anyone knows how to solve the following differential equation with power series? $$ y' + y = 1+x $$ I got completely lost because all the examples I found always equals to zero, and I don't know what to do with the $1+x$
Thank you in advance!
Copyright © 2021 JogjaFile Inc.
Take $y=\sum_{n=0}^{\infty}a_nx^n$. By substitution in the differential equation we have: \begin{align} y'+y=\sum_{n=0}^{\infty}(n+1)a_{n+1}x^n+\sum_{n=0}^{\infty}a_nx^n&=x+1 \\\implies \sum_{n=0}^{\infty}(a_n+(n+1)a_{n+1})x^n&=x+1 \\\implies a_0+a_1&=1\\ a_1+2a_2&=1\\ a_n&=-(n+1)a_{n+1}\quad ,&& \quad \forall n>1 \\\implies a_{n+1}&=-\frac{a_n}{n+1}\\ a_{n+1}&=2(-1)^{n+1}\frac{a_2}{(n+1)!}\quad ,&& \quad n>0\\ a_0&=2a_2,a_1=1-a_0 \\\implies a_{n+1}&=(-1)^{n+1}\frac{a_0}{(n+1)!}\quad ,&& \quad n>0\\\implies y=a_0+(1-a_0)x+a_0\sum_{n=2}^{\infty}\frac{(-x)^n}{n!}&=x+a_0\sum_{n=0}^{\infty}\frac{(-x)^n}{n!}\\&=a_0e^{-x}+x \end{align}