0 Up votes0 Down votes

95 views46 pagesnumerical methods

Mar 11, 2014

© Attribution Non-Commercial (BY-NC)

DOC, PDF, TXT or read online from Scribd

numerical methods

Attribution Non-Commercial (BY-NC)

95 views

numerical methods

Attribution Non-Commercial (BY-NC)

- mmn_486
- Potential Assignment MCEN90008 2016
- Rr10202 Information Technology and Numerical Methods
- BCA.pdf
- Numerical Methods
- numerical methods.pdf
- Numerical methods
- Sample.doc
- Construction of New NSFDS for Free Undamped Harmonic Oscillator
- 55-904-1-PB.pdf
- 27 study
- When We Use Numerical Solution EXCEPT Analytical Solution
- TeachingPlan BACS 1263
- linear
- Pressure Swing Using Mathematical Reltion
- Analiza Numerica [Utm, Bostan v.]
- ZHAVUXS54RGGWY0W87LKOA_IITD_CRSEOFF
- ENM212.pdf
- Shooting Method 5
- Numerical Methods

You are on page 1of 46

5. NUMERICAL METHODS

5.0 INTRODUCTION

One of the most important tasks in a study of dynamical systems is the numerical calculation of the trajectories. Thus far we have considered the integration method to be a black box into which we pop the system, initial conditions, method and time range and out pops a plot of the trajectories. Although this approach is common in courses on dynamical systems it obscures many of the pitfalls of numerical integration. It is not possible at the present state of the art to choose a best! algorithm for the calculation of trajectories. There are several types of numerical algorithm, each with their own advantages and disadvantages. "e shall consider a class of methods known as discrete variable methods. These methods approximate the continuous time dynamical system by a discrete time system. This means that we are not really simulating the continuous system but a discrete system which may have different dynamical properties. This is an extremely important point. The discrete variable methods which we consider fall into two main types, RungeKutta methods and Linear Multistep methods. #aple has implementations of both types of method as well as a number of more sophisticated techni$ues designed to overcome some of the pitfalls of numerical solution. The more sophisticated methods still fall into the discrete variable category.

5.1

TYPES O METHOD

Although the dynamical systems which we are simulating are usually in more than one dimension we can, without loss, restrict our numercal anlaysis of the methods to the single non&autonomous differential e$uation = f t, x x

bg

subject to the initial condition x t ' = x' . "e shall usually refer to the differential e$uation together with the initial condition as an initial value problem (I)*+. ,iscrete variable methods yield a series of approximations X n x (tn + on the set of points t n +- = t n + h , where h is the stepsi.e. Ta!lor Ser"es Metho# These methods are based on the Taylor series expansion h% h0 x (t n + + x (t n + + %/ 0/ n = ',- N

bg

(t n + + x (t n +- + = x ( t n + + hx

If the series is truncated and x (t n + is replaced by the approximation X n we obtain the Taylor Series Method of order p h % h 0 h p ( p+ X n +- = X n + hX n + Xn + X n ++ Xn %/ 0/ p/

where X ( p +

dpX . dt p

Although there is an implementation of this method in #aple it is not much used in practice due to the necessity of computing the higher order derivatives of X. "e shall only use it as a reference method when discussing the accuracy of other methods. R$%&e'($tta Metho#s These methods are based on the notion of finding a formula which agrees with the Taylor series as closely as possible without involving derivatives. 1or example consider the possibility of matching the second order Taylor series method

%

(t , x , h+ = f (t , x + + f (t + ah, x + bhf (t , x ++

The e$uivalent Taylor series expression to (t , x , h+ is

(t + + ( t , x , h+ = x

h (t + x % h f t (t , x + + f x (t , x + f (t , x + % hg b gives

= f (t , x + +

(t , x , h+ = ( + + f (t , x + + h af t (t , x + + bf x (t , x + f (t , x + + (h % +

3

+ = -,

resulting in the family of solutions

a = % ,

b =

= - ,

= ,

a=b=

X n +- = X n +

h f (t n , X n + + f t n + h, X n + hf (t n , X n + %

h X n +- = X n + hf t n + h % , X n + % f (t n , X n +

5nfortunately the terminology for naming second order 6unge&7utta methods is not standardised and #aple calls the improved 2uler method the 8eun formula and the modified 2uler method the improved polygon method. The procedure above can be extended to give higher order methods such as the classical "th order method h X n +- = X n + ( #- + % # % + % # 0 + # 3 + 9 #- = f ( t n , X n +

#% = f (t n + % h, X n + % h#- + #0 = f (tn + % h, X n + % h# % +

# 3 = f (t n + h, X n + h# 0 +

L"%ear M$lt"ste) Metho#s These methods are based on integration of an interpolating polynomial having the values f n f (t n , X n + on a set of points t n at which X n has already been computed. ;y integrating = f t, x x

bg

x t n +- x t n =

b g bg z f (t , x+dt

t n+tn

t n+tn n

x t n +- x t n

n +n +-

fn +

t tn f n +- dt t n +- t n

O P Q

Integrating gives f +f g b g bg h b %

n n +-

x t n +- x t n

X n +- = X n +

# #

% X n + % = h % f n + % ,

% =' % ='

n = ',-,%,

where % and % are constants, # ' . This formula is called a linear #-step method. In order to generate the se$uence of approximations X n it is first necessary to obtain # starting values X ' , X - , , X # - . If # = ' the method is explicit. If # ' then the method is implicit and leads to a non&linear e$uation for X n + # . The main methods of this type which we shall consider are< &dams-'ashforth These methods are explicit with methods of order # being #&step. #ethods of order from one to three have the formulae X n +- = X n + hf t n , X n X n +- = X n X n +- = X n

n

l q

b g h + m 0f b t ,X g fb t ,X g r % h + m %0 f b t ,X g -9 f b t ,X g +:f b t ,X g r -%

n n n n n n n n % n %

The first order method is more normally called the !uler method. &dams-Moulton These methods are implicit with methods of order # being # - &step. #ethods of order from one to three have the formulae X n +- = X n + hf t n +- , X n +X n +- = X n X n +- = X n

n +-

b g

b g h + m fb t ,X g + fb t ,X g r % h + m :f b t ,X g +=f b t ,X g fb t ,X g r -%

n +n n n +n +n n n n -

The first order method is called the backward 2uler formula and the second order method is the Trape.oidal method.

>

(ear Methods These methods are implicit with methods of order # being #&step. #ethods of order from one to three have the formulae X n +- = X n + hf t n +- , X n +X n +- = X n +- =

0 n n -

--

%h + fb t ,X g l3 X X q 0 9h + fb t ,X g l-= X ? X + % X q -n +n +n n n% n +n +-

5.*

MAPLE IMPLEMENTATION

#aple contains a large range of numerical procedures for integrating non& autonomous dynamical systems of the type = , t,+ , + t =+ b g +bg

'

'

All of these procedures are invoked using the #aple dsolve command with the numeric option. The syntax for the command is dsolve(de$ns, vars, type@numeric, options+ where de$ns defines the system of differential e$uations and initial values, vars defines the dependent and independent variables, type@numeric tells #aple to use a numerical algorithm and options allows a choice of method, stepsi.e and other options associated with the method. The default method is a 1ehlberg fourth&fifth order 6unge&7utta method.

As an example consider the solution of the )an der *ol e$uation written as the first order system =y x

= x + - x% + y y

c h

A epsilon<@-'< A ivp <@ Bdiff(x(t+,t+@y(t+,diff(y(t+,t+@&x(t+CepsilonD(-&x(t+E%+Dy(t+, x('+@',y('+@'.:F< A fcns <@ Bx(t+, y(t+F< This defines the initial value problem. Gow we invoke dsolve A p-<@ dsolve(ivp,fcns,type@numeric+H p) <@ )roc (r#f"*+x+ ... e%#

Gote that the output from the dsolve command is a procedure. In order to find the numerical solution we need to evaluate the procedure at the appropriate value of t. A p-(-'+H I t =-', x( t + =&-.>39=9%3990':3==, y( t + =.'=3>9''>'%:=--3>3 J

"e can us the #aple odeplot command to graph the solution. This command is in the plots package so this has to be loaded first. A with(plots+<

Gow we can plot the solution in various ways. 1irstly here is a plot of the solution components v t over the range I',%'J. numpoints controls the number of plotted points which needs to be relatively high here to obtain a realistic plot. A odeplot(p-,IIt,x(t+J,It,y(t+JJ,'..%', numpoints@:''+H

-'

Class"cal Metho#s #aple contains a number of one&step methods for the numerical solution of initial value problems. These are referred to as classical methods and are invoked by including the option method@classicalItypeJ in the call to dsolve. 8ere type can be one of foreuler heunform impoly rk% rk0 rk3 adambash abmoulton the forward 2uler methodH the 8eun formula (also known as the trape.oidal rule, or the improved 2uler method+H the improved polygon method (also known as the modified 2uler method+H the second&order classical 6unge&7utta methodH the third&order classical 6unge&7utta methodH the fourth&order classical 6unge&7utta methodH the Adams&;ashford method (a KpredictorK method+H the Adams&;ashford&#oulton method (a Kpredictor& correctorK method+. If no type is specified the forward 2uler method is used.

--

b g

"e can define this in #aple as A ivp<@Bdiff(y(x+,x+@&%DxDy(x+E%,y('+@-F< In this case #aple can find the exact solution using dsolve A 2xactsoln<@rhs(dsolve(ivp,y(x+++H x % +-

!xactsoln <@

Gow we use 2ulerLs method to obtain the numerical solution. Gote that this method like all the other methods of type classical uses a fixed stepsi.e which we provide. A es'<@dsolve(ivp,y(x+,type@numeric, method@classicalIforeulerJ,stepsi.e@'.''-+< Thus we can find the solution at x = '.3 A es'('.3+H I x =.3, y( x + =.=9%0'=:'?>3-3'99 J

-%

Gow often we want to investigate how the solution behaves for differing values of the stepsi.e h. In order to do this we can define a different version of the function for the numerical solution which uses the stepsi.e as one of the input parameters A es-<@h&Adsolve(ivp,y(x+,type@numeric, method@classicalIforeulerJ,stepsi.e@h+< Thus we can obtain the solution for different stepsi.es A es-('.''-+('.3+H I x =.3, y( x + =.=9%0'=:'?>3-3'99 J A es-('.'-+('.3+H I x =.3, y( x + =.=933=3?%3==?'3?% J

"e can compare the solution at different stepsi.es by constructing a table of values as follows< 1irstly define the output points A x<@k&AkD'.-<

-0

Gow define a function which finds the approximate solution at a given output point A 2ulerMoln<@(x,h+&Arhs(es-(h+(x+I%J+< ,efine the exact solution A 2xactMoln<@x&A-N(-CxE%+H - +x %

!xactSoln <@ x

4onstruct an array whose elements compare the exact solution to the numerical solution for three different stepsi.es. A mm<@array(-..=,-..:+< mmI-,-J<@Ox(k+O<mmI-,%J<@O2xactsolnO<mmI-,0J<@Oh@'.-O< mmI-,3J<@Oh@'.'-O<mmI-,:J<@Oh@'.''-O< for i from % to = do mmIi,-J<@'.-D(i&%+< mmIi,%J<@evalf(2xactMoln(x(i&%++,:+< for j from 0 to : do mmIi,jJ<@evalf(2ulerMoln(x(i&%+,-'E(&jC%++,:+ od< od< A eval(mm+H x,#- !xact soln ' -. ..??'-' .% .?9-:3 .0 .?->30 .3 .=9%'> .: .='''' .9 .>0:%? h./0) h./0/) -. -. -. .??-'> .?=''' .?900' .?3-:= .?-?9? .===0? .=933= .=%:%: .='%%? .>:>-: .>0>%>

-3

Another possibility is to compare the errors at each stepsi.e. 1irstly define a function giving the error A err<@(x,h+&A2xactMoln(x+&2ulerMoln(x,h+< A tt<@array(-..=,-..3+< ttI-,-J<@Ox(k+O<ttI-,%J<@Oh@'.-O<ttI-,0J<@Oh@'.'-O<ttI-,3J<@Oh@'.''-O< for i from % to = do ttIi,-J<@'.-D(i&%+H for j from % to 3 do ttIi,jJ<@evalf(err(x(i&%+,-'E(&jC-++,:+H od< od< A eval(tt+H x,# ' . .% .0 .3 .: .9 h./0) ' &.''??' &.'-=39 &.'%3-: &.'%90% &.'%:%: &.'%-=9 h./0/) ' &.'''?> &.''->9 &.''%%9 &.''%3&.''%%? &.''-?= h./0//) ' &.'''-' &.'''-> &.'''%0 &.'''%3 &.'''%0 &.'''%'

b g

A I)*<@Bdiff(y(x+,x+@&3Dy(x+C3Dx,y('+@-F<

-:

5se the %nd order classical 6unge&7utta method A rk%<@h&Adsolve(I)*,y(x+,type@numeric,method@classicalIrk%J,stepsi.e@h+< A x<@k&AkD'.:< A 67%Moln<@(x,h+&Arhs(rk%(h+(x+I%J+< A 2xactMoln<@x&Ax&-N3C:N3Dexp(&3Dx+H - : ( 3 x + !xactSoln <@ x x + e 3 3

A mm<@array(-..-',-..:+< mmI-,-J<@Ox(k+O<mmI-,%J<@O2xactsolnO<mmI-,0J<@Oh@'.%:O< mmI-,3J<@Oh@'.:O<mmI-,:J<@Oh@'.>:O< for i from % to -' do mmIi,-J<@'.:D(i&%+< mmIi,%J<@evalf(2xactMoln(x(i&%++,:+< for j from 0 to : do mmIi,jJ<@evalf(67%Moln(x(i&%+,'.%:D(j&%++,:+ odH od< A eval(nm+H

-9

x,#- !xact soln ' -. .: .3-?-= -.' .>>%?' -.: -.%:0 %.' -.>:'3 %.: %.%:' 0.' %.>:'' 0.: 0.%:'' 3.' 0.>:''

Gote that as the stepsi.e is increased the numerical solution fails to represent the exact solution accurately. Indeed for a stepsi.e of '.>: the numerical solution Lblows upL. This is due to non&convergence as a result of the numerical method becoming unstable. "e shall consider this phenomenon next.

->

E+erc"ses 1 -. 5se the classical numerical methods foreuler, heunform, rk0, rk3 and adambash to attempt to obtain a numerical solution of the I)*s dx = %tx % , x ' = dt dx = :x - x , x ' = '.: dt

(a+

b g

(b+

b gb g

5se a range of stepsi.es in the interval I',-J. At what approximate value of the stepsi.e do the methods become unstable. %. 5se each of the methods above to solve the systems of differential e$uations = x + xy , x = y xy , y = y, x = x + (- x + y , y

%

(a+

(b+

(c+

In each case use odeplot to obtain time series and phase plots.

-=

5.3

The output of a discrete variable method is a set of points t n , X n and the output of the dynamical system is a continuous trajectory x t . 1or the numerical results to provide a good approximation to the trajectory we re$uire that the difference X N x tN < where is some defined error tolerance, at each solution point. This difference is called the global error and is the accumulated error over all solution steps. 5nfortunately it is extremely difficult to accomplish this and we have to confine ourselves to controlling the local error P X n x tn

b g

bg

bg

P at each step where X n is the numerical solution obtained on the assumption that the numerical solution at the previous solution point is exact. There are two sources of local error,the roundoff error and the truncation error. Ro$%#o,, Error The roundoff error is the error which arises from the fact that numerical methods are implemented on digital computers which only calculate results to a fixed precision which is dependent on the computer system used. Gote that since roundoff errors depend only on the number and type of arithmetic operations per step and is thus independent of the integration stepsi.e h. Tr$%cat"o% Error The truncation error of a numerical method results from the approximation of a continuous dynamical system by a discrete one. The truncation error is machine independent, depending only on the algorithm used and the stepsi.e h.

-?

An important concept in the analysis of the truncation error is that of consistency. ;asically consistency re$uires that the discrete variable method becomes an exact representation of the dynamical system as the stepsi.e h ' . 4onsistency conditions can be derived for both Qinear #ultistep and 6unge&7utta methods. Linear Multistep Methods 4onsider the general linear multistep method

# #

% X n + % = h % f n + % ,

% =' % ='

n = ',-,%,

#

( + = i i

i ='

#

( + = i i

i ='

(-+ = ',

(-+ = (-+

Runge-Kutta Methods The general pth order 6unge&7utta method can be written in the form

%'

3n +- = 3n + h c r # r #- = f t n , X n #r

n

b g F = fG t + ha , X H

r

r =-

n + h brs # s , s =-

I J K

r = %,0, p

8ere we have

m

bg

(-+ = ',

c

r =-

= (-+

-or.e# E+a/)le 6

2xamine the consistency of (a+ the classical 3th order 6unge&7utta method, (b+ the two&step Adams&;ashforth method.

3

(a+

( + = ( + = -

c

r =-

- - - + + + =9 0 0 9

thus

3

(-+ = '

(-+ = - = cr

r =-

%-

(b+

( + = % ( + = % -

0 ( + = % %

thus

(-+ = '

and hence the method is consistent.

(-+ = - = (-+

The accuracy with which a consistent numerical method represents a dynamical system is determined by the order of consistency. The method of determining this is best illustrated by an example. -or.e# E+a/)le 5

,etermine the order of consistency of the Trape.oidal method. The order of consistency is determined by substituting the exact solution xn into the formula of the numerical algorithm and expanding the difference between the two sides of the formual by Taylor series. The result is then normalised by multiplying by the scaling factor . - h

b g

( + = ( + = thus

( + = + % %

(-+ = '

(-+ = - = (-+

%%

L O b g M P b gN Q -L h O +x g = M x x b x P hN % Q R U h h + x + hx x + x + | | % 9 -| | = S V I hF h h| +x + hx + x G x x +J| | | % % H K T W

= h xn +- xn f n + f n + - h %

n +n n n +0 % n n n n % n n n n n

h% xn + -%

The order is given by the highest power of h remaining. 8ence the method is consistent of order two.

%0

5.6

7ERO STA5ILITY

This is a problem peculiar to consistent linear #&step methods in which a first order dynamical system is integrated using a #th order difference e$uation. This leads to the possible existence of spurious solutions of the difference e$uation which can swamp the desired solution. In order to avoid this occuring we have to restrict the roots of the first characteristic polynomial to satisfy the root condition.

bg

De,"%"t"o% R Root 4ondition "e say that a linear #&step method satisfies the root condition if the roots of the characteristic polynomial ( + all lie within or on the unit circle, those on the unit circle being simple. Gote that the roots of ( + may be complex hence the necessity of considering the , in the definition. unit circle rather than the interval --

Theore/ 8 5ero-Stability A a linear #&step method is .ero stable if and only if it satisfies the root condition. "e can now state the fundamental theorem concerning convergence<

Theore/ ' 4onvergence A discrete variable method is convergent if and only if it is both consistent and .ero stable. Often it is desirable for the roots of ( + to satisfy the strong root condition.

%3

De,"%"t"o% R Strong Root 4ondition A linear #&step method is said to satisfy the strong root condition if the characteristic polynomial has a simple root at - = - and all the remaining roots lie strictly within the unit circle. The roots i , - i # of ( + for a consistent method satisfying the root condition can be categori.ed as

- = i , i -, % i # i , i = -, % i m i , i < -, m + - i #

-or.e# E+a/)le 9

X n +- =

l3 X

X n - +

t ,X g q %0h f b

n +n +-

is convegent. ;efore determining the characteristic polynomials write in the standard form %h f t # +% , X # +% 0

X # +% 3 0 X # +- + 0 X # =

Then

=% 3 0 + 0,

bg

% =% 0

bg

%:

4hecking consistency

- = - 3 0 + 0 = ',

b g

% - = % 3 0 = 0 = -

b g

b g

bg

bg = b 0 -g -g b

0

=% 3 0 + 0 = '

= -, 0 and hence the method is .ero&stable. 4ombining these results we can conclude that the method is convergent.

%9

h [ f n+% + (- ) f n +- f n ] %

X n +% (- + ) X n +- + X n =

is consistent and determine the value of the method. (b+ %. 1ind the range of values of Mhow that Tuade!s method

X n +3

= ( X n +0 X n +- ) X n = 9h ( f n +3 + 3 f n +0 + 3 f n +- + f n ) -? -?

is both consistent and .ero stable. 0. Mhow that the 0&step Sear method

(-= X n+% ? X n +- + % X n ) = 9h f n+0 ---

X n +0

%>

5.6

A5SOLUTE STA5ILITY

Mo far we have considered the behaviour of numerical methods in the limit as the stepsi.e h ' . 8owever in practice we must deal with finite stepsi.es. To illustrate the problems that might arise consider the mid&point method X n +- = X n - + %hf n This is a linear two&step method. In standard form the method is X n + % X n = %hf n +thus

= % -, = %

4hecking consistency

bg

bg

- = -% - = ',

b g

- = % - = -

b g

b g

The roots of are given by = - hence the method is both consistent and .ero& stable and hence convergent. Gow consider the solution of the initial value problem = %tx % , x x ' =-

bg

b g

by the mid&point method using a stepsi.e h = '. . 5sing #aple we define the initial value problem A f<@(t,x+&A&%DtDx(t+E%<x'<@-< A I)*<@Bdiff(x(t+,t+@f(t,x+,x('+@x'F< A 14G<@Bx(t+F<

%=

The mid&point method re$uires a starting value which can be obtained from the classical fourth order 6unge&7utta method A sv<@h&Adsolve(I)*,14G,type@numeric,method@classicalIrk3J,stepsi.e@h+< A M)<@(t,h+&Arhs(sv(h+(t+I%J+< Gow define the mid&point method A midpt<@proc(n,h+ option rememberH if n@- then M)(h,h+ elif n@% then x'C%DhDf(h,M)(h,h++ else midpt(n&%,h+C%DhDf((n&-+Dh,midpt(n&-,h++fiH end< Obtain a plot of the solution A plotmidpt<@proc(G,h+ local l,iH l<@IJH for i from - to G do l<@Iop(l+,iDh,midpt(i,h+JH odH pointplot(l,connect@true+H end< 1inally plot both the numerical and exact solutions

%?

Gotice that the numerical solution becomes increasingly innacurate, oscillating about the exact solution, as t increases. This behaviour arises because the behaviour of the numerical solution does not mimic that of the exact solution. In this case the problem arises because of a spurious solution of the difference e$uation corresponding to the root = - of . 8owever the problem can also arise in one&step methods which have no spurious solutions. 4onsider the Qinear #ultistep method.

# #

bg

i3n+i = h i f n+i

i =' i ='

0'

3

i ='

i n +i

= h i 3n +i

i ='

Thus

# #

i =' i ='

Qet 3n = n , then

# #

i i h i i = '

i =' i ='

8ence

( H h + ( + h ( + = ' ( H h + is called the stability polynomial of the method. Gow one of the roots - (h + will correspond to the true solution, the other roots will lead to spurious

solutions whose magnitude will have to be controlled to obtain stability. De,"%"t"o% R &bsolute Stability A numerical method is said to be absolutely stable for a given h if all the roots of

A region R & of the complex plane is said to be a region of absolute stability if the method is stable for all h in R & .

0-

-or.e# E+a/)le :

1ind and sketch the region of absolute stability for (a+ 2ulerLs method, (b+ Trape.oidal method. (a+ 1or 2ulerLs method

( H h + = (- + h +

Thus - + h < -

6A -% '

( H h + = -

Thus

0%

6A '

( H h + = - + ' h ' h

bg

where ' is a polynomial for an explicit method and a rational function for an implicit method.

00

-or.e# E+a/)le ;

1ind and sketch the absolute stability region for the second order 6unge&7utta method h #- + # % %

3n +- = 3n +

b g

where #- = f xn , 3n #%

n

b g = fb x + h, 3 + h# g

n -

n n

b g = fb x + h, 3 + h# g = h3 + h 3

% % n

F G H

I J K

( H h + = - + h +

F G H

h % % %

I J K

- + h +

03

In order to draw the region of absolute stability consider the boundary R & of R & . The locus of this boundary will be the set of complex numbers $ such that

-+ $ +

$% =%

Thus $% - + $ + = ei , %

' < %

In order to obtain the region we need to plot the roots of the $uadratic e$uation $ % + % $ + % %ei = ' for in the range ' < % . This is best done on a computer. The resulting stability region is shown below<

The method outlined above is an example of the boundary locus method which is easily implemented for Qinear #ultistep methods as follows. The stability polynomial is

0:

( H h + ( + h ( + = '

and hence

h =

( + ( +

but on R &

= -, thus

= ei ,

' < %

8ence the locus of the boundary R & is given by the set of complex numbers $ satisfying

$=

ch , c e h

ei

i

' < %

X n +- =

l3 X

X n - +

t ,X g q %0h f b

n +n +-

=% 3 0 + 0,

bg

% =% 0

bg

% % ( H h + % 3 0 + 0 0 h = '

09

$=

$=

In order to determine whether R & is the interior or exterior of the closed curve choose a point inside the curve, say $ = - and evaluate the roots of ( H h + .

% % % 3 0 + 0 0 = '

% 3 + - = ' 3 3% 3 = =% 0 % and we see that on of the roots, % + 0 , has modulus greater than one and hence R & must consist of the exterior of the closed curve.

0>

-or.e# E+a/)le 10

Mhow that the mid&point method X n +- = X n - + %hf t n , X n has an empty region of absolute stability. 1rom above

b g

= % -, = %

Thus the stability polynomial is given by

bg

bg

( H h + % - %h = '

Mubstituting $ = h and solving

$=

% %

$=

which does not bound any region of the complex plane. 8ence R & is empty.

0=

E+erc"ses 3 -. Mhow, using the boundary locus method, that Tuade!s method

= ( X n +0 X n +- ) X n = 9h ( f n +3 + 3 f n +0 + 3 f n +- + f n ) -? -?

X n +3

has no real region of absolute stability. %. ,etermine the regions of absolute stability of the methods

h ( %0 f n +% -9 f n +- + : f n ) -%

X n +0 = X n +% + X n +% = X n +- + X n +0 = X n +3 =

h ( : f n+% + = f n +- f n ) -%

0?

APPENDIX 1

3'

Metho#s E+erc"ses 1 -. 5se the method outlined in section to obtain tables comparing the exact and numerical solutions for a variety of stepsi.es. %. 5se the method outlined in section to obtain solutions and plots with the odeplot command. Co%s"ste%c! a%# 7ero Sta>"l"t! E+erc"ses *

0 % 3 0 bg bg - xn h + %3 0 xn h + -. (a+ Truncation error is -% order when = - . (b+ #ethod is .ero stable if - < - . 3 = = 0 + -? -, = %. = -? 9' -?

b g bg

b g

h h c hence maximum

3

bg b -g = ', b -g = bg bg

b g

9 -?

%3 0 %3 9 3 + -? + -? + -? , hence

bg

3 -?

03: -?

0 % 0 9 ? % 9 - = ', - = -= - and 0. = -= -- + -- -- , = -- , hence

bg

b g b g

b g

> %%

0? %%

3-

3%

APPENDIX 2

30

-or.e# E+a/)le 5 ' Deter/"%"%& The Or#er o, a N$/er"cal Metho# A restart< ,efine a function to represent the exact solution A x<@t&Ax(t+< 5se some aliases for the derivatives of x A alias(x-@,(x+,x%@(,UU%+(x+,x0@(,UU0+(x+,x3@(,UU3+(x+, x:@(,UU:+(x+,x9@(,UU9+(x+,x>@(,UU>+(x+,x=@(,UU=+(x++< 5se the taylor command to obtain a Taylor series expansion of x(tnCh+ A ts<@taylor(x(t+,t@tn,?+< 6eplace t&tn by h in the expansion A tsh<@subs(t&tn@h,ts+< 4onvert to a polynomial so that we can perform the algebra later A p<@unapply(convert(tsh,polynom+,h+< 6epeat above for xL(tnCh+ A dts<@taylor(x-(t+,t@tn,=+< A dtsh<@subs(t&tn@h,dts+< A dp<@unapply(convert(dtsh,polynom+,h+< 2ulerLs #ethod A simplify(p(h+&x(tn+&hDx-(tn++H Trape.oidal 6ule A simplify(p(h+&x(tn+&hD(x-(tn+Cdp(h++N%+H TuadeLs #ethod A simplify(p(3Dh+&=D(p(0Dh+&p(h++N-?&x(tn+&9DhD(dp(3Dh+C3Ddp(0Dh+C3Ddp(h+ Cx-(tn++N-?+H

33

-or.e# E+a/)le < A restart< A with(plots+< ,efine the characteristic polynomials A rho<@theta&AthetaE%&3DthetaN0C-N0H A sigma<@theta&A%N0DthetaE%H and the stability polynomial A pi<@theta&Arho(theta+&lambdaDhDsigma(theta+H Mubstitute . @ hDlambdaH A pi.<@theta&Arho(theta+&.Dsigma(theta+H ,efine the boundary of the region A rat<@solve(pi.(theta+,.+H A rat-<@subs(theta@exp(IDphi+,rat+H *lot the boundary A complexplot(rat-,phi@'..%D*i,numpoints@:''+H 4heck whether region is inside or outside closed curve A rs<@solve(subs(.@-,pi.(theta++@',theta+H #ust be outside.

3:

-or.e# E+a/)le 10 A restart< A with(plots+< ,efine the characteristic polynomials A rho<@theta&AthetaE%&-H A sigma<@theta&A%DthetaH 1ind the stability polynomial A pi<@theta&Arho(theta+&lambdaDhDsigma(theta+H A pi.<@theta&Arho(theta+&.Dsigma(theta+H Molve for . A rat<@solve(pi.(theta+,.+H Mubstitute theta @ eE(iDphi+H A rat-<@subs(theta@exp(IDphi+,rat+H Mimplify the result A simplify(rat-+H Thus empty region of absolute stability.

39

- mmn_486Uploaded byMuhammad Fakhruddin
- Potential Assignment MCEN90008 2016Uploaded byUmar Ashraf
- Rr10202 Information Technology and Numerical MethodsUploaded bySRINIVASA RAO GANTA
- BCA.pdfUploaded byERRohitMehra
- Numerical MethodsUploaded byadnan
- numerical methods.pdfUploaded byRaavan Ragav
- Numerical methodsUploaded byBryan Pajarito
- Sample.docUploaded byanon-220619
- Construction of New NSFDS for Free Undamped Harmonic OscillatorUploaded byAlexander Decker
- 27 studyUploaded byHarry Long
- When We Use Numerical Solution EXCEPT Analytical SolutionUploaded bySidra Kanwal
- Pressure Swing Using Mathematical ReltionUploaded bymimran007
- 55-904-1-PB.pdfUploaded byDazzel Bungor Macareza
- TeachingPlan BACS 1263Uploaded byDurah Afiqah
- Analiza Numerica [Utm, Bostan v.]Uploaded byBrailean Dumitru
- ZHAVUXS54RGGWY0W87LKOA_IITD_CRSEOFFUploaded byAdarsh Prasad
- linearUploaded bynarendra
- ENM212.pdfUploaded bygtgreat
- Shooting Method 5Uploaded byمرتضى عباس
- Numerical MethodsUploaded bysoccerboyred
- jitkumarUploaded byVarun Sogani
- BerkeleyUploaded byPepe Loco
- A Chebyshev Spectral Collocation Method for SolvingUploaded byGiovanniCuoco
- Lecture Module 1 - Introduction NewUploaded byAhmad Sabree Abdul Basit
- syllabus128aUploaded byjack
- Soils’ Pollutions by Petroleum Products Accounting for Biodegradation and Concentration-Dependent DiffusivityUploaded byIJAERS JOURNAL
- 1. Syallabus MA6459 NUMERICAL METHODS.pdfUploaded byHema priya
- Intronumericalrecipes v01 Chapter00 IntroUploaded byEnrique Flores
- Draft5Uploaded byCristian Flores
- Detailed Syllabus CE MIST 2015Uploaded byAnonymous C9ZNFkrb6

- English grammarUploaded byRudonja Nedžad
- 20565586-HVAC-Handbook-CARRIER-New-Edition-Part-2-Air-DistributerUploaded byGeoff Cullen
- MeltingUploaded byRudonja Nedžad
- Numerical MethodsUploaded byRudonja Nedžad
- Conduction Convection RadiationUploaded byfarhan_katpar1838
- Natural ConvectionUploaded byRudonja Nedžad
- 1115The Present Perfect SimpleUploaded byRudonja Nedžad
- AsimilUploaded byRudonja Nedžad
- Malta, ET 1Uploaded byRudonja Nedžad
- Solar Plant Layout1Uploaded byRudonja Nedžad

- 4WE10 Series - Tech SpecificationsUploaded byargo_arjieanto
- Its Student Laptop RecsUploaded byMarcell
- Aries Netlink CentralarmUploaded byYuber A. Meneses
- OEM Setup Screen HelpUploaded byJC A. Gomes
- AC Invertor1000dsUploaded byRonak Patel
- Hg8240b&Hg8245t&Hg8247t Service Manual(v200r005c00&c01_03,Gpon)Uploaded byMăru
- 130516020503 Nokia Premicell Users Guide Tfk2 Eng JtkwlUploaded byFlorin Jescu
- VHDL Beginners BookUploaded byapi-3731978
- LG W2_43S Monitor ManualUploaded byRed Wing
- Approval Final (Hopefully)Uploaded byFrancis Joseph Montes Aurino
- Applications of GSM ModemUploaded byvedhajuval
- Vmware Vsphere 5 Design Best Practice Guide7Uploaded bygutin
- CryptographyUploaded bynooti
- Magento Enterprise EulaUploaded byRadu Ovidiu Ilies
- Corporate PresentationUploaded byMohammed Abrar Ahmed
- Zad 6Uploaded byservodave
- Allen-bradley Rslogix 500 ExamplesUploaded byjohnnycabu
- Jacksons Tesla Wireless Coil Instructions Apr 11 2011Uploaded byStéphane Monbel
- Manual Pat Rt540 Iflex5Uploaded byDawn Hall
- Drobo 2ndGen Help for MacUploaded byjonh_nathan
- IKD_1_SpecUploaded byfcord
- DM1 Engineering ChecklistUploaded byatocfemia
- Lmidmani,Mustapha ResumeUploaded byMustapha
- CpiUploaded byapi-3703205
- Etabs NotesUploaded byNaveen Revanna
- Huawei Agile POL Hotel Solution (002).pdfUploaded byMoises Templinski
- A Quick Guide on Building a GPU Mining Rig 3rd Ed July'2017Uploaded byVorlagen
- 3PAR VMware ESX 3.X - 4.X Implementation GuideUploaded byfbu2000
- Excel Derby User ManualUploaded byyaffeweb
- MT6592 Android ScatterUploaded byBross Warner

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.