I have a question from my book and it says essentially, consider the IVP ${x}^{\bullet}=-x$ with $x(0)=1$, what is the exact value of $x(1)$, then using Eulers method with step size1 , estimate $x(1)$ call this ${x}^{\ast}(1)$ , then repeat for step sizes of ${10}^{-n}$ for $n=1,2,3,4$ then finally plot $E=|{x}^{\ast}(1)-x(1)|$ as a function of step size and then as $lnE$ vs $lnt$.

Now I am having some issues and ill explain,

for the first part I get that $x(1)={e}^{-1}$

We have $f(x)=-x$ and ${x}_{0}=1$

so I have that by Euler method

${x}_{1}={x}_{0}+f({x}_{0})t$

which would imply that for $t=1,{x}_{1}=0$

and then for the second part it would imply ${x}_{1}=0.9$, then 0.99, then 0.999 and finally 0.9999.

But this doesn't seem to make any sense to me. Seeing as none of these are close to ${e}^{-1}$

So I am confused in regard to where I am making mistakes, or where everything is going wrong. For the plotting part, I am also stuck because of this. I am looking for any help and advice.