I'm having trouble solving this question below and would like to have some help:
Apply the Backward Euler method to the differential equation:
$y' = -20y + 20\cos (t) – \sin (t)$, $0\leq t\leq 2$, $y(0)=0$, with $h=0.25$; actual solution $y(t)=-e^{20t} + \cos(t)$.
Use Newton's method to solve for $w_{i+1}$.
So far, I have this code:
Best Answer
What you have above is almost correct, assuming that you want to substitute a high-level solver for the Newton's method. Your mistakes: