Outline. Additional Nonlinear Systems. Abstract. Finding Equilibrium Points Numerically. Newton s Method
|
|
- Audra O’Neal’
- 5 years ago
- Views:
Transcription
1 Outline Finding Equilibrium Points Numerically Additional Nonlinear Systems James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University June 13, 2017 Newton s Method Adding Finite Difference Approximations to the Derivative A Second Nonlinear Model EP One EP Two EP Three The Full Phase Plane Predator Prey Models Abstract We can find the equilibrium points using the root finding methods called bisection and Newton s method. This lecture is going discuss more about nonlinear systems. We need a simple function to find the root of a nice function f of the real variable x using what is called bisection. The method is actually quite simple. We know that if f is a continuous function on the finite interval [a, b] then f must have a zero inside the interval [a, b] if f has a different algebraic sign at the points a and b. This means the product f (a) f (b) is not zero. So we assume we can find an interval [a, b] on which this change in sign satisfies f (a) f (b) 0 (which we can do by switching to f if we have to!) and then if we divide the interval [a, b] into two equal pieces [a, m] and [m, b], f (m) can t have the same sign as both f (a) and f (b) because of the assumed sign difference. So at least one of the two halves has a sign change.
2 Note that if f (a) and f (b) was zero then we still have f (a) f (b) 0 and either a or b could be our chosen root and either half interval works fine. If only one of the point function values is zero, then the bisection of [a, b] into the two halves still finds the one half interval that has the root. So our prototyping Matlab code should use tests like f (x) f (y) 0 rather than f (x) f (y) < 0 to make sure we catch the root. Let s look at a simple Matlab function to perform the Bisection routine. f u n c t i o n r o o t = B i s e c t i o n (fname, a, b, d e l t a ) fname i s the name o f the f u n c t i o n f ( x ) a, b f o r which f (a) f (b) <= 0 d e l t a t h i s i s a non n e g a t i v e r e a l number r o o t t h i s i s the m i d p o i n t o f [ c, d ] with f (c) f (d) <= 0 and d c <= d e l t a + eps max ( c, d ) where eps i s machine z e r o d i s p ( ) d i s p ( k a ( k ) b ( k ) b ( k ) a ( k ) ) k = 1 ; d i s p ( s p r i n t f ( 6d 12.7 f 12.7 f 12.7 f, k, a, b, b a ) ) ; fa = f e v a l (fname, a ) ; f b = f e v a l ( fname, b ) ; w h i l e abs (a b ) > d e l t a + eps max ( abs (a), abs (b) ) mid = ( a+b ) / 2 ; fmid = f e v a l ( fname, mid ) ; i f f a fmid <= 0 t h e r e i s a r o o t i n [ a, mid ] b = mid ; fb = fmid ; t h e r e i s a r o o t i n [ mid, b ] a = mid ; f a = fmid ; k = k +1; d i s p ( s p r i n t f ( 6d 12.7 f 12.7 f 12.7 f, k, a, b, b a ) ) ; r o o t = ( a+b ) / 2 ; We should look at some of these lines more closely. First, to use this routine, we need to write a function definition for the function we want to apply bisection to. We will do this in a file called func.m (Inspired Name, eh?) An example would be the one we wrote for the function Note that the name of our supplied function is passed in as the first argument in single quotes as it is a string. Also, in the Bisection routine, we have added the code to print out what is happening at each iteration of the while loop. Matlab handles prints to the screen a little funny, so do set up a table of printed values we use this syntax: f u n c t i o n y = f u n c ( x ) x r e a l i n p u t y r e a l o u t p u t y = tan ( x /4) 1; f (x) = tan( x 4 ) 1; t h i s p r i n t s a blank l i n e and then a t a b l e heading. note d i s p p r i n t s a s t r i n g o n l y d i s p ( ) d i s p ( k a ( k ) b ( k ) b ( k ) a ( k ) ) now to p r i n t t he k, a, b and b a, we must f i r s t put t h e i r v a l u e s i n t o a s t r i n g u s i n g t h e c l i k e f u n c t i o n s p r i n t f and then use disp to d i s p l y that s t r i n g. so we do t h i s d i s p ( s p r i n t f ( o u t p u t s p e c i f i c a t i o n s h e r e, v a r i a b l e s h e r e ) ) so i n s i d e the w h i l e l o o p we use d i s p ( s p r i n t f ( 6d 12.7 f 12.7 f 12.7 f, k, a, b, b a ) ) ; As mentioned above, we will test this code on the function So to apply bisection to this function on the interval [2, 4] with a stopping tolerance of say 10 4, in Matlab, we would type the command root = Bisection( func,2,4,10^-4). f (x) = tan( x 4 ) 1; on the interval [2, 4] with a stopping tolerance of δ = Our function is the Matlab function func in the file func.m.
3 root = B i s e c t i o n ( func,2,4,10ˆ 6) Homework 60 k a ( k ) b ( k ) b ( k ) a ( k ) r o o t = Use bisection to find the first five positive solutions of the equation x = tan(x). You can see where this is roughly by graphing tan(x) and x simultaneously. Do this for tolerances {10 1, 10 2, 10 3, 10 4, 10 5, 10 6, 10 7 }. For each root, choose a reasonable bracketing interval [a, b], explain why you chose it, provide a table of the number of iterations to achieve the accuracy and a graph of this number vs. accuracy Use the Bisection Method to find the largest real root of the function f (x) = x 6 x 1. Do this for tolerances {10 1, 10 2, 10 3, 10 4, 10 5, 10 6, 10 7 }. Choose a reasonable bracketing interval [a, b], explain why you chose it, provide a table of the number of iterations to achieve the accuracy and a graph of this number vs. accuracy. Newton s method is based on the tangent line. At a given point x0, we have f (x) = f (x0) + f (x0)(x x0) f (cx)(x x0) 2 where cx is some point between x0 and x. Neglecting the error, we can say f (x) f (x0) + f (x0)(x x0) If we are looking for a zero of f, we would want f (x) = 0. This gives 0 f (x0) + f (x0)(x x0) Now solve for x to find x = x0 f (x0) f (x0) If we think of x0 as being our current guess of the value of the root, x old, we can call x our next guess, x new. So we can rewrite the equation above as x new = x old f (x old ) f (x old ) Of course, if f (x old ) is small this generates a very poor next estimate. Newton s method rapidly converges to a zero of the function f if the original guess is reasonable. Of course, that is the problem. A bad initial guess is a great way to generate random numbers! So usually, we find a good interval where the root might reside by first using bisection. The following code uses a simple test to see which we should do in our zero finding routine.
4 f u n c t i o n ok = S t e p I s I n ( x, fx, fpx, a, b ) x c u r r e n t a p p r o x i m a t e r o o t f x f u n c t i o n f v a l u e a t a p p r o x i m a t e r o o t fpx d e r i v a t i v e f value at approximate root a, b r o o t i s i n t h i s i n t e r v a l ok 1 i f the Newton Step x f x /f p x i s i n [a, b ], 0 i f not i f f p x > 0 ok = ( ( a x ) f p x <= f x ) && ( f x <= ( b x ) f p x ) ; i f f p x < 0 ok = ( ( a x ) f p x >= f x ) && ( f x >= ( b x ) f p x ) ; ok = 0 ; Once the bisection steps have given us an interval where the root might be, we switch to Newton s method. Newton s Method can be rephrased for the scalar function case as xn+1 = xn f (xn) f (xn). f u n c t i o n [ x, fx, n E v a l s, af, bf ] = GlobalNewton ( fname, fpname, a, b, t o l x, t o l f, nevalsmax ) fname name o f f ( x ), f pname name of derivative f ( x ) a, b s e a r c h i n t e r v a l [a, b ] tolx interval size tol, t o l f f ( r o o t approx ) t o l nevalsmax Max Number o f d e r E v a l x s x Approx z e r o o f f, f x i s f ( x ) nevals Num of Deriv E v a l s Needed, af, bf f i n a l i n t e r v a l [af, bf ] T e r m i n [a, b ] has s i z e < t o l x a t i o n o r f ( r o o t ) < t o l f o r num o f e v a l s e x c e e d s nevalsmax where xn denotes x old and xn+1 denotes x new. It is clear the method fails if f (xn) = 0 or is close to 0 at any iteration. MatLab code to implement this method is given next. f u n c t i o n [ x, fx, n E v a l s, af, bf ] = GlobalNewton ( fname, fpname, a, b, t o l x, t o l f, nevalsmax ) f a = f e v a l (fname, a ) ; f b = f e v a l (fname, b ) ; x = a ; f x = f e v a l ( fname, x ) ; f p x = f e v a l ( fpname, x ) ; n E v a l s = 1 ; k = 1 ; d i s p ( ) d i s p ( Step k a ( k ) x ( k ) b ( k ) ) d i s p ( s p r i n t f ( S t a r t 6d 12.7 f 12.7 f 12.7 f, k, a, x, b ) ) ; w h i l e ( abs (a b )>t o l x ) && ( abs ( f x )> t o l f ) && ( nevals<nevalsmax ) ( n E v a l s ==1) check = S t e p I s I n ( x, fx, fpx, a, b ) ; [a, b ] b r a c k e t s a r o o t and x=a o r x=b i f check x = x fx / fpx ; Take Newton Step x = ( a+b ) / 2 ; Take a B i s e c t i o n Step : f x = f e v a l ( fname, x ) ; f p x = f e v a l ( fpname, x ) ; n E v a l s = n E v a l s +1; i f f a fx <=0 b = x ; f b = f x ; t h e r e i s a r o o t i n [a, x ]. Use r i g h t e n d p o i n t. a = x ; f a = f x ; t h e r e i s a r o o t i n [ x, b ]. B r i n g i n l e f t e n d p o i n t. k = k +1; i f ( check ) d i s p ( s p r i n t f ( Newton 6d 12.7 f 12.7 f 12.7 f, k, a, x, b ) ) ; d i s p ( s p r i n t f ( B i s e c t i o n 6d 12.7 f 12.7 f 12.7 f, k, a, x, b ) ) ; af = a ; bf = b ; We will apply our global newton method root finding code to a simple example: find a root for f (x) = sin(x) in the interval [ 7π 2, 15π + 0.1]. We code the function and its derivative in two simple Matlab files f u n c t i o n y = f 1 ( x ) y = s i n ( x ) ; and f u n c t i o n y = f 1 p ( x ) y = c o s ( x ) ; To run this code on this example, we would then type a phrase like the one below: [ x, fx, n E v a l s, alast, b L a s t ] = GlobalNewton ( f1, f1p, 7 p i /2,15 p i +.1,10ˆ 6,10ˆ 8,200) Here we set the interval tolerance to 10 6 so if the width of the interval [a, b] < 10 6 the algorithm stops. We also set the root tolerance to 10 8 which means the algorithm terminates once the value of the approximate root f (x) < 10 8.
5 Homework 61 Here is the runtime output: [ x, fx, n E v a l s, alast, b L a s t ] = GlobalNewton ( f1, f1p, 7 p i /2,15 p i +.1,10ˆ 6,10ˆ 8,200) Step k a ( k ) x ( k ) b ( k ) S t a r t B i s e c t i o n B i s e c t i o n Newton Newton Newton x = f x = e 16 n E v a l s = 6 a L a s t = b L a s t = Use the Global Newton Method to find the first five positive solutions of the equation x = tan(x). Do this for root tolerances {10 1, 10 2, 10 3, 10 4, 10 5, 10 6, 10 7 } and always use the interval tolerance First make up the two functions f and fp which are f (x) = x tan(x) and f (x) = 1 sec 2 (x). These will be in file with names like myfunc.m and myfuncp.m. Sketch tan(x) and x together. The positive roots are clearly close to 3π/2, 5π/2 and so on. So for each one, pick a starting interval [a, b] so the x tan(x) changes size at the points. This requires a bit of trial and error. The function call for the first root tolerance is [x,fx,nevals,alast,blast] = GlobalNewton( myfunc, myfuncp,a,b,10^-6,10^-1,200) where a and b are your starting guesses for the first interval. Keep track of how many iterations you use for each choice of root tolerance and display this as a table for each root. Homework 61 We can also choose to replace the derivative function for f with a finite difference approximation. We will use f (x) f (xc + δc) f (xc) δc 61.2 Follow the guidelines of Problem 61.1 and use the Global Newton Method to find the largest real root of the function f (x) = x 6 x 1. Do this for the root tolerances {10 1, 10 2, 10 3, 10 4, 10 5, 10 6, 10 7 } and always use the interval tolerance to approximate the value of the derivative at the point xc. Some care is required to pick a size for δc so that round-off errors do not destroy the accuracy of our finite difference approximation to f. The simple Matlab code to implement this is given below: f v a l = f e v a l ( fname, x ) ; f p v a l = ( f e v a l (fname, x+d e l t a ) f v a l ) / d e l t a ; We can also use a secant approximation as follows: f v a l = f e v a l ( fname, x ) ; f v a l c = f e v a l ( fname, c ) ; f p c = ( f v a l c f v a l ) /( x c ) ; We add the finite difference routines into our Global Newton s Method as follows:
6 f u n c t i o n [ x, fx, n E v a l s, af, bf ] =... In Matlab the smallest number we can uniquely have is eps which is e 16. We use this to set the δ for our finite difference approximations. in the line delta = sqrt(eps)* abs(x);. GlobalNewtonFD (fname, a, b, t o l x, t o l f, nevalsmax ) fname a s t r i n g t h a t i s the name o f the f u n c t i o n f ( x ) a, b we l o o k f o r the r o o t i n the i n t e r v a l [a, b ] t o l x t o l e r a n c e on t h e s i z e o f t h e i n t e r v a l t o l f t o l e r a n c e o f f ( c u r r e n t a p p r o x i m a t i o n to r o o t ) nevalsmax Maximum Number o f d e r i v a t i v e E v a l u a t i o n s x Approximate z e r o o f f f x The v a l u e o f f a t t h e a p p r o x i m a t e z e r o n E v a l s The Number o f D e r i v a t i v e E v a l u a t i o n s Needed af, bf the f i n a l i n t e r v a l the a p p r o x i m a t e r o o t l i e s in, [ af, bf ] T e r m i n a t i o n I n t e r v a l [a, b ] has s i z e < t o l x f ( a p p r o x i m a t e r o o t ) < t o l f Have exceeded nevalsmax d e r i v a t i v e E v a l u a t i o n s f u n c t i o n [ x, fx, n E v a l s, af, bf ] = GlobalNewtonFD ( fname, a, b, t o l x, t o l f, nevalsmax ) f a = f e v a l (fname, a ) ; f b = f e v a l (fname, b ) ; x = a ; f x = f e v a l (fname, x ) ; d e l t a = s q r t ( eps ) abs (x) ; f p v a l = f e v a l (fname, x+d e l t a ) ; f p x = ( f p v a l f x ) / d e l t a ; n E v a l s = 1 ; k = 1 ; w h i l e ( abs (a b )>t o l x ) && ( abs ( f x )> t o l f ) && ( nevals<nevalsmax ) ( n E v a l s ==1) check = S t e p I s I n ( x, fx, fpx, a, b ) ; [a, b ] b r a c k e t s a r o o t and x=a o r x=b i f check x = x fx / fpx ; Take Newton Step x = ( a+b ) / 2 ; Take a B i s e c t i o n Step : f x = f e v a l ( fname, x ) ; f p v a l = f e v a l ( fname, x+d e l t a ) ; f p x = ( f p v a l f x ) / d e l t a ; n E v a l s = n E v a l s +1; i f f a fx <=0 b = x ; t h e r e i s a r o o t i n [a, x ]. Use r i g h t e n d p o i n t. fb = fx ; a = x ; t h e r e i s a r o o t i n [ x, b ]. B r i n g i n l e f t e n d p o i n t. fa = fx ; k = k +1; af = a ; bf = b ; We will apply our finite difference global newton method root finding code to the same simple example: find a root for f (x) = sin(x) in the interval [ 7π 2, 15π + 0.1]. Homework 62 To run this code on this example, we would then type [ x, fx, n E v a l s, alast, b L a s t ] = GlobalNewtonFD ( f1, 7 p i /2,15 p i +.1,10ˆ 6,10ˆ 8,200) This generates [ x, fx, n E v a l s, alast, b L a s t ] = GlobalNewtonFD ( f1, 7 p i /2,15 p i +. 1,... 10ˆ 6,10ˆ 8,200) Step k a ( k ) x ( k ) b ( k ) S t a r t B i s e c t i o n B i s e c t i o n Newton Newton Newton x = f x = e 15 n E v a l s = 6 a L a s t = b L a s t = Use the Finite Difference Global Newton Method to find the second positive solution of the equation x = tan(x). Do this for the interval tolerance 10 6 and the root tolerance For this problem, we will look at what happens as we vary the δ we use to find the finite difference approximations to the derivative at each step. So for the δ choices {10 4, 10 6, 10 8, } change the line delta = sqrt(eps)* abs(x); in the code to be delta = 10^-4; etc and run the code. Provide a table of the root accuracy versus the δ choice.
7 Homework 62 Now let s look at this model 62.2 Use the Finite Difference Global Newton Method to find the largest real root of the function f (x) = x 6 x 1. Do this for the interval tolerance 10 6 and the root tolerance For this problem, we will look at what happens as we vary the δ we use to find the finite difference approximations to the derivative at each step. So for the δ choices {10 4, 10 6, 10 8, } change the line delta = sqrt(eps)* abs(x); in the code to be delta = 10^-4; etc and run the code. Provide a table of the root accuracy versus the δ choice. x =.5( h(x) + y) y =.2( x 1.5y + 1.2) for h(x) = 17.76x x x x x 5, This is model of how an electrical component called a diode behaves called the trigger model and the details are not really important as we are just investigating how to use our code and theoretical ideas. The equilibrium points are the solutions to the simultaneous equations y = 17.76x x x x x 5 y = 2 3 x We can see these solutions graphically by plotting the two curves simultaneously and using the cursor to locate the roots and read off the (x, y) values from the plot. This is not quite accurate so a better way is to find the roots numerically. The plot which shows the equilibrium points graphically is shown below: g x ) (12 10 x ) / 1 5 ; h x x. ˆ x. ˆ x. ˆ x. ˆ 5 ; X = l i n s p a c e ( 0, 1, ) ; Y1 = h (X) ; Y2 = g (X) ; p l o t (X, Y1, X, Y2 ) ; q x ) h ( x ) g ( x ) ; [ x1, fx1, Nevals1, af1, bf1 ] =... GlobalNewtonFD ( q,0,.1,10ˆ 6,10ˆ 8,10) ; [ x2, fx2, Nevals2, af2, bf2 ] =... GlobalNewtonFD ( q,.2,.4,10ˆ 6,10ˆ 8,10) ; [ x3, fx3, Nevals3, af3, bf3 ] =... GlobalNewtonFD ( q,.4,.9,10ˆ 6,10ˆ 8,10) ; y1 = h ( x1 ) ; y2 = h ( x2 ) ; y3 = h ( x3 ) ; EP = {[ x1, y1 ], [ x2, y2 ], [ x3, y3 ] } ; [ x3, fx3, Nevals3, af3, bf3 ] =... GlobalNewtonFD ( q,.4,.9,10ˆ 6,10ˆ 8,10) ; y3 = h ( x3 ) ; EP = {[ x1, y1 ], [ x2, y2 ], [ x3, y3 ] } ; EP EP = { [ 1, 1 ] = [ 1, 2 ] = [ 1, 3 ] = The graphical and numerical solutions are shown in the following MatLab/ Octave session.
8 For the equilibrium point Q1, we have J ( x1, y1 ) ans = There are now three equilibrium points Q1 = ( , ) Q2 = ( , ) Q3 = ( , ) [V1,D1 ] = e i g (J(x1, y1 ) ) V1 = D1 = The Jacobian is 0.5h J(x, y) = (x) D i a g o n a l M a t r i x Hence, there are two real distinct eigenvalues, r1 = and r2 = The eigenvectors are E1 = and E2 = The dominant eigenvector is E1 and it is easy to plot the resulting trajectories. We modify our function linearsystem to the new function linearsystemep so that we can plot the trajectories centered at the equilibrium point Q1. A1 = J ( x1, y1 ) ; p1 = [ A1 ( 1, 1 ), A1 ( 1, 2 ), A1 ( 2, 1 ), A1 ( 2, 2 ), x1, y1 ] p1 = AutoPhasePlanePlotLinearSystemRKF5 ( x a x i s, y a x i s, Q1 Plot,1.0 e 6,1.0 e 6,. 0 1,. 2, l i n e a r s y s t e m e p, p1,. 0 1, 0,. 4, 1 2, 1 2, 0, 1, 0, 1 ) ; f u n c t i o n f = l i n e a r s y s t e m e p ( p, t, x ) a = p ( 1 ) ; b = p ( 2 ) ; c = p ( 3 ) ; d = p ( 4 ) ; ex = p ( 5 ) ; ey = p ( 6 ) ; u = x ( 1 ) ex ; v = x ( 2 ) ey ; f = [ a u+b v ; c u+d v ] ; We set up the plot as follows. We define the coefficient matrix A1 of our linearization and set up the parameter p1 by listing all the entries of A1 followed by the coordinates of Q1. We then generate the automatic phase plane plot.
9 For equilibrium point Q2, we find the linearization just like we did for Q1. First, we find the Jacobian at this point. J ( x2, y2 ) ans = A2 = J ( x2, y2 ) ; p2 = [ A2 ( 1, 1 ), A2 ( 1, 2 ), A2 ( 2, 1 ), A2 ( 2, 2 ), x2, y2 ] p2 = AutoPhasePlanePlotLinearSystemRKF5 ( x a x i s, y a x i s, Q1 Plot,1.0 e 6,1.0 e 6,. 0 1,. 2, l i n e a r s y s t e m e p, p2,. 0 1, 0,. 4, 1 2, 1 2, 0. 5, 1, 0, 1 ) ; [V2,D2 ] = e i g (J(x2, y2 ) ) V2 = D2 = Hence, there are two real distinct eigenvalues, r1 = and r2 = The eigenvectors are E1 = and E2 = The dominant eigenvector is again E1. We set the coefficient matrix A2 of our linearization and the parameter p2 of our model and generate the automatic phase plane plot. Finally, we analyze the model near the point Q3. The Jacobian is now ( x3, y3 ) ans = [V3,D3 ] = e i g (J(x3, y3 ) ) V3 = D3 = A3 = J ( x3, y3 ) ; p3 = [ A3 ( 1, 1 ), A3 ( 1, 2 ), A3 ( 2, 1 ), A3 ( 2, 2 ), x3, y3 ] p3 = AutoPhasePlanePlotLinearSystemRKF5 ( x a x i s, y a x i s, Q1 Plot,1.0 e 6,1.0 e 6,. 0 1,. 2, l i n e a r s y s t e m e p, p3,. 0 1, 0,. 4, 1 2, 1 2, 0, 1, 0, 1 ) ; Hence, there are two real distinct eigenvalues, r1 = and r2 = The eigenvectors are E1 = and E2 = The dominant eigenvector is now E2. We set the coefficient matrix A3 of our linearization and the parameter p3 of our model and generate the automatic phase plane plot.
10 We can also generate the full plot of the original system using the function triggermodel. f u n c t i o n y = t r i g g e r m o d e l ( t, x ) u = x ( 1 ) ; v = x ( 2 ) ; y = [ 0.5 (17.76 u u.ˆ u.ˆ u.ˆ u.ˆ5 v ) ; ( u 1.5 v + 1.2) ] ; We then plot the trajectories using AutoPhasePlanePlotRKF5NoP. You can see in this plot how trajectories do not stay near Q2; instead, they move to Q1 or to Q3. Hence, you can a trigger a move from Q1 to Q3 or vice versa by choosing the right Initial condition! So this gives us a way to implement computer memory. Choose say Q1 to represent a binary 1 and Q3 to represent a binary 0 or to implement a model of how emotional states can switch quickly. AutoPhasePlanePlotRKF5NoP ( x axis, y axis, Trigger Model Phase Plane,1.0 e 6,1.0 e 6,. 0 1,. 0 5, t r i g g e r m o d e l,. 0 1, 0, 2, 2 0, 2 0, 0. 2, 1, 0, 1 ) ; For the equilibrium point Q1, we have The next nonlinear system is the familiar Predator - Prey model. Consider the following example x (t) = 3 x(t) 4 x(t) y(t) y (t) = 5 y(t) + 7 x(t) y(t) The equilibrium points (x, y) solve the equations x (3 4y) = 0 y ( 5 + 7x) = 0 which has the familiar solutions Q1 = (0, 0) and Q2 = ( 5 7, 3 4 ). The Jacobian here is 3 4y 4x J(x, y) = 7y 5 + 7x A1 = J ( 0, 0 ) A1 = [ V1, D1 ] = e i g ( A1 ) V1 = D1 = Hence, there are two real distinct eigenvalues, r1 = 5 and r2 = 3. The eigenvectors are 0 1 E1 = and E2 = 1 0 The dominant eigenvector is thus E2 and it is easy to plot the resulting trajectories. Using the function linearsystemep we set up the plot. Using the coefficient matrix A1 of our linearization and the coordinates of Q1, we set the parameter p1 by listing all the entries of A1 followed by the coordinates of Q1. We then generate the automatic phase plane plot.
11 A1 = J ( x1, y1 ) ; p1 = [ A1 ( 1, 1 ), A1 ( 1, 2 ), A1 ( 2, 1 ), A1 ( 2, 2 ), x1, y1 ] p1 = AutoPhasePlanePlotLinearSystemRKF5 ( x a x i s, y a x i s, Q1 Plot,1.0 e 6,1.0 e 6,. 0 1,. 2, l i n e a r s y s t e m e p, p1,. 0 1, 0,. 4, 1 2, 1 2, 1, 1, 1, 1 ) ; Note the linearization shows a set of trajectories that moves out from the origin along the x axis deping on the quadrant the initial condition comes from. We also know that no trajectory of the predator - prey model that starts in Quadrant One can cross the x and y axis, so the lesson that the linearization is an approximation to the true trajectories really comes home here. For equilibrium point Q2, we find the Jacobian at this point. A2 = J ( x2, y2 ) A2 = [ V2, D2 ] = e i g ( A2 ) V2 = i i i i D2 = i i Hence, there is now a complex conjugate eigenvalue pair which has zero real part. Thus, these trajectories will be circles about Q2. The eigenvalues are r1 = i and r2 = i. We set coefficient matrix A2 and p2 and generate the automatic phase plane plot. A2 = J ( x2, y2 ) ; p2 = [ A2 ( 1, 1 ), A2 ( 1, 2 ), A2 ( 2, 1 ), A2 ( 2, 2 ), x2, y2 ] p2 = AutoPhasePlanePlotLinearSystemRKF5 ( x a x i s, y a x i s, Q2 Plot,1.0 e 6,1.0 e 6,. 0 1,. 2, l i n e a r s y s t e m e p, p2,. 0 1, 0, 2. 4, 1 2, 1 2, 0. 5,. 1, 0,. 1 ) ; The full plot of the original system uses the standard function PredPrey modified for the model at hand. f u n c t i o n f = PredPrey ( t, x ) f = [3 x (1) 4 x (1) x (2) ; 5 x (2)+7 x (1) x (2) ] ; We then plot the trajectories using AutoPhasePlanePlotRKF5NoPMultiple. We had to write a new function to generate the plot as the equilibrium point Q1 generates trajectories with large x and y values which complicate the calculations. So the new function manually builds four separate plots, one for each quadrant, and stays carefully away from the trajectories on the x and y axis. It is pretty hard to automate this kind of plot! In each quadrant, the number of trajectories and the size of the box from which the initial conditions come must be chosen inside the code. Also, the length of time the calculations run in a given quadrant must be handpicked. Hence, there is a lot of tweaking here!
12 function AutoPhasePlanePlotRKF5NoPMultiple ( Hlabel, Vlabel, Tlabel, errortol, s t e p t o l, minstep, maxstep, fname, h i n i t,q1,q2,q3,q4) fname i s t h e name o f t h e model dynamics e r r o r t o l i s t o l e r a n c e i n RKF5 a l g o r i t h m s t e p t o l i s a n o t h e r t o l e r a n c e i n RKF5 a l g o r i t h m m i n s t e p i s t h e minimum s t e p s i z e a l l o w e d maxstep i s t h e maximum s t e p s i z e a l l o w e d h i n i t i s the i n i t i a l s t e p s i z e Q1 i s 1 i f we want to g e n e r a t e t h e p l o t i n q u a d r a n t 1 Q2 i s 1 i f we want to g e n e r a t e t h e p l o t i n q u a d r a n t 2 Q3 i s 1 i f we want to g e n e r a t e t h e p l o t i n q u a d r a n t 3 Q4 i s 1 i f we want to g e n e r a t e t h e p l o t i n q u a d r a n t 4 t i s t he f i n a l time function AutoPhasePlanePlotRKF5NoPMultiple ( Hlabel, Vlabel, Tlabel, errortol, s t e p t o l, minstep, maxstep, fname, h i n i t,q1,q2,q3,q4) newplot ; hold a l l ; i f (Q3 == 1) LL = 2 ; ull = l i n s p a c e (.2,.1, LL ) ; vll = l i n s p a c e (.2,.1, LL ) ; u = ull ; v = vll ; f o r i =1: LL f o r j =1: LL y0 = [ u ( i ) ; v ( j ) ] ; [ t v a l s, yvals, f v a l s, h v a l s ] = RKF5NoP( e r r o r t o l, s t e p t o l, minstep, maxstep,... fname, h i n i t, 0, 0. 5, y0 ) ; p l o t ( y v a l s ( 1, : ), y v a l s ( 2, : ) ) ; i f (Q2 == 1) UL = 2 ; uul = l i n s p a c e (.2,.1,UL ) ; vul = l i n s p a c e (.1,.2, UL ) ; u = uul ; v = vul ; f o r i =1:UL f o r j =1:UL y0 = [ u ( i ) ; v ( j ) ] ; [ t v a l s, yvals, f v a l s, h v a l s ] = RKF5NoP( e r r o r t o l, s t e p t o l, minstep, maxstep,... fname, h i n i t, 0, 0. 6, y0 ) ; p l o t ( y v a l s ( 1, : ), y v a l s ( 2, : ) ) ; C o n t i n u e t h e s o u r c e l i s t i n g i f (Q4 == 1) LR = 2 ; ulr = l i n s p a c e (. 1,. 2, LR ) ; vlr = l i n s p a c e (.2,.1, LR ) ; u = ulr v = vlr f o r i =1: LR f o r j =1: LR y0 = [ u ( i ) ; v ( j ) ] ; [ t v a l s, yvals, f v a l s, h v a l s ] = RKF5NoP( e r r o r t o l, s t e p t o l, minstep, maxstep,... fname, h i n i t, 0, 0. 5, y0 ) ; p l o t ( y v a l s ( 1, : ), y v a l s ( 2, : ) ) ; i f (Q1 == 1) UR = 4 ; uur = l i n s p a c e (.1,2.0, UR ) ; vur = l i n s p a c e (.1,2.0, UR ) ; u = uur ; v = vur ; f o r i =1:UR f o r j =1:UR y0 = [ u ( i ) ; v ( j ) ] ; [ t v a l s, yvals, f v a l s, h v a l s ] = RKF5NoP( e r r o r t o l, s t e p t o l, minstep, maxstep,... fname, h i n i t, 0, 2. 4, y0 ) ; p l o t ( y v a l s ( 1, : ), y v a l s ( 2, : ) ) ; x l a b e l ( H l a b e l ) ; y l a b e l ( V l a b e l ) ; t i t l e ( T l a b e l ) ; hold o f f ; AutoPhasePlanePlotRKF5NoPMultiple ( x a x i s, y a x i s, P r e d a t o r Prey Phase Plane, 1. 0 e 6,1.0 e 6,. 0 1,. 0 5, PredPrey,. 0 1, 1, 1, 1, 1 ) ;
13 Homework 63 Homework 63 For each of the following systems, do this: 1. Graph the nullclines x = 0 and y = 0 and show on the x y plane the regions where x and y take on their various algebraic signs. 2. Find the equilibrium points. 3. At each equilibrium point, find the Jacobian of the system and analyze the linearized system we have discussed in class. This means: find eigenvalues and eigenvectors if the system has real eigenvalues. You don t need the eigenvectors if the eigenvalues are complex. sketch a graph of the linearized solutions near the equilibrium point. 4. Using 1 and 3 to combine all this information into full graph of the system x = y y = x + x 3 6 y x = x + y y =.1x 2y x 2.1x 3 x = y y = x + y (1 3x 2 2y 2 )
Solving Linear Systems of ODEs with Matlab
Solving Linear Systems of ODEs with Matlab James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University October 27, 2013 Outline Linear Systems Numerically
More informationPredator - Prey Model Trajectories and the nonlinear conservation law
Predator - Prey Model Trajectories and the nonlinear conservation law James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University October 28, 2013 Outline
More informationPredator - Prey Model Trajectories are periodic
Predator - Prey Model Trajectories are periodic James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University November 4, 2013 Outline 1 Showing The PP
More informationPredator - Prey Model Trajectories are periodic
Predator - Prey Model Trajectories are periodic James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University November 4, 2013 Outline Showing The PP Trajectories
More informationNumerical Solution of f(x) = 0
Numerical Solution of f(x) = 0 Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@pdx.edu ME 350: Finding roots of f(x) = 0 Overview Topics covered in these slides
More informationLinear Systems of ODE: Nullclines, Eigenvector lines and trajectories
Linear Systems of ODE: Nullclines, Eigenvector lines and trajectories James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University October 6, 2013 Outline
More informationGetting Started With The Predator - Prey Model: Nullclines
Getting Started With The Predator - Prey Model: Nullclines James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University October 28, 2013 Outline The Predator
More informationR x n. 2 R We simplify this algebraically, obtaining 2x n x n 1 x n x n
Math 42 Homework 4. page 3, #9 This is a modification of the bisection method. Write a MATLAB function similar to bisect.m. Here, given the points P a a,f a and P b b,f b with f a f b,we compute the point
More informationSolution of Algebric & Transcendental Equations
Page15 Solution of Algebric & Transcendental Equations Contents: o Introduction o Evaluation of Polynomials by Horner s Method o Methods of solving non linear equations o Bracketing Methods o Bisection
More informationLinear Systems of ODE: Nullclines, Eigenvector lines and trajectories
Linear Systems of ODE: Nullclines, Eigenvector lines and trajectories James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University October 6, 203 Outline
More informationExam 2 Study Guide: MATH 2080: Summer I 2016
Exam Study Guide: MATH 080: Summer I 016 Dr. Peterson June 7 016 First Order Problems Solve the following IVP s by inspection (i.e. guessing). Sketch a careful graph of each solution. (a) u u; u(0) 0.
More informationFinding the Roots of f(x) = 0. Gerald W. Recktenwald Department of Mechanical Engineering Portland State University
Finding the Roots of f(x) = 0 Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab:
More informationFinding the Roots of f(x) = 0
Finding the Roots of f(x) = 0 Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab:
More informationNumerical Methods I Solving Nonlinear Equations
Numerical Methods I Solving Nonlinear Equations Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 MATH-GA 2011.003 / CSCI-GA 2945.003, Fall 2014 October 16th, 2014 A. Donev (Courant Institute)
More informationOutline. Math Numerical Analysis. Intermediate Value Theorem. Lecture Notes Zeros and Roots. Joseph M. Mahaffy,
Outline Math 541 - Numerical Analysis Lecture Notes Zeros and Roots Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research
More informationMath Numerical Analysis
Math 541 - Numerical Analysis Lecture Notes Zeros and Roots Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research Center
More informationSolving systems of ODEs with Matlab
Solving systems of ODEs with Matlab James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University October 20, 2013 Outline 1 Systems of ODEs 2 Setting Up
More informationNewton s Cooling Model in Matlab and the Cooling Project!
Newton s Cooling Model in Matlab and the Cooling Project! James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University March 10, 2014 Outline Your Newton
More informationProject Two. James K. Peterson. March 26, Department of Biological Sciences and Department of Mathematical Sciences Clemson University
Project Two James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University March 26, 2019 Outline 1 Cooling Models 2 Estimating the Cooling Rate k 3 Typical
More informationMATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations.
MATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations. Dmitriy Leykekhman Fall 2008 Goals Learn about different methods for the solution of f(x) = 0, their advantages and disadvantages. Convergence
More informationSin, Cos and All That
Sin, Cos and All That James K Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University September 9, 2014 Outline Sin, Cos and all that! A New Power Rule Derivatives
More informationQueens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.
Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane c Sateesh R. Mane 2018 3 Lecture 3 3.1 General remarks March 4, 2018 This
More informationNumerical Methods. Root Finding
Numerical Methods Solving Non Linear 1-Dimensional Equations Root Finding Given a real valued function f of one variable (say ), the idea is to find an such that: f() 0 1 Root Finding Eamples Find real
More informationOptimization and Calculus
Optimization and Calculus To begin, there is a close relationship between finding the roots to a function and optimizing a function. In the former case, we solve for x. In the latter, we solve: g(x) =
More information1. Method 1: bisection. The bisection methods starts from two points a 0 and b 0 such that
Chapter 4 Nonlinear equations 4.1 Root finding Consider the problem of solving any nonlinear relation g(x) = h(x) in the real variable x. We rephrase this problem as one of finding the zero (root) of a
More informationLecture 10: Powers of Matrices, Difference Equations
Lecture 10: Powers of Matrices, Difference Equations Difference Equations A difference equation, also sometimes called a recurrence equation is an equation that defines a sequence recursively, i.e. each
More informationSolution of Nonlinear Equations
Solution of Nonlinear Equations (Com S 477/577 Notes) Yan-Bin Jia Sep 14, 017 One of the most frequently occurring problems in scientific work is to find the roots of equations of the form f(x) = 0. (1)
More informationNumerical Methods Lecture 3
Numerical Methods Lecture 3 Nonlinear Equations by Pavel Ludvík Introduction Definition (Root or zero of a function) A root (or a zero) of a function f is a solution of an equation f (x) = 0. We learn
More informationLecture 7. Root finding I. 1 Introduction. 2 Graphical solution
1 Introduction Lecture 7 Root finding I For our present purposes, root finding is the process of finding a real value of x which solves the equation f (x)=0. Since the equation g x =h x can be rewritten
More informationMath Numerical Analysis Mid-Term Test Solutions
Math 400 - Numerical Analysis Mid-Term Test Solutions. Short Answers (a) A sufficient and necessary condition for the bisection method to find a root of f(x) on the interval [a,b] is f(a)f(b) < 0 or f(a)
More informationRunge - Kutta Methods for first and second order models
Runge - Kutta Methods for first and second order models James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University October 3, 2013 Outline 1 Runge -
More informationRiemann Sums. Outline. James K. Peterson. September 15, Riemann Sums. Riemann Sums In MatLab
Riemann Sums James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University September 15, 2013 Outline Riemann Sums Riemann Sums In MatLab Abstract This
More informationProject Two. Outline. James K. Peterson. March 27, Cooling Models. Estimating the Cooling Rate k. Typical Cooling Project Matlab Session
Project Two James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University March 27, 2018 Outline Cooling Models Estimating the Cooling Rate k Typical Cooling
More informationChapter 3: Root Finding. September 26, 2005
Chapter 3: Root Finding September 26, 2005 Outline 1 Root Finding 2 3.1 The Bisection Method 3 3.2 Newton s Method: Derivation and Examples 4 3.3 How To Stop Newton s Method 5 3.4 Application: Division
More informationThe SIR Disease Model Trajectories and MatLab
The SIR Disease Model Trajectories and MatLab James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University November 17, 2013 Outline Reviewing the SIR
More informationRoot Finding: Close Methods. Bisection and False Position Dr. Marco A. Arocha Aug, 2014
Root Finding: Close Methods Bisection and False Position Dr. Marco A. Arocha Aug, 2014 1 Roots Given function f(x), we seek x values for which f(x)=0 Solution x is the root of the equation or zero of the
More informationNumerical Methods in Informatics
Numerical Methods in Informatics Lecture 2, 30.09.2016: Nonlinear Equations in One Variable http://www.math.uzh.ch/binf4232 Tulin Kaman Institute of Mathematics, University of Zurich E-mail: tulin.kaman@math.uzh.ch
More informationMA 8019: Numerical Analysis I Solution of Nonlinear Equations
MA 8019: Numerical Analysis I Solution of Nonlinear Equations Suh-Yuh Yang ( 楊肅煜 ) Department of Mathematics, National Central University Jhongli District, Taoyuan City 32001, Taiwan syyang@math.ncu.edu.tw
More informationPractical Numerical Analysis: Sheet 3 Solutions
Practical Numerical Analysis: Sheet 3 Solutions 1. We need to compute the roots of the function defined by f(x) = sin(x) + sin(x 2 ) on the interval [0, 3] using different numerical methods. First we consider
More informationSin, Cos and All That
Sin, Cos and All That James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University March 9, 2017 Outline 1 Sin, Cos and all that! 2 A New Power Rule 3
More informationNonlinear Optimization
Nonlinear Optimization (Com S 477/577 Notes) Yan-Bin Jia Nov 7, 2017 1 Introduction Given a single function f that depends on one or more independent variable, we want to find the values of those variables
More informationProject One: C Bump functions
Project One: C Bump functions James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University November 2, 2018 Outline 1 2 The Project Let s recall what the
More informationSolving Non-Linear Equations (Root Finding)
Solving Non-Linear Equations (Root Finding) Root finding Methods What are root finding methods? Methods for determining a solution of an equation. Essentially finding a root of a function, that is, a zero
More informationLecture 5. September 4, 2018 Math/CS 471: Introduction to Scientific Computing University of New Mexico
Lecture 5 September 4, 2018 Math/CS 471: Introduction to Scientific Computing University of New Mexico 1 Review: Office hours at regularly scheduled times this week Tuesday: 9:30am-11am Wed: 2:30pm-4:00pm
More informationMAE 107 Homework 8 Solutions
MAE 107 Homework 8 Solutions 1. Newton s method to solve 3exp( x) = 2x starting at x 0 = 11. With chosen f(x), indicate x n, f(x n ), and f (x n ) at each step stopping at the first n such that f(x n )
More informationDerivatives and the Product Rule
Derivatives and the Product Rule James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University January 28, 2014 Outline 1 Differentiability 2 Simple Derivatives
More informationLecture 44. Better and successive approximations x2, x3,, xn to the root are obtained from
Lecture 44 Solution of Non-Linear Equations Regula-Falsi Method Method of iteration Newton - Raphson Method Muller s Method Graeffe s Root Squaring Method Newton -Raphson Method An approximation to the
More informationUniform Convergence Examples
Uniform Convergence Examples James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University October 13, 2017 Outline 1 Example Let (x n ) be the sequence
More informationFigure 1: Graph of y = x cos(x)
Chapter The Solution of Nonlinear Equations f(x) = 0 In this chapter we will study methods for find the solutions of functions of single variables, ie values of x such that f(x) = 0 For example, f(x) =
More informationNumerical Analysis Fall. Roots: Open Methods
Numerical Analysis 2015 Fall Roots: Open Methods Open Methods Open methods differ from bracketing methods, in that they require only a single starting value or two starting values that do not necessarily
More information5 Finding roots of equations
Lecture notes for Numerical Analysis 5 Finding roots of equations Topics:. Problem statement. Bisection Method 3. Newton s Method 4. Fixed Point Iterations 5. Systems of equations 6. Notes and further
More informationLecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations
Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T Heath Chapter 5 Nonlinear Equations Copyright c 2001 Reproduction permitted only for noncommercial, educational
More informationPART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435
PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435 Professor Biswa Nath Datta Department of Mathematical Sciences Northern Illinois University DeKalb, IL. 60115 USA E mail: dattab@math.niu.edu
More informationUpdated 2013 (Mathematica Version) M1.1. Lab M1: The Simple Pendulum
Updated 2013 (Mathematica Version) M1.1 Introduction. Lab M1: The Simple Pendulum The simple pendulum is a favorite introductory exercise because Galileo's experiments on pendulums in the early 1600s are
More informationO.K. But what if the chicken didn t have access to a teleporter.
The intermediate value theorem, and performing algebra on its. This is a dual topic lecture. : The Intermediate value theorem First we should remember what it means to be a continuous function: A function
More informationRoot Finding (and Optimisation)
Root Finding (and Optimisation) M.Sc. in Mathematical Modelling & Scientific Computing, Practical Numerical Analysis Michaelmas Term 2018, Lecture 4 Root Finding The idea of root finding is simple we want
More informationMotivation: We have already seen an example of a system of nonlinear equations when we studied Gaussian integration (p.8 of integration notes)
AMSC/CMSC 460 Computational Methods, Fall 2007 UNIT 5: Nonlinear Equations Dianne P. O Leary c 2001, 2002, 2007 Solving Nonlinear Equations and Optimization Problems Read Chapter 8. Skip Section 8.1.1.
More informationProblem set 7 Math 207A, Fall 2011 Solutions
Problem set 7 Math 207A, Fall 2011 s 1. Classify the equilibrium (x, y) = (0, 0) of the system x t = x, y t = y + x 2. Is the equilibrium hyperbolic? Find an equation for the trajectories in (x, y)- phase
More informationHomework and Computer Problems for Math*2130 (W17).
Homework and Computer Problems for Math*2130 (W17). MARCUS R. GARVIE 1 December 21, 2016 1 Department of Mathematics & Statistics, University of Guelph NOTES: These questions are a bare minimum. You should
More informationOutline. Scientific Computing: An Introductory Survey. Nonlinear Equations. Nonlinear Equations. Examples: Nonlinear Equations
Methods for Systems of Methods for Systems of Outline Scientific Computing: An Introductory Survey Chapter 5 1 Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign
More informationLab 4: Gauss Gun Conservation of Energy
Lab 4: Gauss Gun Conservation of Energy Before coming to Lab Read the lab handout Complete the pre-lab assignment and hand in at the beginning of your lab section. The pre-lab is written into this weeks
More informationMath 232, Final Test, 20 March 2007
Math 232, Final Test, 20 March 2007 Name: Instructions. Do any five of the first six questions, and any five of the last six questions. Please do your best, and show all appropriate details in your solutions.
More information14 Increasing and decreasing functions
14 Increasing and decreasing functions 14.1 Sketching derivatives READING Read Section 3.2 of Rogawski Reading Recall, f (a) is the gradient of the tangent line of f(x) at x = a. We can use this fact to
More informationFunctions and their Graphs
Chapter One Due Monday, December 12 Functions and their Graphs Functions Domain and Range Composition and Inverses Calculator Input and Output Transformations Quadratics Functions A function yields a specific
More informationMATH 350: Introduction to Computational Mathematics
MATH 350: Introduction to Computational Mathematics Chapter IV: Locating Roots of Equations Greg Fasshauer Department of Applied Mathematics Illinois Institute of Technology Spring 2011 fasshauer@iit.edu
More informationRiemann Integration. James K. Peterson. February 2, Department of Biological Sciences and Department of Mathematical Sciences Clemson University
Riemann Integration James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University February 2, 2017 Outline 1 Riemann Sums 2 Riemann Sums In MatLab 3 Graphing
More informationNumerical Analysis and Computing
Numerical Analysis and Computing Lecture Notes #02 Calculus Review; Computer Artihmetic and Finite Precision; and Convergence; Joe Mahaffy, mahaffy@math.sdsu.edu Department of Mathematics Dynamical Systems
More informationRunge - Kutta Methods for first order models
Runge - Kutta Methods for first order models James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University October 30, 2013 Outline Runge - Kutte Methods
More informationSOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS BISECTION METHOD
BISECTION METHOD If a function f(x) is continuous between a and b, and f(a) and f(b) are of opposite signs, then there exists at least one root between a and b. It is shown graphically as, Let f a be negative
More informationDetermining the Roots of Non-Linear Equations Part I
Determining the Roots of Non-Linear Equations Part I Prof. Dr. Florian Rupp German University of Technology in Oman (GUtech) Introduction to Numerical Methods for ENG & CS (Mathematics IV) Spring Term
More informationWhy This Class? James K. Peterson. August 22, Department of Biological Sciences and Department of Mathematical Sciences Clemson University
Why This Class? James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University August 22, 2013 Outline 1 Our Point of View Mathematics, Science and Computer
More informationMidterm Review. Igor Yanovsky (Math 151A TA)
Midterm Review Igor Yanovsky (Math 5A TA) Root-Finding Methods Rootfinding methods are designed to find a zero of a function f, that is, to find a value of x such that f(x) =0 Bisection Method To apply
More informationThe Derivative of a Function
The Derivative of a Function James K Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University March 1, 2017 Outline A Basic Evolutionary Model The Next Generation
More informationSample Project: Simulation of Turing Machines by Machines with only Two Tape Symbols
Sample Project: Simulation of Turing Machines by Machines with only Two Tape Symbols The purpose of this document is to illustrate what a completed project should look like. I have chosen a problem that
More informationAdvanced Mathematics Unit 2 Limits and Continuity
Advanced Mathematics 3208 Unit 2 Limits and Continuity NEED TO KNOW Expanding Expanding Expand the following: A) (a + b) 2 B) (a + b) 3 C) (a + b)4 Pascals Triangle: D) (x + 2) 4 E) (2x -3) 5 Random Factoring
More informationAdvanced Mathematics Unit 2 Limits and Continuity
Advanced Mathematics 3208 Unit 2 Limits and Continuity NEED TO KNOW Expanding Expanding Expand the following: A) (a + b) 2 B) (a + b) 3 C) (a + b)4 Pascals Triangle: D) (x + 2) 4 E) (2x -3) 5 Random Factoring
More informationPhysics 202 Laboratory 3. Root-Finding 1. Laboratory 3. Physics 202 Laboratory
Physics 202 Laboratory 3 Root-Finding 1 Laboratory 3 Physics 202 Laboratory The fundamental question answered by this week s lab work will be: Given a function F (x), find some/all of the values {x i }
More information4 damped (modified) Newton methods
4 damped (modified) Newton methods 4.1 damped Newton method Exercise 4.1 Determine with the damped Newton method the unique real zero x of the real valued function of one variable f(x) = x 3 +x 2 using
More informationCLASS NOTES Models, Algorithms and Data: Introduction to computing 2018
CLASS NOTES Models, Algorithms and Data: Introduction to computing 2018 Petros Koumoutsakos, Jens Honore Walther (Last update: April 16, 2018) IMPORTANT DISCLAIMERS 1. REFERENCES: Much of the material
More information1.4 Techniques of Integration
.4 Techniques of Integration Recall the following strategy for evaluating definite integrals, which arose from the Fundamental Theorem of Calculus (see Section.3). To calculate b a f(x) dx. Find a function
More informationSection 1.1 Algorithms. Key terms: Algorithm definition. Example from Trapezoidal Rule Outline of corresponding algorithm Absolute Error
Section 1.1 Algorithms Key terms: Algorithm definition Example from Trapezoidal Rule Outline of corresponding algorithm Absolute Error Approximating square roots Iterative method Diagram of a general iterative
More informationRiemann Integration. Outline. James K. Peterson. February 2, Riemann Sums. Riemann Sums In MatLab. Graphing Riemann Sums
Riemann Integration James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University February 2, 2017 Outline Riemann Sums Riemann Sums In MatLab Graphing
More informationDerivatives in 2D. Outline. James K. Peterson. November 9, Derivatives in 2D! Chain Rule
Derivatives in 2D James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University November 9, 2016 Outline Derivatives in 2D! Chain Rule Let s go back to
More informationUniform Convergence Examples
Uniform Convergence Examples James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University October 13, 2017 Outline More Uniform Convergence Examples Example
More informationSOLVING EQUATIONS OF ONE VARIABLE
1 SOLVING EQUATIONS OF ONE VARIABLE ELM1222 Numerical Analysis Some of the contents are adopted from Laurene V. Fausett, Applied Numerical Analysis using MATLAB. Prentice Hall Inc., 1999 2 Today s lecture
More informationScientific Computing: An Introductory Survey
Scientific Computing: An Introductory Survey Chapter 5 Nonlinear Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction
More informationThe First Derivative and Second Derivative Test
The First Derivative and Second Derivative Test James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University April 9, 2018 Outline 1 Extremal Values 2
More informationMATHEMATICS (MEI) 4776 Numerical Methods
ADVANCED SUBSIDIARY GCE MATHEMATICS (MEI) 4776 Numerical Methods * OCE / V 0 221 5 * Candidates answer on the Answer Booklet OCR Supplied Materials: 8 page Answer Booklet Graph paper MEI Examination Formulae
More informationMATH 350: Introduction to Computational Mathematics
MATH 350: Introduction to Computational Mathematics Chapter IV: Locating Roots of Equations Greg Fasshauer Department of Applied Mathematics Illinois Institute of Technology Spring 2011 fasshauer@iit.edu
More informationSTOP, a i+ 1 is the desired root. )f(a i) > 0. Else If f(a i+ 1. Set a i+1 = a i+ 1 and b i+1 = b Else Set a i+1 = a i and b i+1 = a i+ 1
53 17. Lecture 17 Nonlinear Equations Essentially, the only way that one can solve nonlinear equations is by iteration. The quadratic formula enables one to compute the roots of p(x) = 0 when p P. Formulas
More informationRunge - Kutta Methods for first order models
Runge - Kutta Methods for first order models James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University October 30, 2013 Outline 1 Runge - Kutte Methods
More informationChapter 2 Solutions of Equations of One Variable
Chapter 2 Solutions of Equations of One Variable 2.1 Bisection Method In this chapter we consider one of the most basic problems of numerical approximation, the root-finding problem. This process involves
More informationNumerical Methods Dr. Sanjeev Kumar Department of Mathematics Indian Institute of Technology Roorkee Lecture No 7 Regula Falsi and Secant Methods
Numerical Methods Dr. Sanjeev Kumar Department of Mathematics Indian Institute of Technology Roorkee Lecture No 7 Regula Falsi and Secant Methods So welcome to the next lecture of the 2 nd unit of this
More informationMath 473: Practice Problems for Test 1, Fall 2011, SOLUTIONS
Math 473: Practice Problems for Test 1, Fall 011, SOLUTIONS Show your work: 1. (a) Compute the Taylor polynomials P n (x) for f(x) = sin x and x 0 = 0. Solution: Compute f(x) = sin x, f (x) = cos x, f
More informationMatrices and Vectors
Matrices and Vectors James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University November 11, 2013 Outline 1 Matrices and Vectors 2 Vector Details 3 Matrix
More informationThe First Derivative and Second Derivative Test
The First Derivative and Second Derivative Test James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University November 8, 2017 Outline Extremal Values The
More informationSolving nonlinear equations
Chapter Solving nonlinear equations Bisection Introduction Linear equations are of the form: find x such that ax + b = 0 Proposition Let f be a real-valued function that is defined and continuous on a
More informationMath Introduction to Numerical Methods - Winter 2011 Homework 2 Assigned: Friday, January 14, Due: Thursday, January 27,
Math 371 - Introduction to Numerical Methods - Winter 2011 Homework 2 Assigned: Friday, January 14, 2011. Due: Thursday, January 27, 2011.. Include a cover page. You do not need to hand in a problem sheet.
More information(Refer Slide Time: 00:32)
Nonlinear Dynamical Systems Prof. Madhu. N. Belur and Prof. Harish. K. Pillai Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 12 Scilab simulation of Lotka Volterra
More informationVariable. Peter W. White Fall 2018 / Numerical Analysis. Department of Mathematics Tarleton State University
Newton s Iterative s Peter W. White white@tarleton.edu Department of Mathematics Tarleton State University Fall 2018 / Numerical Analysis Overview Newton s Iterative s Newton s Iterative s Newton s Iterative
More information