Consider the initial-value problem $\dot y = \sin \pi t$, $y(0) = 0$. Use Euler’s Method with five steps to approximate $y(1)$.

645 Views Asked by At

I'm always doubtful about asking if the solution manual is wrong, as that opens me up to the usual embarrassment when someone points out the simple error I have made, however, on we go. [Answer from solution manual here]

I had a go and got the answer $0.12$, but I got it in the column under $n=1$, the solution manual has zero for the answer there, then I got the answer $0.31$, but likewise, I got that in the column under $n=2$, not as the answer graphic shows. Additionally, I don't understand why $y_0=1$, when I would have thought it would be $y_0=0$. Can anyone point out the (I suspect) simple error I have made? In case the graphic doesn't show, here is the answer table in raw text:

n   0     1     2     3     4     5
tn  0     0.2   0.4   0.6   0.8   1.0
yn  0.00  0.00  0.12  0.31  0.50  0.62 
1

There are 1 best solutions below

0
On

You seem to have used the implicit Euler method (or simply misread the indices). As the formula in the image states, in the explicit Euler method you compute $y_{n+1}$ from data at the previous time $t_n$. Thus \begin{align} y_1=y_0+h\sin(\pi t_0)&=0+0.2\sin(\pi\cdot 0)=0 \\ y_2=y_1+h\sin(\pi t_1)&=0+0.2\sin(\pi\cdot 0.2)=0.11755705 \end{align} etc.