# 1st order ODE problem (forward euler)

Let ${du\over dt} = u, \ u(0)=1$. Let the step size be $\tau = 1/3$. Let $0=t_0<t_1=\frac{1}{3}<t_2 =\frac{2}{3}<t_3=1$.

Given $U^0=u(0) =1$, we find $U^{n+1}$

$U^{n+1}=U^n+\tau f(t,U^N) \\ U^1=U^0+\tau f(t_0,U^0) \\ U^1 =1+\frac{1}{3}\cdot 1$

I tried to understand but Im still stuck, how does $f(t_0,U^0)=1$? I know $f(t_0,U^0)=f(0,1)$, but how does $f=(0,1)=1$?

-

$f(t,u)$ is the RHS of the ODE $\frac{du}{dt}=u$. Thus, $f(t,u)=u$. Because the initial conditions are $t=0$ and $u(0)=1$, it follows that $f(t_0,U^0)=u(0)=1$. Why does the method work like this? Well, $f(t,u)$ is the derivative of $u$ at time $t$, thus, for small $\tau$, $\tau f(t,u)$ approximates the change in $u$ at time $t$. Thus, if we know $u$ at a time $t_n$, we can approximate $u$ at a time $t_{n+1}=t_n+\tau$ by $$u(t_{n+1})\approx u(t_n)+\tau f(t_n,u(t_n)).$$
Quick question -- You wrote that $f(t_0,U^0) = u(0)$, does that mean $f(t_1,u^1) = u(1)$ and so forth for $n \in \mathbb{N}$? – Richard May 9 '12 at 0:51
No. $f(t,u)=u$, so just plug in the variables. Thus, in general, $f(t_n,U^n)=U^n$. Note that, $U^n\neq u(n)$. $U^n$ is the estimate of $u$ at time $t_n$. $u(n)$ is the actual value of $u$ at time $t=n$. Note that furthermore, it need not be the case that $t_n=n$. – Jonathan Gleason May 9 '12 at 0:56