CMP305 Lecture on Numerical Methods IV Initial Value Problems for Ordinary Differential Equations
CMP305 Lecture on Numerical Methods IV Initial Value Problems for Ordinary Differential Equations
3
7.1 Introduction to Initial Value Problems
• An initial value problem for an ordinary differential equation is typically expressed as:
•where:
dy/dt represents the rate of change of the unknown function y(t).
f(t, y) is a known function defining the ODE.
t0 is the initial time.
y0 is the initial value of y at time t0.
•The goal is to find the function y(t) that satisfies the ODE and the initial condition.
4
7.2 Numerical Methods for Initial Value
Problems
• Numerical methods for solving IVPs provide approximations to the solution at discrete time points. These
methods can handle a wide range of ODEs, including stiff and non-stiff problems. Common numerical
methods include:
• 7.2.1 Euler's Method
• 7.2.2 Runge-Kutta Methods
• 7.2.3 Stability and Stiffness
5
7.2.1 Euler's Method
6
7.2.2 Runge-Kutta Methods
7
7.2.3 Stability and Stiffness
8
7.3 Error Control
• To ensure the accuracy of the numerical solution,
error control mechanisms are often implemented.
• These include adaptive time-stepping, where the step
size is adjusted based on the local error estimate, and
global error tolerances, which determine the overall
accuracy of the solution.
9
7.4 Higher-Order ODEs
• Higher-order ODEs can be reduced to a system of first-order ODEs and solved
using the techniques discussed above. For example, a second-order ODE can be
transformed into two first-order ODEs:
10
7.5 Applications
•Numerical methods for initial value problems find application in a wide range of fields:
Physics: Simulating the motion of objects, predicting trajectories of celestial bodies, and modeling quantum
systems.
Engineering: Analyzing electrical circuits, solving control system equations, and optimizing designs in
various disciplines.
Biology: Modeling population dynamics, simulating chemical reactions, and understanding biological
processes.
Economics: Evaluating economic models, forecasting economic indicators, and optimizing resource
allocation.
Climate Science: Simulating climate models to study global climate change and predict weather patterns.
11
Christmas Assignment
• Write a Python code for Euler’s or Runge-Kutta’s method to solve the
problem in the lecture slides
12