/* Approximate a solution to the initial value problem u' = f(t,u) with u(t0) = u0 on the interval [t0,tN] using N time steps of the RK4 method. */ #include #include #define N 1024 static double t0=0,u0=1,tN=10,h; double f(double t,double u){ return exp(-u)*sin(t+u); } double rk4(double t,double u){ /* Please fill in this subroutine */ } int main(){ printf("This is problem 1 on exam part 2.\n"); h=(tN-t0)/N; double u=u0; for(int n=0;n