HW_Assignment_7

# HW_Assignment_7 - Matlab Use ODE45 and ODE23S and note that...

This preview shows pages 1–5. Sign up to view the full content.

HOMEWORK ASSIGNMENT 7 EGM 3344 Numerical Integration of ODEs Concepts Problems from Chapra book chapters 20 through 22 Problem Approach Comments 20.1 Matlab Write simple Matlab programs to implement a single time step of Euler’s method, the midpoint method, and the 4 th order Runge-Kutta method. Then write a driver program that uses a for loop to iterate the calls to each method. 20.9 Matlab Only do part (a). Convert the second order ODE into two first order ODEs to numerically integrate. 20.15 Matlab Use the built-in Matlab function ODE45 to perform the numerical integration. Use m = 10 kg and k = 40 N/m to generate your solution. 21.3 Matlab Only integrate from 2.0 to 2.5 sec. 21.6 Matlab 21.11

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Matlab Use ODE45 and ODE23S and note that ODE45 will take much longer than ODE23S since this problem is numerically stiff. 22.1 Matlab Only do parts (b) and (c). The ( x , T ) values for the analytic solution are provided in the answers below. Answers 20.1 (a) Analytic Solution (b) Euler with h = 0.5 2 Euler with h = 0.25 (c) Midpoint (this answer is incorrect – the first dy/dt calculation should be -1.1) (d) RK4 (this answer is incorrect – the first dy/dt calculation should be -1.1) All solutions plotted on the same figure: 3 20.9 20.15 21.3 After iterating the correction, y (2.5) = 3.271558, a ε = 0.061 21.6 4 21.11 22.1 Analytic solution at specified x locations: (b) 5 (c)...
View Full Document

{[ snackBarMessage ]}

### Page1 / 5

HW_Assignment_7 - Matlab Use ODE45 and ODE23S and note that...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online