Question: 5. Step Size Control Solve the Van der Pol equation y =(1 - y2)y - y, y(0) = 2, y (0) = 0 with y

 5. Step Size Control Solve the Van der Pol equation y"

5. Step Size Control Solve the Van der Pol equation y" =(1 - y2)y - y, y(0) = 2, y (0) = 0 with y = 15 in the time interval t = [0,50 with the classical and an adaptive Runge kutta method. 1. Transform the differential equation into a first order system. 2. Use scipy integrate. RK45 to solve the ODE with stepsize control. This is an embedded Runge Kutta method with step-size controll as we dis- cussed in class. Make a plot for the numerical solution and also plot some markers on the t-axis for each tr. Use the tolerances rtol=1e-7, atol-1e-7. You can use the following code to get started: S = scipy.integrate. RK45(..., rtol=1e-7, atol-1e-7) while s.status is 'running': s.step() print(s.t, s.y[0]) 3. Solve the same problem with your own implementation of the classical Runge Kutta Method. Use 1000 time steps and plot the graph into the same figure as the adaptive solution. 4. Print out the number of steps of both methods and their difference at the final time. 5. Step Size Control Solve the Van der Pol equation y" =(1 - y2)y - y, y(0) = 2, y (0) = 0 with y = 15 in the time interval t = [0,50 with the classical and an adaptive Runge kutta method. 1. Transform the differential equation into a first order system. 2. Use scipy integrate. RK45 to solve the ODE with stepsize control. This is an embedded Runge Kutta method with step-size controll as we dis- cussed in class. Make a plot for the numerical solution and also plot some markers on the t-axis for each tr. Use the tolerances rtol=1e-7, atol-1e-7. You can use the following code to get started: S = scipy.integrate. RK45(..., rtol=1e-7, atol-1e-7) while s.status is 'running': s.step() print(s.t, s.y[0]) 3. Solve the same problem with your own implementation of the classical Runge Kutta Method. Use 1000 time steps and plot the graph into the same figure as the adaptive solution. 4. Print out the number of steps of both methods and their difference at the final time

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!