Given y' = 1 - 2x - 3y, starting condition y(4)=5 and h = 1/2
I am asked to estimate by hand the value for y(5).
My question is, if my staring value are as follows:
start: x=4 y=5 y'= -22
then I suppose I have to do the Euler method the other way around and double the x-value instead of halving it since I need to get to $x=5$. However, in that case the next x-value will be $x=8$. How do I get $x=5$ if my step length is $1/2$?
Sorry if this question seems dumb or easy but I really don't see how I can get to the answer.
You compute in two steps first an approximation to $y(4.5)=y(4+0.5)$ and with that then $y(5)=y(4.5+0.5)$, all using the formula $$y(x+h)\approx y(x)+h\,f(x,y(x))$$ of the Euler forward method.
Setting $u=3y+2x-1$ so that $y'=-u$ gives $u'=3y'+2=-3u+2$. Then setting $v=3u-2$ so that $u'=-v$ results in $v'=3u'=-3v$, so that $v=Ce^{-3x}$. Inserting backwards gets $u=\frac23+Ce^{-3x}$, so that the exact solution is $$y(x)=\frac19-\frac23x+Ce^{-3x},$$ the constant $C$ is determined by the initial condition.
Of course you need $Lh<0.1$, where $L$ is the $y$-Lipschitz constant, here $L=3$, to get at least one digit correct. So usable step sizes are $h=0.03$ and below.
In python you get values for finer step sizes with the script
producing the table