# Euler's method for different differential equations

I have equation: \begin{align*} \frac{\mathrm{d}y}{\mathrm{d}t} = -0.04\sqrt{y} \end{align*}

How would I find the expression for Euler's method? I know the general expression is:

$$y_n=y_{n-1}+h\cdot F(t_{n-1},y_{n-1})$$

but I am confused with what to use as x and y and how I could convert $$-0.04\sqrt{y}$$ into that form.

Edit: increments of $$1$$ second, $$y(0) = 3$$.

• What is the initial condition ? – gimusi Oct 17 '18 at 20:07
• In your case the general formula is $$y_n=y_{n-1}+h\cdot F(t_{n-1},y_{n-1})$$ – gimusi Oct 17 '18 at 20:17
• You do not need to convert anything, you just have to read off $F(t,y)=-0.04\sqrt{y}$. – LutzL Oct 17 '18 at 20:46
• Try to obtain a solution according to the given method. If something is not clear do not hesitate to ask for further details. – gimusi Oct 17 '18 at 20:56

Let's consider the initial condition

$$y(0)=y_0.$$

Then

$$y'(0)=F(0,y_0)=-0.04 \sqrt{y_0}.$$

Then assuming a time step $$\Delta t=h$$ we can estimate

$$y(h)\approx y_1= y(0)+y'(0)\cdot \Delta t=y_0+y'_0\cdot h \implies F(h,y_1)=-0.04 \sqrt{y_1}.$$

Then

$$y(2h)\approx y_2=y_1+h\cdot F(h,y_0) \implies F(2h,y_2)=-0.04 \sqrt{y_2}$$

and so on.

Refer also to

• what does y′0 represent? – Jytrex Oct 18 '18 at 3:07
• @Jytrex $y'(0)$ is the dy/dt at $t=0$, that is $F(0,y_0)$ according to the general expression. – gimusi Oct 18 '18 at 6:14
• @Jytrex I've changed the notation accordingly. – gimusi Oct 18 '18 at 6:18
• I am still a little confused on how I would find dy/dt at each time. For example when doing y1, I dont have any other points to do dy/dt – Jytrex Oct 19 '18 at 4:25
• Let start from the first step. We know y(0)=3 then we can evaluate the derivative at $t=0$ that is $dy/dt=F(0,3)=-0.04\sqrt 3$. The idea is to estimate $y(h)$ by $y_1=y_0+h\cdot F(0,3)$. Once we have $y_1$ we can evaluate $F(h,y_1)$ and proceed step by step. – gimusi Oct 19 '18 at 6:21