0
$\begingroup$

$f(x)=-x$ and initial condition $x(0)=1$

Using the Euler Method with the step size $\Delta t=1$, estimate $x(1)$ numerically.

I so far did:

$X_{n+1} = X_n+f(x_n)(1) $

$X_1=0$

$X_2=0 $

I have a similar question on my test tomorrow. Any help will be appreciated

  • 0
    @EdGorcenski I was just wondering the same thing.2012-10-31

1 Answers 1

2

Presumably the differential equation you are working with is $x'=-x$ with initial condition $x(0)=1$ and the capital $X$'s are the calculated points. You have done the iteration correctly, getting $x(1)=0$. Analytically we can see that the solution is $x=e^{-t}$, so the correct $x(1)=\frac 1e$. You could redo it with a smaller step size and see that it is more accurate, but that isn't asked for in the question.

  • 0
    +1 for simply interpreting the question :-) (and for a good answer)2012-10-31