{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw4 - ENGR 6101 Computational Engineering Solution Set...

This preview shows page 1. Sign up to view the full content.

ENGR 6101: Computational Engineering Solution Set 4 (due on Wednesday in my mailbox by 4pm, 09/29) Questions: 1. Consider the following ODE: x 0 = 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 Euler method. Your code should plot both the numerical and the analytic solution on the same figure. Run your code with h = 1 and h = 2 . How does the accuracy change? Name your code ode_euler.m and submit soft copy to [email protected] Include a hard copy of your code (for h = 1 ) and the two graphs (for h = 1 and h = 2 ) along with your HW solutions. (c) (3 pts.) Repeat part (b) using second order Taylor-series method. In this case, name your code ode_taylor2.m . Again, include both hard and soft copies of your code, and a hard copy of the two graphs. (d) (3 pts.) Repeat part (b) using second order Runge-Kutta method. In this case, name your code ode_rk2.m . Again, include both hard and soft copies of your code, and a hard copy of the two graphs.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}