Consider the ordinary differential equation from Problem 4.32 but with a new initial condition, y(1) = 1.

Question:

Consider the ordinary differential equation from Problem 4.32 but with a new initial condition, y(1) = 1. What is the largest step size, h, in RK4 such that the system is stable for the first step? Rename your program from Problem 4.32 and modify the parameters so that it produces a solution for h = 0.01, h = h, and h = h + 0.2. Explain the result in the context of numerical stability. The results for these particular values are not so obvious, so you need to be careful in your explanation.


Problem 4.32

Write a MATLAB program that does an RK4 integration of the differential equation(x2)uis + 7/1-4x= dx dy

for the initial condition y(1) = 2 up to a maximum value x = 5. Your program should automatically generate a single plot with a legend that has the evolution of the function y(x) for the step sizes h = 0.2, h = 0.08 and h = 0.01.

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: