Power series/inhomogenous differential equation.

ordinary differential equationspower series

Looking at a method to solve the inhomogenous differential equation $$y'-ty=t^2 $$

Assuming that the power series $\sum_{n=0}^n c_n t^n$ has a convergence radius $\rho > 0$. $$y(t) = \sum_{n=0}^n c_n t^n$$

How can I determine $a_0,a_1,a_2…$ so that $y'-ty = \sum_{n=0}^n a_n t^n$ for all $t \in]-\rho,\rho[$ ???

Thanks.

Best Answer

A power series solution can be easily obtained. Making $y=\sum_{k=0}^n a_k t^k$ and substituting into the ODE we have

$$ \left(\sum_{k=0}^n a_k t^k\right)'-t\left(\sum_{k=0}^n a_k t^k\right)-t^2=0 $$

after grouping for powers of $t$ we have

$$ \left\{ \begin{array}{rcl} a_1&=&0 \\ 2 a_2-a_0&=&0 \\ 3 a_3-a_1 &=&1 \\ 4 a_4-a_2&=&0 \\ 5 a_5-a_3&=&0 \\ 6 a_6-a_4&=&0 \\ 7 a_7-a_5&=&0 \\ 8 a_8-a_6&=&0 \\ 9 a_9-a_7&=&0 \\ 10 a_{10}-a_8&=&0 \\ \vdots & \vdots & \vdots \end{array} \right. $$

solving for $n=10$ we obtain

$$ y_{10} = a_0\left(1+\frac{t^2}{2}+\frac{t^4}{8}+\frac{t^6}{48}+\frac{t^8}{384}+\frac{t^{10}}{3840}\right)+\frac{t^3}{3}+\frac{t^5}{15}+\frac{t^7}{105}+\frac{t^9}{945}+O\left(t^{11}\right) $$

Follows a plot showing in blue the closed solution for $y(0)=1$ as well as in red the series approximation for $a_0=1$.

enter image description here