Homework 7 for CPS615
Table of Contents
Description of Problems
The method named after Runge and Kutta are designed to imitate
the Taylor series method without requiring analytic differentiation
of the original differential equation. In this problem,
I wrote the ordinary diffrential equation solver by using
RUNGE-KUTTA(order four) Algorithm. Problem is to solve the initial value problem
y' = y - ( t ** 2 ) + 1
0 <= t <= 2
y(0) = 0.5
Solution will be generated for the time points
t = 0.0, 0.2, 0.4, ... , 2.0
More efficient methods can be devised to solve ordinary differential
equations if several of the values x(t), x(t-h), x(t-2h),... are used
in computing x(t+h). Such methods are called multistep methoss. They have
the obvious drawback that at the beginning of the numerical solution,
no prior values of x are available. So it is usual to start a numerical
solution with a single step method, such as Runge-Kutta procedure.
In this problem, I wrote the ordinary diffrential equation solver by
using Adams Fourth-Order Predictor-Corrector algorithm.
Problem is to solve the initial value problem
y' = y - ( t ** 2 ) + 1
0 <= t <= 2
y(0) = 0.5
Solution will be generated for the time points
t = 0.0, 0.2, 0.4, ... , 2.0
To compile my program(ode1.c and
ode2.c ), you can just type as
gcc -o prob1 ode1.c
gcc -o prob2 ode2.c
And to run the program,
prob1 > out_file_name
prob2 > out_file_name
or
prob1
prob2