ENGR 6101: Computational EngineeringSolution Set 4(due on Wednesday in my mailbox by 4pm, 09/29)Questions:1. Consider the following ODE:x0=x(1-x)x(0)=0.1(a) (3 pts.) Find the analytic solution. Note that you can do this with separation of variables.(b) (3 pts.) Write a Matlab code that solves this equation on the interval[0,8]using Eulermethod. Your code should plot both the numerical and the analytic solution on the samefigure. Run your code withh= 1andh= 2. How does the accuracy change? Nameyour codeode_euler.mand submit soft copy to[email protected]Include a hard copyof your code (forh= 1) and the two graphs (forh= 1andh= 2) along with your HWsolutions.(c) (3 pts.)Repeat part (b) using second order Taylor-series method.In this case, nameyour codeode_taylor2.m. Again, include both hard and soft copies of your code, and ahard copy of the two graphs.(d) (3 pts.) Repeat part (b) using second order Runge-Kutta method. In this case, nameyour codeode_rk2.m. Again, include both hard and soft copies of your code, and a hardcopy of the two graphs.
This is the end of the preview.
access the rest of the document.