User:Ramiamro

From Wikiversity
Jump to navigation Jump to search

Project Report for User:Ramiamro[edit]

For Introduction to Numerical Analysis, Fall 2010.

Introduction[edit]

the project intended to clarify the concept of the stability of w:ordinary differential equations' Methods, and especially Runge-Kutta methods of order four RK4,it is also discussing the shape of the absulute stability regions for each method, many examples, quizes , and exercises have been established on wikiversity and wikipediaw:stiff equation, this establishment focused on users who have little experience with stability, such that thay can grasb the concept of absolute stability[1] as well as A/L- stablility, more over the project studies particular examples of finding the characteristic polynomial for the multistep methods.

To operate numerical methods on stiff equations and get good approximation for the exact solution; methods with special stability are required, like A-stable or L-stable methods, if the method is applied with h>0 to the test equation then for A-stable method, it will produce approximation function to the exact solution which will be proportional to , the approximation function will be bounded by 1 in the left half of the complex plane, which gave us the stability region, and so we can chose the step size which suitable for a certain kind of equation using that method.

Initial Experience[edit]

During the course and in courses before I introduced to many types of stabilities, but each time I have those we talked about similar diffenetions of stability in different topics, like stability for ODE's and stability of nonlinear systems, as well the stability for physical systems.
To study stability it is important to define the area you study in, the stability diffinitions are similar but at the same time time they are significantly different in details; in numerical analysis we talk about the stability of the method when we apply it to a certain type of equations. i.e. the test equation, our cocentration during this course was on the stiff equation, which is a differential equation that shows wide variance in the results as a result of small changes in the argument (the independent variable), some of the numerical methods shows very good stability when treating such kind of equations, specially the implicit methods, we will see during the project how the explicit methods Rk4 , and others how they behave when they employed to simulate the exact solutions of those equations.these modifications manifisted in posting some diffinitions and an example on the wikipedia page w:stiff equation, and some in quizes and excercices on my wikiversity user page, these changes took place because I found they are not clearly discussed on the wikipedia page, although my changes my be in the hand or the minds of others, but I beleive I made a better way of understandig the concept of stability for the Numerical methods more clearer, and easily comprehended especially by using the conceptual quiz I posted on wikiversity down.

Main Project[edit]

Motivation[edit]

During the couse, we covered so many topics, and I barely remeber that any class passed without asking or discussing the error propagations in the numerical method which is implicitly implies whether the numerical method is stable or not, on the other hand during the second half of the course these cries increased and I felt that the stability topic is not clear for some of the students, due to the time limitations of the class and the poorley expressed ideas on wikipedia I made my point to clarify this topic more and make it easier to comprehend, so I established my project with a hard base to study the stability of the numerical method such that I introduced the reader to basic diffinitions in this topic, so he can cope up with the flow of the material later on, and made sure the reader will not losely use the concept later on, then moved to show some examples "mine and others on wikipedia" so that he/she get experience with the difinitions

Proposed Changes[edit]

my proposed changes were considering,changes to the following subtopics:

  • Stability regions for RK methods.
  • Stability regions for multistep method.
  • The characteristic functions and how to find it.
  • Solving a system of differential equations using Rk4 method.
  • plotting the stability regions.
  • Quizes related to the topic: stability of ODEs' methods.
  • Excercises related to the same topic.

Actual Changes[edit]

I almost covered my plan, but I did too much in RK methods than the implicit multistep analysis, one thing that I didn't cover is the application of RK4 to a system of differential equations, the idea is fancy to be discussed on wikipedia, since very little details written about it, and it is worthy to show some hidden details, most books they just give the general formula to apply that method to a system of differential equations.

I starrted my project with a number of definitions such as consistency, convergense, and absolute stability,then followed by a theorem which uses those concepts, the theorem shows some results concerning stability and convergence of the numerical methods both single and multistep methods, this is an excution for what I proposed about the multistep method, in addition to excercises that covers finding the characteristic polynomial for RK2 method, and a nother method.

The rest of my proposed changes has been covered and an example to show how to find the stability polynomial for five types of RK4, including the classical case, A matlab code was shown and tested to generate the stability region for the five cases,In fact I generated the stability regions for the five cases and compared the with other resources, An image of the generated stability region was published on w:stiff equation , all the changes have been published to the wikipedia. concerning the quizes part I managed to write 13 conceptual quizes, since finding numerical quiz in this topic is really long way, so I just posted the 13 questions on wikiversity below, any user can also access them from user:Mjmohio, under Numerical ordinary differential equations[2]

Excercises have been developed, I published basically tow questions, divided them to five guiding excercises, and arranged them in chronological order in terms of solving for the stability region, and testing wether the the numerical method is stable or not.During the exercises I clarified the L-stability concept by solving and discussing an L-stable method,

Definitions[edit]

let is the local truncation error, and k is the number of time steps, then:

  1. The numerical method is consistent with a differential equation if
    over .
    according to this definition w:Euler's method is consistent.
  2. A numerical method is said be convergent with respect to differential equation if
    over ;
    where is the approximation for .
  3. A numerical method is stable if small change in the initial conditions or data, produce a correspondingly small change in the subsequent approximations.

Theorem: For an initial value problem

with

and certain initial conditions, , let us consider a numerical method of the form

and .

If there exists a value such that it is continuous on the iterative domain, and if there exists an such that

for all ,

the method fulfills the w:Lipschitz condition, and it is stable and convergent if and only if it is consistent. That is,

for all .

For a similar argument, one can deduce the following for multi- step methods:

  1. The method is stable if and only if all roots, , of the characteristic polynomial satisfy
    ,
    and any root of
    is simple root.
  2. one more result is that if the method is consistent with the differential equation, the method is stable if and only if it it is convergent.

see [3]

stability polynomials of Runge-Kutta methods[edit]

The w:Runge–Kutta methods are very usefull in solving systems of differential equations, it has wide applications for the scientists and the engineers, as well as for the economical models, the recognized with their practical accuracy where we can use and get very good results and approximations when solving an ODE problem, RK has the general form :,

Example:finding the stability polynomial for RK4's methods[edit]

for RK4" case", which characterizes by which has the form: the stability region is found by applying the method to the linear test equation

the stability region is found by applying the method to the linear test equation

using the linearized equation , we get

substitue these back in , yields

and so the characteristic polynomial

for the absolute stability region for this method, set |R(z)|<1, and so we get the region in figue1. case

the table below shows the final forms for the stability function for different forms of RK4, these RK4's are different in the values of , and they are fullfilling the consistencty requirement for the method i.e :

case# stability function
caseI
caseII_a
caseII_b
caseIII
caseIV
classical Rk


see [4] to find the table

Plotting the stability region[edit]

Ramistimages.jpg

In order to plot the stability region, we can set the stability function to be bounded by 1 and solve for the values of z, then draw z in the complex plane. Since R(z) is the unit circle in the complex plane, each point on the boundary can be represented as and so by changing over the interval, we can draw the boundaries of that region. The following w:OCTAVE/Matlab code does this by plotting contour curves until reaching the boudaries:

[x,y] = meshgrid(-6:0.01:6,-6:0.01:6);
z = x+i*y;
R = 1+z+0.5*z^2+(1/6)*z^3+(1/24)*z^4;
zlevel = abs(z);
contour(x,y,zlevel,[1 1]);

The figure at right shows the absolute stability regions for RK4 cases which is tabulated above[5]

Quizes[edit]

1

the A-stability is characterized by:

all the points in the left half of the complex plane .
it a special case of the absolute stability.
inludes all ,
all of the above

2

Euler method is:

A-stable
not A-stable

3

the absolute stability region for RK4 is greater than the A-stability region for the same method:

false
True
True for certain values of .

4

A numerical method is stable if :

small change in the initial condition will produce small change in subsequent steps.
small change in the initial condition will produce huge change in subsequent steps.
big change in the initial conditions produce oscillatory solution at the end.

5

is always a root of the characteristic polynomial of the multistep method:

True
False
usually not the case

6

the root of the C.P. can be real or complex,and the method still be stable:

True
False

7

A multi- step method is strongly stable if :

is the only root of magnitude 1 .
all other roots has magnitude <1
the first and the second sentence
just one root inside the unit circle if it has more than one .

8

if more than one root has magnitude equal to 1, and the others are less than one, the method is

strongly stable.
A-stable
weakly stable.
Unstable.

9

The numerical method is unstable if

for at least one root
for at least one root
for at least one root
the firs and the second sentences.

10

the absolute stabity region for the explicit Euler's method is

unit cicle in the complex plane, its center shifted to the left, by one unit.
unit cicle in the complex plane, its center shifted to the rigt, by one unit.
the whole left side of the complex plane.
the method is unstable.

11

None of the RK methods is A-Stable:

True
False

12

All explicit methods are :

A-Stable
Not A-Stable.
Unstable.
None of the above

13

implicit multistep methods are A-stable if the have order at most

1
2
3
they are always A-stable.


Exercises[edit]

Ex:1[edit]

find the stability function for RK2 which is given by:

Ex:2[edit]

find the absolute stability region for RK2.

Ex:3[edit]

find the characteristic polynomial for RK2.

Ex:4[edit]

is RK2 stable, if it is what type of stability.


Ex:5[edit]

Determine the stability of Back ward Euler method.

Conclusions[edit]

During this project, I searched about five resources and other internet websites to weave my ideas and make them as clear as possible, I used examples to clarify the definitions and the theory, I found that Rk methods of order one and the higher orders are cositent with stiff problems [6], and so they are convergent, see the proof on [7], and so when we use RK methods we will not be worried if the method is consistent or not. Using any method to simulate the exact solution for any kind of ODE's is dependent on the absolute stability region, and so the choice of the time step will depend on the roots of the characteristic polynomial, if the complex number should satisfy the condition that the absolut value of the stability polynomial should be strictly less than one, otherwise the method will not be stable, and the results will be far from the accuracy.

On the other hand, theory should be clarified by examples, it wasn't easy to find the stability polynomial for Rk methods, one should be very carefull when use the parantheses, see the example above, missing of one parantheses will leed to a different stability polynomial and so leads to a different stability region, which in role means different method.

Conceptual quiz was very neat to clarify the concepts, and so I included so many of them, they expressing the definition of the absolute stability, A-stability, strong and weak stability, and L-stability; see exercises above, they inclded more about stability properties of RK methods, and recruiting the attention of the reader to some general rules and corollaries that is not of first look to catch and comprehend. I finished my main modifications on wikipedia by showing a sample matlab code how to plot the stability regions,the code is working efficiently, and gives accurate results, see [8].

Note: it is worthy to mention, that during my writings I noticed that some resources define the stability region to be [9]. But on [w:stiff equation] the definition doesn't include 1

References[edit]

  • Eberly, David (2008), stability analysis for systems of defferential equation.[10]
  • Ababneh, Osama; Ahmad, Rokiah; Ismail, Eddie (2009), "on cases of fourth-order Runge-Kutta methods", European journal of scientific Research.[11]
  • Mathews, John; Fink, Kurtis (1992), numerical methods using matlab.
  • Stability of Runge-Kutta Methods [12]