PS 6
- The Euler Method is a straighforward though rather inaccurate approach to integrating differential equations. For the equation y_dot=f(y,t) it starts at some initial value y(a)=y_a and update y so that y(t+delta_t)=y(t)+delta_t * f(y(t),t). Write a programme to do Euler integration for the differential equation y_dot=5-y with y(0)=0.
- Along with the value of y in the above programme, print out the real solution, which is y=5-5e^{-t}.
- Write a programme that calculates pi using the power series approximation pi^2/6=sum_{k=1}^infty (1/k^2).
If you don't get your programme to compile write a comment saying it doesn't compile at the top of you code when you hand it in.