Homework 9: Solving Differential Equations using Euler and Runge-Kutta Methods, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Four problems aimed at solving differential equations using euler and runge-kutta methods. The problems involve finding the existence interval and uniqueness of solutions, deriving modified euler's method, and applying the fourth-order runge-kutta method to a second-order differential equation. The document also includes instructions for writing programs to solve the equations and comparing the numerical solutions with the exact solutions.

Typology: Assignments

Pre 2010

Uploaded on 02/10/2009

koofers-user-y50
koofers-user-y50 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Homework 9
Problem 1
Given x0(t) = x2,x(0) = 1. Find the interval where the solution exists and determine
whether or not the solution is unique. Compare the interval of existence with the one that
corresponds to the exact solution.
Problem 2
Derive the modified Euler’s method,
x(t+h) = x(t) + h(f(t+ 0.5h), x(t) + 0.5hf(t, x(t)))
by performing Richardson’s extrapolation on Euler’s method using step sizes hand h/2.
Problem 3
Show that when the fourth-order Runge-Kutta method is applied to the problem x0(t) =
λx the formula for advancing this solution will be
x(t+h) = [1 + +1
2h2λ2+1
6h3λ3+1
24h4λ4]x(t).
Problem 4
Consider the following equation
x00 + 4x= 0 (1)
with x(0) = 0, x0(0) = 1. This equation describes the motion of an undamped 2 spring-
mass system. The system possesses energy conservation property, i.e., the sum of kinetic
(0.5x0(t)2) and potential (2x2) energies are constant
E(t) = 1
2x(t)02+ 2x(t)2=1
2x(0)02+ 2x(0)2.(2)
a) Write a program for solving the equation using forward Euler method
b) Write a program for solving the equation using fourth order Runge-Kutta method
Compare the numerical solution with the exact solution. Calculate the energy and com-
pare with constant energy corresponding to the exact solution.
Use dt(= h) = 0.1, N= 5000, where Nis the total number of time steps.
1

Partial preview of the text

Download Homework 9: Solving Differential Equations using Euler and Runge-Kutta Methods and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Homework 9

Problem 1

Given x′(t) = x^2 , x(0) = 1. Find the interval where the solution exists and determine whether or not the solution is unique. Compare the interval of existence with the one that corresponds to the exact solution.

Problem 2

Derive the modified Euler’s method,

x(t + h) = x(t) + h(f (t + 0. 5 h), x(t) + 0. 5 hf (t, x(t)))

by performing Richardson’s extrapolation on Euler’s method using step sizes h and h/2.

Problem 3

Show that when the fourth-order Runge-Kutta method is applied to the problem x′(t) = λx the formula for advancing this solution will be

x(t + h) = [1 + hλ +

h^2 λ^2 +

h^3 λ^3 +

h^4 λ^4 ]x(t).

Problem 4

Consider the following equation x′′^ + 4x = 0 (1)

with x(0) = 0, x′(0) = 1. This equation describes the motion of an undamped 2 spring- mass system. The system possesses energy conservation property, i.e., the sum of kinetic (0. 5 x′(t)^2 ) and potential (2x^2 ) energies are constant

E(t) =

x(t)′^2 + 2x(t)^2 =

x(0)′^2 + 2x(0)^2. (2)

a) Write a program for solving the equation using forward Euler method b) Write a program for solving the equation using fourth order Runge-Kutta method Compare the numerical solution with the exact solution. Calculate the energy and com- pare with constant energy corresponding to the exact solution. Use dt(= h) = 0.1, N = 5000, where N is the total number of time steps.