I have the following first order differential equation: $$0.05u'+2xu=0.05^2e^{5-20x^2}$$ for $x \in [0,1]$, and $u(0)=0$.
then I want to approach the differential equation with a Taylor series at point $x_i$, namely: $u'_{i} \approx \dfrac{u_{i+1}-u_{i}}{h_i}$.
$h_i$ here is the width of the grid, namely $h_i=x_{i+1}-x_{i}$. Then I define the grid width $h_i$ as follows: $h_{i+1}=h_i(1+\alpha.h_{i})$. where alpha is a constant.
when I take $\alpha$ values $1,2,3,4,...,7$ the error produced around the $0.15$ point is quite large.
What alpha value should I take so that the approximation around the $0.15$ point has a small error?
Or How do I adjust the hi grid width so that the approximation results obtained are optimal?