SO i have this differential equation and actually i am not sure if i have solved it right with Euler's improved method :
$z'' = f_{z} - C_{z}*|z'|*z'$
$ z' = u$
$u' = z'' = f_{z}-C_{z}*|u|*u$
Improved Euler Method :
$K_{1} = f{z}-C{z}*|u_{n}|*u_{n}$
$K_{2} = f{z}-(C_{z}*|u_{n}+h*K_{1}|)*(u_{n}+h*K_{1})$
so we get :
$z_{n+1} = z{n} + h*u_{n}$
$u_{n+1} = u_{n} + \frac{h}{2}*(K_{1} + h*K_{2})$
Is this right ?
P.S (fz , Cz are just variables with numbers not function inputs)
There are several small errors that would sum up to a more grossly incorrect output. As a system with multiple components, you need to compute the intermediary slopes at all stages for all components, that is, additionally for the slopes in $z$ direction \begin{align} L_1&=u\\ L_2&=u+hK_1 \end{align} Then the equations for the step are \begin{align} u_{+1}&=u+\frac h2(K_1+K_2)\\ z_{+1}&=z+\frac h2(L_1+L_2)=z+hu+\frac{h^2}2K_1 \end{align}