Consider IVP: y' = 9x -y ; y(0)=9 a) Write down Euler's method for yn+1 in terms of yn for a general stepsize. b)Using one step of Euler's Method approximate y(1). c) Using three steps of Euler's Method approximate y(1).
Euler's method uses the following recurrence to generate an approximation of the solution to an ordinary differential equation \(y'=f(x,y)\): \[y_{n+1}=y_n+hf(x_n,y_n)\]where \(h=x_{i+1}-x_i\) is the step size and the ODE is \(f(x,y)=9x-y\) It should be easy enough to see that the formula in this case becomes \[y_{n+1}=y_n+h(9x_n-y_n)=(1-h)y_n+9hx_n\]So for example, given that \(y(0)=9\), and you wanted to approximate \(y\left(\dfrac{1}{2}\right)\) within two steps (so \(h=\dfrac{1}{4}\)), that would generate a table of intermediate computations like this: \[\begin{array}{c|c|c|c|c} n&x_n&y_n&f(x_n,y_n)&y_{n+1}\\[1ex] \hline 0&0&9&-9&\dfrac{27}{4}\\[1ex] 1&\dfrac{1}{4}&\dfrac{27}{4}&-\dfrac{9}{2}&\dfrac{45}{8} \end{array}\]and so \(y\left(\dfrac{1}{2}\right)\approx\dfrac{45}{8}\).
Using three steps of Euler's Method approximate y(1).
Join our real-time social learning platform and learn together with your friends!