Ordinary Differential Equations: Initial Value problems (IVP)

Size: px
Start display at page:

Download "Ordinary Differential Equations: Initial Value problems (IVP)"

Transcription

1 Chapter Ordinary Differential Equations: Initial Value problems (IVP) Many engineering applications can be modeled as differential equations (DE) In this book, our emphasis is about how to use computer to solve practical problems No doubt it is very important for scientists and engineers know to solve differential equations, either ordinal differential equations (ODE), or partial differential equations (PDE) using numerical methods that can be implemented on computers We start this chapter with ordinal differential equations (single os system) of initial value problems (IVP) Examples of differential equations Newton cooling model: du = c(u sur u), t > 0, u(0) = u 0 is given () This is an ordinary differential equation (ODE) with an initial value u(0) is given It is also called an initial value problem (IVP) Heat diffusion and heat equations u t = x ( β u ), a < x < b, t > 0, () x = β u, if β is a constant, (3) x u(a, t) = g (t), u(b, t) = g (t), the boundary condition, (4) u(x, 0) = u 0 (x), the initial condition (5) The equation is a partial differential equation (PDE) with initial and boundary conditions It is also called an initial and boundary value problem (IBVP) 5

2 6 Z Li The following equation is called one dimensional linear parabolic equation with a source; u t = x ( β u ) + α(x, t) u + γ(x, t)u + f(x, t), a < x < b, t > 0, (6) x t with a boundary condition at two ends and an initial condition The one way wave equation (first order PDE) u + c u = 0, a < x < b, t > 0, (7) t x u(a, t) = g (t), if c > 0, the boundary condition, (8) u(x, 0) = u 0 (x), the initial condition, (9) where c is called the wave speed Note that there is only one boundary condition The following equation is called one dimensional first order linear PDE u t = c u + α(x, t)u + f(x, t), a < x < b, t > 0, (0) x with a boundary condition at one end and an initial condition One-dimensional elliptic equations (steady state solution of the parabolic differential equation) x ( β u x ) + α(x) u x + γ(x)u = f(x), a < x < b, () u(a) = u a, u(b) = u b, the boundary condition () It is an ODE and is called a two-point boundary value problem (BVP) It is an elliptic type differential equation General linear second order partial differential equations: a(x, y)u xx + b(x, y)u xy + c(x, y)u yy + d(x, y)u x + e(x, y)u y + g(x, y)u = f(x, y), (3) where (x, y) Ω is a domain in x-y coordinates The PDE above can be classified as one of the following: Elliptic equation if equation b ac < 0 for all (x, y) Ω Examples include the Laplace u xx + u yy = 0, (4) and the Poisson equation u xx + u yy = f(x, y) (5)

3 Computational Mathematics 7 Parabolic equation if b ac = 0 for all (x, y) Ω One example is the heat equation with/without a source u t = βu xx + f(x, t) (6) An example in two space dimensions is u t = β(u xx + u yy ) + f(x, y, t) (7) Hyperbolic equation if b ac > 0 for all (x, y) Ω Example includes the two way wave equation u tt = c u xx (8) Mixed type if b ac changes sign in Ω A modeling example: simple pendulum θ L \tex{$l$} \tex{$\theta$} θ = 0 \tex{$\theta=0$} Mg \tex{$mg$} Figure : A diagram of a pendulum Consider the motion of a pendulum with mass M at the end of a rigid bar of length L Let θ(t) be the angle of the pendulum from the vertical at time t, as illustrated in Figure Ignoring the mass of the bar, the friction forces and air resistance, the differential equation for the pendulum motion becomes Ma = Mg sin θ, where g is the gravitation constant Since S = Lθ where S is the arc, we have v = L θ and a = L θ, where v denotes the velocity and a is the acceleration Consequently, we have the following non-linear boundary value: θ = g L sin θ = K sin θ, K = g L, () with two reasonable conditions

4 8 Z Li If we know both the initial position and the velocity, say θ(0) = α (eg α = π/4), and θ (0) = β We have an initial value problem (IVP) If we know both the initial position and the velocity, say θ(0) = α (eg α = π/4), and θ (T ) = β as observed at some later time T > 0 We have a two-point boundary value problem (BVP) Remark If θ is very small, then we can use the approximation sin θ = θ + O(θ 3 ) to get a linear differential equation θ + Kθ = 0, θ(0) = α, θ (0) = β () Remark We can change the second order ODE-IVP to a first order system of ODE- IVP Let y (t) = θ(t), y (t) = θ (t), then we have y (t) = y, (3) y (t) = K sin y, y (0) = α, y (0) = β (4) Predator-prey population model: Lotka-Volterra model Consider a system in which there are only two species: the number of predators P (t) such as sharks at time t; and the number of its prey N(t) The rate o change of the prey population is given as dn(t) = an(t) bn(t)p (t), (5) where a is the birth rate of the prey The second term means that the losses due to predation are proportional to both the number of predator and prey For the predator, the corresponding rate is dp (t) = dp (t) + cn(t)p (t), (6) where dp (t) is the effect of mortality, and cn(t)p (t) is the growth from predation We have a first order non-linear ODE system, called the Lotka-Volterra model One question is: can the two species co-exits? There are plenty of research papers on the model Can we use numerical simulations to answer this question? Note that, the right hand sides of the ODE system do not depend on the independent variable t explicitly Such a system is called autonomous If we plot P (t) versus N(t), or vise versa, these plots are called the phase plots The steady state solution of the model: If a solution to the system does depend on the time, the solution is called the steady state solution For the population model, they should satisfy dn(t) dp (t) = 0 and = 0 Thus we

5 Computational Mathematics 9 get an algebraic system of equations (typically for ODEs): 0 = an(t) bn(t)p (t) (7) 0 = dp (t) + cn(t)p (t) (8) We can immediately spot two solutions One is (0, 0) which is called the trivial solution The other one is (a/b, d/c) It is likely that the long term solution will approach one of the steady state solution In the first case, both species will die; while in the second case, two species will co-exit Note that we should non-dimensionalize the system to reduce the parameters (later) General first order ODE-IVP The problem in the vector form can be written as dy(t) = f(t, y(t)), t > 0 (9) y(t 0 ) = y 0, (0) where y, f, y 0 can be vectors; f and y 0 are known, while y is unknown It is a quasi-linear first order system of non-linear ordinary differential equations In component form, it can be written as dy (t) dy (t) dy m (t) = f (t, y (t), y (t),, y m (t)) = f (t, y (t), y (t),, y m (t)) = f m (t, y (t), y (t),, y m (t)) y (t 0 ) = α, y (t 0 ) = α,, y m (t 0 ) = α m High order ODEs can be transformed to a first order system of ODEs Consider y (n) = f(t, y (t), y (t),, y (n) (t)) y(t 0 ) = α, y (t 0 ) = α,, y (n) (t 0 ) = α n If we set y = y, y = y,, y n = y (n ), then we get dy (t) dy (t) dy n (t) = y, = y 3 = f(t, y (t), y (t),, y n (t)) y (t 0 ) = α, y (t 0 ) = α,, y n (t 0 ) = α n

6 0 Z Li Theoretical background For a quasi-linear first order ODE system, we need to know: Is there a solution? Is the solution unique? Is the solution insensitive to the data? If the answer to all the questions is yes, then the problem is called well-posed If not, then the problem is called ill well-posed Ill posed problems need special treatments and will typically not to be discussed here Theorem: If f(t, y) is Lipschitz continuous in a neighborhood of (t 0, y(t 0 )), then the initial value problem admits a unique solution in the neighborhood 3 The Euler s method for the Newton cooling model The differential equation is: dy = c(y sur y), t > 0 y(0) = y 0 is given Choose a value h for the size of every step and set t n = 0 + nh Now, one step of the Euler method from t n to t n+ = t n + h (the finite difference equation) is y n+ y n h = c(y sur y n ), y 0 = y 0, () where y n is an approximation to the solution y(t n ) = y(nh) The forward finite difference approximation to y(t) is called the forward Euler method It is also called an explicit time marching method 3 Finite difference methods We discuss how to use finite difference methods to solve ODE and PDEs While there are other different approaches, finite difference methods probably are simplest to use, implement, and easy to analysis Finite difference methods are also basis for other numerical methods A finite difference method typically involves the following steps: Generate a grid, for example (x i, t (k) ), where we want to find an approximate solution Substitute the derivatives in an ODE/PDE or an ODE/PDE system of equations with finite difference schemes The ODE/PDE then become a linear/non-linear system of algebraic equations

7 Computational Mathematics 3 Solve the system of algebraic equations 4 Implement and debug the computer code 5 Do the error analysis, both analytically and numerically 3 The Euler s method for ODE-IVP Given an initial value problem, (9)-(0), dy(t) = f(t, y(t)), t > 0, y(t 0 ) = y 0 If we know an approximate solution y n y(t n ) at a time t n, and a given time step size h, the one-step Euler s method is: y n+ y n = f(t n, y n ); or y n+ = y n + h f(t n, y n ) () h If we repeat this process, we can get an approximate solution at any time This is called the Euler s method In this method, we do not need to solve any equations, so it is called an explicit finite difference method Note that we use y(t n ) for the true solution to the ODE-IVP; and y n for the approximate solution Usually y(t n ) y n Ch is not zero but proportional to the step size h, so it is called a first order accurate method Note that besides Finite Difference methods, there are other methods that can be used to solve ODE/PDEs such as Finite element methods, spectral methods etc Generally finite difference are simple to use for problems defined on regular geometries, such as an interval in D, a rectangular domain in two space dimensions, and a cubic in three space dimensions 3 Some commonly used finite difference formulas Below we list three commonly used finite difference formulas to approximate the first order derivative of a function u(x) using the function values only The forward finite difference D + u(x) = u(x + h) u(x) h = u (x) + u (ξ)h () Therefore the error (absolute error) of the forward finite difference is proportional to h and the approximation is referred as a first order approximation The backward finite difference D u(x) = u(x) u(x h) h The approximation again is a first order approximation = u (x) u (ξ)h (3)

8 Z Li The central finite difference D 0 u(x) = u(x + h) u(x h) h = u (x) + h 6 u (ξ) (4) The error is proportional to h and the approximation is referred as a second order approximation Note that D 0 u(x) = (D +u(x) + D + u(x)) (5) 33 Approximation to high order derivatives Usually finite difference schemes for high order derivatives can be obtained from the formulas for lower order derivatives The central finite difference scheme for the second order derivative u xx is D0 u(x) = D u(x) u(x h) +D u(x) = D + h u(x h) u(x) + u(x + h) = h = u xx (x) + h u(4) (ξ) (6) So it is a second order approximation The third order derivative u xxx can be approximated, for example D 3 u(x) = D + D0u(x) u(x + h) 3u(x + h) + 3u(x) u(x h) = h 3 = u xxx (x) + h u(4) (ξ) (7) There are other approaches to construct finite difference schemes, for example, the method of un-determined coefficients, polynomial interpolations and others 4 Mathematical and practical issues of finite difference methods We know that we can use the Euler method to solve ordinary differential equations of initial value problems (IVP) However, we need to answer the following questions How accurate is the Euler method? Or more precisely, does the method converge, under what kind of conditions? Does lim h 0 y(t n ) y n 0? What is the best choice of the step size? If it is too small, then it takes to long to compute If it is too large, it may blow up, or lose accuracy Are there other better methods?

9 Computational Mathematics 3 4 The local truncation error In the Euler s method, we use the forward finite difference approximation to approximate the derivation which introduces an error Such an error is called the local truncation error which is defined as T n = y(tn+ ) y(t n ) f(t n, y(t n )) () h The local truncation error can be obtained as follows First, rewrite the finite difference method as a mimic to the original differential equation and move all terms to one side; Second, replace the approximation with the true solution Consistency of a finite difference method If we have lim h 0 T n = 0, then the finite difference method is called consistent Usually, the local truncation error is not zero But we wish to stress its relation with the step size h and write as T n Ch p, if h is small enough () for some constant C and integer p If so, we call the discretization is p-th order accurate Let us discuss the order of discretization of the Euler s method for a scalar ODE y (t) = f(t, y), y(0) = y 0 We have T n = y(tn+ ) y(t n ) h f(t n, y(t n )) = y(tn + h) y(t n ) h f(t n, y(t n )) = y(tn ) + hy (t n ) + h y (t n ) + y(t n ) f(t n, y(t n )) = h h y (t n ) + O(h ) Note that we have used the fact of y (t n ) = f(t n, y(t n )) from the ODE Thus the discretization of the Euler s method is first order 4 The stability condition From numerical experiments, we already know that if we take the step size h too large, then the numerical solution blows up quickly even though the Euler s method is consistent Why do we have this behavior? Consider the Euler s method for the special case y (t) = λy, y(0) =, where λ is a constant, then the Euler method is y n+ = y n + hλy n = ( + hλ)y n = ( + hλ) y n = ( + hλ) 3 y n = ( + hλ) n+ y 0 = ( + hλ) n+ Now we can see that if + hλ >, then y n will blow-up If we let λ be an arbitrary complex number, and assume that Re(λ) < 0, then the domain of + hλ is called the

10 4 Z Li stability region Note that, the solution to the ODE is y(t) = e λt In order y(t) is bounded, we should have Re(λ) < 0 Such a requirement is called the dynamic stability which is independent of numerical methods For general problems, λ f y (t, y) If λ = λ is a negative real number, then the step size h should be chosen as + hλ = h λ, h λ, h 0 and h λ = λ The condition is often referred as CFL condition (Courant-Fletcher-Levy) Roughly speaking, we call a numerical method is stable if y n C, where C is a constant, that is, the magnitude of the solution will not grow arbitrarily For the Euler s method, if we have h λ, then it is stable Because of this, the Euler s method is called conditional stable Theorem A stable and consistent method is convergent, that is, lim h 0 y(t n ) y n 0 43 The backward Euler s method If we use the backward finite difference formula for y (t), we get y n+ y n h = f(t n+, y n+ ); or y n+ = y n + h f(t n+, y n+ ) (3) Can you find the differences with the Euler s method? Note that, if f(t, y) is a non-linear function, then we need to solve a non-linear system of equations to get y n+ ) Example: If f(t, y) = y, then the backward Euler s method is y n+ = y n h (y n+ ) We need to solve a quadratic equations to get y n+ How about f(t, y) = sin y, we have y n+ = y n h sin y n+ We need to use a non-linear solver! Thus, the backward Euler s method is called an implicit method The local truncation error of the backward Euler s method is If we expand T n = y(tn+ ) y(t n ) h f(t n+, y(t n+ )) (4) we get y(t n ) = y(t n+ h) = y(t n+ ) hy (t n+ ) + h y (tn + ) +, T n = h y (t n+ ) + O(h )

11 Computational Mathematics 5 Thus the discretization of the backward Euler s method is still first order So is there any advantage of the method compared with the forward Euler s method? Let us check the stability of the backward Euler s method by setting f(t, y) = λy Then the backward Euler method is y n+ = y n + hλy n+, = y n+ = hλ yn The stability condition is / hλ For dynamically stable ODEs, we have Re(λ) < 0, thus the stability condition is always satisfied Thus the method is called unconditionally stable This is the most significant advantage of the backward Euler method Figure : A diagram of the stability regions The left: The forward Euler s method which is the inside the unit circle; The center: The backward Euler s method which is the outside the unit circle; The right: The Crank-Nicholson s method which includes the entire left plane The backward Euler s method has the largest stability region 44 The Crank-Nicholson method Can we have a second order and unconditional finite difference method? The answer is the following Crank-Nicholson method y n+ y n = ( f(t n, y n ) + f(t n+, y n+ ) ) ; h or (5) y n+ = y n + h ( f(t n, y n ) + f(t n+, y n+ ) ) (6) In the Crank-Nicholson method, we use the average of f at t n and t n+ The local truncation error is T n = y(tn+ ) y(t n ) ( f(t n, y(t n )) + f(t n+, y(t n+ )) ) (7) h If we expand the expressions above at t n+/ = t n + h, we can get T n = h 6 y(4) (t n+/ ) + O(h 4 )

12 6 Z Li Thus the discretization of the Crank-Nicholson method is second order It is also unconditionally stable For non-liner problem, the stability is better than the forward Euler s method, but not as good as the backward Euler s method The Crank-Nicholson method is an implicit method since we need to solve a non-linear system of equations in general A modified version is a predictor-corrector method: ȳ n+ = y n + hf(t n, y n ) predictor (8) y n+ = y n + h ( f(t n, y n ) + f(t n+, ȳ n+ ) ) corrector (9) Now the method becomes an explicit method which is conditional stable (better than the forward Euler s method) and it is second order method Such a method is one the Runge- Kutta method 5 Runge-Kutta Method The RungeKutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations These techniques were developed around 900 by the German mathematicians C Runge and M W Kutta Runge The RungeKutta methods are one-step multi-stage methods designed to have high order accuracy, adaptive time step sizes; choice for non-stiff and stiff system of ODEs These techniques were developed around 900 by the German mathematicians C Runge and M W Kutta The general Algorithm of RK-k can be written as follows: y i+ = y i + h (c 0 f 0 + c f + + c k f k ) () Example: The improved Euler s method is one of RK methods: Usually we have f 0 = f(t i, y i ), f = f(t i+, y i + hf 0 ), ( y i+ = y i + h f 0 + ) f f 0 = f(t i, y i ) f = f ( t i + α h, y i ) + hβ 0 f 0 f k = f ( t i + α k h, y i + h(β k0 f 0 + β k f + + β k,k f k ) The forward Euler, backward Euler, and the Crank-Nicholson schemes all are special cases of the RK methods One of RK method, the improved Euler s method is:

13 Computational Mathematics 7 i α i β ij c i 0 0 k Table : Coefficients of the RK methods i α i β ij c i 0 0 Table : The coefficients of the improved Euler s method i α i β ij c i Table 3: The coefficients of a RK-4 method

14 8 Z Li Below is one of RK4 methods: It is equivalent to: f 0 = f(t i, y i ), f = f(t i + h, yi + h f 0), f = f(t i + h, yi + h f ), () f 3 = f(t i + h, y i + hf ) y i+ = y i + h 6 (f 0 + f + f + f 3 ) 6 Fehlberg s RKF4(5) Method Below are two Runge-Kutta methods, RK4+RK5 The purpose of the method is to choose suitable time step i α i β ij c i ĉ i Table 4: The coefficients of a RK(4)-RK(5) method RK4: ȳ i+ = y i + h (c 0 f 0 + c f + c f + c 3 f 3 + c 4 f 4 ) RK5: y i+ = y i + h (ĉ 0 f 0 + ĉ f + ĉ f + ĉ 3 f 3 + ĉ 4 f 4 + ĉ 5 f 5 ) A typical expression for f i is ( [ f 4 = f x i + h, y i + h 7 f f 7 5 f + 6 ]) 5 f 3 We can prove that () ȳ i y i = Ah 5 () and use this to determine an adaptive time step size h ȳ i y i > tol, use a smaller time step ȳ i y i < tol, use a larger time step

15 Computational Mathematics 9 7 Use Matlab ODE-Suite The MATLAB ODE suite is a collection of Matlab codes (M-files) developed by Lawrence F Shampine and Mark W Reichelt for solving ordinary differential equations The ODE-Suite is based explicit and implicit Runge-Kutta methods with adaptive time step sizes Non-stiff solvers ode45 : Solve non-stiff differential equations, medium order method ode3: Solve non-stiff differential equations, low order method ode3: Solve non-stiff differential equations, variable order method Stiff solvers ode5s: Solve stiff differential equations, variable order method ode3s: Solve stiff differential equations, low order method Options-handling functions odeset: Build or change an options argument for an ODE suite integrator odeget: Extract options from an options argument created with ODESET A graphical demo odedemo: Demo for the ODE suite integrators 7 Matlab ODE Suite usage We can use one of the ODE solvers of the ODE Suite to solve an ODE-IVP problem dy(t) = f(t, y(t)), t > 0, y(t 0 ) = y 0 using (the simplest way) [t, y] = ode45( yfun,[t0, tfinal],y0); where tfinal > t0 is the final time, y0 = y 0 is the initial condition, yfun is the Matlab function that defines the system of the ODEs, [t, y] is the solution output Below is a sample example (LotkaVolterra equation)

16 30 Z Li function yp = lotka(t,y) global a b c d k = length(y); yp = zeros(k,); yp() = a*y()-b*y()*y(); yp() = -c*y() + d*y()*y(); The phase plot y (t) t y (t) y (t) t y (t) Figure 3: Plot of the prey-predator model Left, the solution y (t) and y (t) versus time t, Right: the phase plot Below is a sample script file to solve the system close all; clear all; % start everything new global a b c d a=; b=; c=05; d=05; tfinal=50; y0=[, 0] ; [t, y] = ode3s( lotka,[0, tfinal],y0); y=y(:,); y=y(:,); % extract the components subplot() % put two plots on a same plot ( rows, column) plot(t,y) subplot() plot(t,y) figure() plot(y,y) % Get the phase plot title( The phase plot ) xlabel( y_(t) ) ylabel( y_(t) ) % Try also gtext( ) After running the program, you can see that the two species can co-exist since the phase plane plot will show the so called the limit cycle, see Fig3

17 Computational Mathematics 3 The output data structure t y y y3 t()=t0 y(t0) y(t0) y3(t0) t() =t0+h y(t()) y(t()) y3(t()) t(n+) = tfinal y(t(n+)) y(t(n+)) y3(t(n+)) If we wish to extract the first variable y (t), we can use y = y(:, ) Similarly, y3 = y(:, 3) would be y 3 (t) at the recorded time 7 Steady state solutions (equilibrium), long term behavior, and stability Consider the following first order autonomous system of ordinary differential equations dy = f(y), t > 0, y(t 0 ) = y 0 () The system is called autonomous because the independent variable t is not explicitly appeared in the equations although the solution y(t) is still the function of time t Previous examples, including the Newton s law of cooling, the prey-predator model, are all examples of autonomous systems conditions Note that a steady state solution is independent of initial If there are solutions that are independent of t, that is, dy(t) = 0, then such solutions are called the steady state solution For a first order ODE system, the steady solution is a constant (a number) or a constant vector The steady state solutions are also called the equilibriums for physically applications, particularly in mechanics Example The steady state solution of y = y is y = 0 It is the limit of the solution y(t) = y(0)e t as t To get the steady stead solutions of (), we need to solve the algebraic system of equations f(y) = 0 ()

18 3 Z Li Example The steady state solution of y = c(y sur y) is y = y sur It is the limit of the solution y(t) = (y(0) y sur )e t + y sur as t Example 3 Find the steady state solutions of the non-dimensionalized prey-predator model du = u( v), (3) dv = αv( u), the steady state solutions are (0, 0) and (, ) In the first case, both species are dead while in the second case, the two species can co-exist When a dynamic system stabilizes, often the solution has a pattern The solution either reaches one of its equilibriums, or stay in the neighborhood of it How can we find the patten? We can find the pattern through the stability analysis 73 Classification of the steady state solutions of scalar ODEs Consider an autonomous system of one equation dy = f(y) (4) Let y be a steady state solution, that is, f(y ) = 0 In an neighborhood of y, we can use the Taylor expansion to get dy = f(y ) + f (y )(y y ) + O(y y ) f (y )(y y ) (5) Thus in the neighborhood of y, that is y y is small, the solution is Thus we have the following stability conclusion: y(t) = y + Ce f (y ) t + O(y y ) (6) If f (y ) < 0, then y(t) approaches y exponentially In this case, y is called a stable equilibrium If f (y ) > 0, then y(t) runs away from y exponentially In this case, y is called a unstable equilibrium In the example y = y, y = 0 is an unstable equilibrium since f (y ) = > 0 In the example y = y, y = 0 is a stable equilibrium since f (y ) = < 0 Example 4 The steady state solution of y = c(y sur y) is y = y sur We have f (y sur ) = c < 0, therefore y = y sur is a stable equilibrium as we have already known A system that can change with time

19 Computational Mathematics Classification of the steady state solutions of first order system of ODEs with two variables Consider a first order system of ODEs with two variables y = f (y, y ) (7) y = f (y, y ) (8) An equilibrium (y, y ) is a pair of two numbers that satisfies f (y, y ) = 0 and f (y, y ) = 0 The two dimensional Taylor expansion at (y, y ) is f (y, y ) = f (y, y ) + f y (y y ) + f y (y y ) + = f y (y y ) + f y (y y ) + f (y, y ) = f (y, y ) + f y (y y ) + f y (y y ) + = f y (y y ) + f y (y y ) + The stability is determined by the eigenvalues of the Jacobi matrix (also called Jacobian) f f J(y, y) = y y f f (9) y y (y,y ) The eigenvalues of is the solution of det(λi J(y, y )) = 0 Let λ and λ be the eigenvalues of J(y, y ), then the stability of the equilibrium have the following cases Both λ and λ are real and positive, that is λ > 0 and λ > 0, the equilibrium is unstable Both λ and λ are real, but one of them is negative, then the equilibrium is unstable and it is called a saddle point If the eigenvalue is a complex, then they have to be in pair for real coefficients, that is, λ = α + βi and λ = α βi Typically, the solution will be oscillates in the neighborhood of the equilibrium If α > 0, the equilibrium is unstable The solution spirals away from the equilibrium If α < 0, the equilibrium is stable The solution spirals to the equilibrium

20 34 Z Li If α = 0, the equilibrium is neutral stable It is called a center The trajectory of the solution are closed curves near the equilibrium This indicated that the two species can co-exist forever! Figure 4: A diagram of the solution behaviors near an equilibrium Example 5 The non-dimensionalized prey-predator population model du dv = u( v), = αv( u), α > 0 The equilibriums are (0, 0) and (, ) The Jacobi matrix is: [ ] [ v u J(y, y ) = J(0, 0) = αv α( u) 0 0 α ] The eigenvalues of J(0, 0) are λ = > 0, and λ = α < 0 Thus the equilibrium (0, 0) is a unstable saddle point At the equilibrium (, ), the Jacobi matrix is: [ ] 0 J(, ) = α 0 The eigenvalues are the solution of λ + α = 0 The solution is λ = αi, λ = αi The equilibrium is a center as we expected

21 Computational Mathematics 35 Figure 5: A diagram of the solution behaviors in the phase plane near an equilibrium 75 Some famous examples It is interesting to try some famous examples such as the logistic model; the prey-predator model, and the chemical reaction model (Oregonator), and Lorenz s model Example 6 The logistic model is y = ry ( y ), (0) K where r and K are two positive constants The solution may have bifurcation or chaos for different values of r The discrete logistic model is y n+ = ry n ( y n ) () Figure 6 is a plot of the logistic map that shows bifurcations for the discrete logistic model Example 7 The Lorenz model is the following: x = σ(y x) () y = x(ρ z) y, (3) z = xy βz, (4) where σ, ρ, β are positive constants

22 36 Z Li Figure 6: A logistic map produced by Zhilin Li Figure 7: A phase plot of the Lorenz equations

23 Index autonomous, 3 backward Euler s method, 4 consistency, 3 convergency, 4 Crank-Nicholson method, 5 equilibrium, 3 Euler s method, explicit finite difference method, initial condition, 5 local truncation error, 3 Lotka-Volterra model, 8 Matlab ODE-Suite, 9 Newton cooling model, 5 pendulum model, 7 Runge-Kutta Method, 6 stability condition, 3 steady state solution, 3 37

Numerical Methods - Initial Value Problems for ODEs

Numerical Methods - Initial Value Problems for ODEs Numerical Methods - Initial Value Problems for ODEs Y. K. Goh Universiti Tunku Abdul Rahman 2013 Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs 2013 1 / 43 Outline 1 Initial Value

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 9 Initial Value Problems for Ordinary Differential Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign

More information

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

CS520: numerical ODEs (Ch.2)

CS520: numerical ODEs (Ch.2) .. CS520: numerical ODEs (Ch.2) Uri Ascher Department of Computer Science University of British Columbia ascher@cs.ubc.ca people.cs.ubc.ca/ ascher/520.html Uri Ascher (UBC) CPSC 520: ODEs (Ch. 2) Fall

More information

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations Finite Differences for Differential Equations 28 PART II Finite Difference Methods for Differential Equations Finite Differences for Differential Equations 29 BOUNDARY VALUE PROBLEMS (I) Solving a TWO

More information

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9 Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T. Heath Chapter 9 Initial Value Problems for Ordinary Differential Equations Copyright c 2001. Reproduction

More information

Ordinary differential equations - Initial value problems

Ordinary differential equations - Initial value problems Education has produced a vast population able to read but unable to distinguish what is worth reading. G.M. TREVELYAN Chapter 6 Ordinary differential equations - Initial value problems In this chapter

More information

Ordinary differential equation II

Ordinary differential equation II Ordinary Differential Equations ISC-5315 1 Ordinary differential equation II 1 Some Basic Methods 1.1 Backward Euler method (implicit method) The algorithm looks like this: y n = y n 1 + hf n (1) In contrast

More information

Ordinary Differential Equations I

Ordinary Differential Equations I Ordinary Differential Equations I CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations I 1 / 32 Theme of Last Few

More information

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK KINGS COLLEGE OF ENGINEERING MA5-NUMERICAL METHODS DEPARTMENT OF MATHEMATICS ACADEMIC YEAR 00-0 / EVEN SEMESTER QUESTION BANK SUBJECT NAME: NUMERICAL METHODS YEAR/SEM: II / IV UNIT - I SOLUTION OF EQUATIONS

More information

Numerical solution of ODEs

Numerical solution of ODEs Numerical solution of ODEs Arne Morten Kvarving Department of Mathematical Sciences Norwegian University of Science and Technology November 5 2007 Problem and solution strategy We want to find an approximation

More information

Ordinary Differential Equations

Ordinary Differential Equations CHAPTER 8 Ordinary Differential Equations 8.1. Introduction My section 8.1 will cover the material in sections 8.1 and 8.2 in the book. Read the book sections on your own. I don t like the order of things

More information

Lecture 42 Determining Internal Node Values

Lecture 42 Determining Internal Node Values Lecture 42 Determining Internal Node Values As seen in the previous section, a finite element solution of a boundary value problem boils down to finding the best values of the constants {C j } n, which

More information

Applied Math for Engineers

Applied Math for Engineers Applied Math for Engineers Ming Zhong Lecture 15 March 28, 2018 Ming Zhong (JHU) AMS Spring 2018 1 / 28 Recap Table of Contents 1 Recap 2 Numerical ODEs: Single Step Methods 3 Multistep Methods 4 Method

More information

Numerical Methods for Differential Equations

Numerical Methods for Differential Equations Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Linear Multistep methods Gustaf Söderlind and Carmen Arévalo Numerical Analysis, Lund University Textbooks: A First Course in the

More information

Initial value problems for ordinary differential equations

Initial value problems for ordinary differential equations AMSC/CMSC 660 Scientific Computing I Fall 2008 UNIT 5: Numerical Solution of Ordinary Differential Equations Part 1 Dianne P. O Leary c 2008 The Plan Initial value problems (ivps) for ordinary differential

More information

The family of Runge Kutta methods with two intermediate evaluations is defined by

The family of Runge Kutta methods with two intermediate evaluations is defined by AM 205: lecture 13 Last time: Numerical solution of ordinary differential equations Today: Additional ODE methods, boundary value problems Thursday s lecture will be given by Thomas Fai Assignment 3 will

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 11 Partial Differential Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002.

More information

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of Scientific Computing with Case Studies SIAM Press, 2009 http://www.cs.umd.edu/users/oleary/sccswebpage Lecture Notes for Unit V Solution of Differential Equations Part 1 Dianne P. O Leary c 2008 1 The

More information

STABILITY. Phase portraits and local stability

STABILITY. Phase portraits and local stability MAS271 Methods for differential equations Dr. R. Jain STABILITY Phase portraits and local stability We are interested in system of ordinary differential equations of the form ẋ = f(x, y), ẏ = g(x, y),

More information

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo 2008-11-07 Graded Project #1 Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo This homework is due to be handed in on Wednesday 12 November 2008 before 13:00 in the post box of the numerical

More information

Ordinary Differential Equations I

Ordinary Differential Equations I Ordinary Differential Equations I CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations I 1 / 27 Theme of Last Three

More information

Ordinary Differential Equations I

Ordinary Differential Equations I Ordinary Differential Equations I CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Doug James (and Justin Solomon) CS 205A: Mathematical Methods Ordinary Differential Equations I 1 / 35

More information

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP In this laboratory session we will learn how to. Use MATLAB solvers for solving scalar IVP 2. Use MATLAB solvers for solving higher order ODEs and

More information

Computation Fluid Dynamics

Computation Fluid Dynamics Computation Fluid Dynamics CFD I Jitesh Gajjar Maths Dept Manchester University Computation Fluid Dynamics p.1/189 Garbage In, Garbage Out We will begin with a discussion of errors. Useful to understand

More information

An Introduction to Numerical Methods for Differential Equations. Janet Peterson

An Introduction to Numerical Methods for Differential Equations. Janet Peterson An Introduction to Numerical Methods for Differential Equations Janet Peterson Fall 2015 2 Chapter 1 Introduction Differential equations arise in many disciplines such as engineering, mathematics, sciences

More information

8.1 Introduction. Consider the initial value problem (IVP):

8.1 Introduction. Consider the initial value problem (IVP): 8.1 Introduction Consider the initial value problem (IVP): y dy dt = f(t, y), y(t 0)=y 0, t 0 t T. Geometrically: solutions are a one parameter family of curves y = y(t) in(t, y)-plane. Assume solution

More information

Initial value problems for ordinary differential equations

Initial value problems for ordinary differential equations Initial value problems for ordinary differential equations Xiaojing Ye, Math & Stat, Georgia State University Spring 2019 Numerical Analysis II Xiaojing Ye, Math & Stat, Georgia State University 1 IVP

More information

Solving Ordinary Differential Equations

Solving Ordinary Differential Equations Solving Ordinary Differential Equations Sanzheng Qiao Department of Computing and Software McMaster University March, 2014 Outline 1 Initial Value Problem Euler s Method Runge-Kutta Methods Multistep Methods

More information

Part IB Numerical Analysis

Part IB Numerical Analysis Part IB Numerical Analysis Definitions Based on lectures by G. Moore Notes taken by Dexter Chua Lent 206 These notes are not endorsed by the lecturers, and I have modified them (often significantly) after

More information

Math 128A Spring 2003 Week 12 Solutions

Math 128A Spring 2003 Week 12 Solutions Math 128A Spring 2003 Week 12 Solutions Burden & Faires 5.9: 1b, 2b, 3, 5, 6, 7 Burden & Faires 5.10: 4, 5, 8 Burden & Faires 5.11: 1c, 2, 5, 6, 8 Burden & Faires 5.9. Higher-Order Equations and Systems

More information

Ordinary Differential Equations

Ordinary Differential Equations Chapter 13 Ordinary Differential Equations We motivated the problem of interpolation in Chapter 11 by transitioning from analzying to finding functions. That is, in problems like interpolation and regression,

More information

Mathematics for chemical engineers. Numerical solution of ordinary differential equations

Mathematics for chemical engineers. Numerical solution of ordinary differential equations Mathematics for chemical engineers Drahoslava Janovská Numerical solution of ordinary differential equations Initial value problem Winter Semester 2015-2016 Outline 1 Introduction 2 One step methods Euler

More information

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations ECE257 Numerical Methods and Scientific Computing Ordinary Differential Equations Today s s class: Stiffness Multistep Methods Stiff Equations Stiffness occurs in a problem where two or more independent

More information

Chapter 10. Initial value Ordinary Differential Equations

Chapter 10. Initial value Ordinary Differential Equations Chapter 10 Initial value Ordinary Differential Equations Consider the problem of finding a function y(t) that satisfies the following ordinary differential equation (ODE): dy dt = f(t, y), a t b. The function

More information

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP MAT 75 Laboratory 4 MATLAB solvers for First-Order IVP In this laboratory session we will learn how to. Use MATLAB solvers for solving scalar IVP. Use MATLAB solvers for solving higher order ODEs and systems

More information

Fourth Order RK-Method

Fourth Order RK-Method Fourth Order RK-Method The most commonly used method is Runge-Kutta fourth order method. The fourth order RK-method is y i+1 = y i + 1 6 (k 1 + 2k 2 + 2k 3 + k 4 ), Ordinary Differential Equations (ODE)

More information

Ordinary Differential Equations II

Ordinary Differential Equations II Ordinary Differential Equations II CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations II 1 / 29 Almost Done! No

More information

Butcher tableau Can summarize an s + 1 stage Runge Kutta method using a triangular grid of coefficients

Butcher tableau Can summarize an s + 1 stage Runge Kutta method using a triangular grid of coefficients AM 205: lecture 13 Last time: ODE convergence and stability, Runge Kutta methods Today: the Butcher tableau, multi-step methods, boundary value problems Butcher tableau Can summarize an s + 1 stage Runge

More information

Ordinary Differential Equations II

Ordinary Differential Equations II Ordinary Differential Equations II CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations II 1 / 33 Almost Done! Last

More information

Applied Mathematics 205. Unit III: Numerical Calculus. Lecturer: Dr. David Knezevic

Applied Mathematics 205. Unit III: Numerical Calculus. Lecturer: Dr. David Knezevic Applied Mathematics 205 Unit III: Numerical Calculus Lecturer: Dr. David Knezevic Unit III: Numerical Calculus Chapter III.3: Boundary Value Problems and PDEs 2 / 96 ODE Boundary Value Problems 3 / 96

More information

SOLUTION OF EQUATION AND EIGENVALUE PROBLEMS PART A( 2 MARKS)

SOLUTION OF EQUATION AND EIGENVALUE PROBLEMS PART A( 2 MARKS) CHENDU COLLEGE OF ENGINEERING AND TECHNOLOGY (Approved by AICTE New Delhi, Affiliated to Anna University Chennai. Zamin Endathur Village, Madurntakam Taluk, Kancheepuram Dist.-603311.) MA6459 - NUMERICAL

More information

INTRODUCTION TO PDEs

INTRODUCTION TO PDEs INTRODUCTION TO PDEs In this course we are interested in the numerical approximation of PDEs using finite difference methods (FDM). We will use some simple prototype boundary value problems (BVP) and initial

More information

Numerical Methods for Differential Equations

Numerical Methods for Differential Equations Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Multistep Methods Gustaf Söderlind Numerical Analysis, Lund University Contents V4.16 1. Runge Kutta methods 2. Embedded RK methods

More information

Numerical Integration of Ordinary Differential Equations for Initial Value Problems

Numerical Integration of Ordinary Differential Equations for Initial Value Problems Numerical Integration of Ordinary Differential Equations for Initial Value Problems Gerald Recktenwald Portland State University Department of Mechanical Engineering gerry@me.pdx.edu These slides are a

More information

Selected HW Solutions

Selected HW Solutions Selected HW Solutions HW1 1 & See web page notes Derivative Approximations. For example: df f i+1 f i 1 = dx h i 1 f i + hf i + h h f i + h3 6 f i + f i + h 6 f i + 3 a realmax 17 1.7014 10 38 b realmin

More information

AIMS Exercise Set # 1

AIMS Exercise Set # 1 AIMS Exercise Set #. Determine the form of the single precision floating point arithmetic used in the computers at AIMS. What is the largest number that can be accurately represented? What is the smallest

More information

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations We call Ordinary Differential Equation (ODE) of nth order in the variable x, a relation of the kind: where L is an operator. If it is a linear operator, we call the equation

More information

Partial Differential Equations

Partial Differential Equations Partial Differential Equations Introduction Deng Li Discretization Methods Chunfang Chen, Danny Thorne, Adam Zornes CS521 Feb.,7, 2006 What do You Stand For? A PDE is a Partial Differential Equation This

More information

Entrance Exam, Differential Equations April, (Solve exactly 6 out of the 8 problems) y + 2y + y cos(x 2 y) = 0, y(0) = 2, y (0) = 4.

Entrance Exam, Differential Equations April, (Solve exactly 6 out of the 8 problems) y + 2y + y cos(x 2 y) = 0, y(0) = 2, y (0) = 4. Entrance Exam, Differential Equations April, 7 (Solve exactly 6 out of the 8 problems). Consider the following initial value problem: { y + y + y cos(x y) =, y() = y. Find all the values y such that the

More information

Logistic Map, Euler & Runge-Kutta Method and Lotka-Volterra Equations

Logistic Map, Euler & Runge-Kutta Method and Lotka-Volterra Equations Logistic Map, Euler & Runge-Kutta Method and Lotka-Volterra Equations S. Y. Ha and J. Park Department of Mathematical Sciences Seoul National University Sep 23, 2013 Contents 1 Logistic Map 2 Euler and

More information

Introduction to standard and non-standard Numerical Methods

Introduction to standard and non-standard Numerical Methods Introduction to standard and non-standard Numerical Methods Dr. Mountaga LAM AMS : African Mathematic School 2018 May 23, 2018 One-step methods Runge-Kutta Methods Nonstandard Finite Difference Scheme

More information

Finite Difference and Finite Element Methods

Finite Difference and Finite Element Methods Finite Difference and Finite Element Methods Georgy Gimel farb COMPSCI 369 Computational Science 1 / 39 1 Finite Differences Difference Equations 3 Finite Difference Methods: Euler FDMs 4 Finite Element

More information

Numerical Methods for the Solution of Differential Equations

Numerical Methods for the Solution of Differential Equations Numerical Methods for the Solution of Differential Equations Markus Grasmair Vienna, winter term 2011 2012 Analytical Solutions of Ordinary Differential Equations 1. Find the general solution of the differential

More information

Lotka Volterra Predator-Prey Model with a Predating Scavenger

Lotka Volterra Predator-Prey Model with a Predating Scavenger Lotka Volterra Predator-Prey Model with a Predating Scavenger Monica Pescitelli Georgia College December 13, 2013 Abstract The classic Lotka Volterra equations are used to model the population dynamics

More information

Definition of differential equations and their classification. Methods of solution of first-order differential equations

Definition of differential equations and their classification. Methods of solution of first-order differential equations Introduction to differential equations: overview Definition of differential equations and their classification Solutions of differential equations Initial value problems Existence and uniqueness Mathematical

More information

Review for Exam 2 Ben Wang and Mark Styczynski

Review for Exam 2 Ben Wang and Mark Styczynski Review for Exam Ben Wang and Mark Styczynski This is a rough approximation of what we went over in the review session. This is actually more detailed in portions than what we went over. Also, please note

More information

MATH 350: Introduction to Computational Mathematics

MATH 350: Introduction to Computational Mathematics MATH 350: Introduction to Computational Mathematics Chapter VII: Numerical Differentiation and Solution of Ordinary Differential Equations Greg Fasshauer Department of Applied Mathematics Illinois Institute

More information

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs Chapter Two: Numerical Methods for Elliptic PDEs Finite Difference Methods for Elliptic PDEs.. Finite difference scheme. We consider a simple example u := subject to Dirichlet boundary conditions ( ) u

More information

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP MATLAB sessions: Laboratory 4 MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP In this laboratory session we will learn how to. Use MATLAB solvers for solving scalar IVP 2. Use MATLAB solvers for

More information

1 Ordinary Differential Equations

1 Ordinary Differential Equations Ordinary Differential Equations.0 Mathematical Background.0. Smoothness Definition. A function f defined on [a, b] is continuous at ξ [a, b] if lim x ξ f(x) = f(ξ). Remark Note that this implies existence

More information

Additive Manufacturing Module 8

Additive Manufacturing Module 8 Additive Manufacturing Module 8 Spring 2015 Wenchao Zhou zhouw@uark.edu (479) 575-7250 The Department of Mechanical Engineering University of Arkansas, Fayetteville 1 Evaluating design https://www.youtube.com/watch?v=p

More information

Chapter 3 Second Order Linear Equations

Chapter 3 Second Order Linear Equations Partial Differential Equations (Math 3303) A Ë@ Õæ Aë áöß @. X. @ 2015-2014 ú GA JË@ É Ë@ Chapter 3 Second Order Linear Equations Second-order partial differential equations for an known function u(x,

More information

Solving ODEs and PDEs in MATLAB. Sören Boettcher

Solving ODEs and PDEs in MATLAB. Sören Boettcher 16.02.2009 Introduction Quick introduction to syntax ODE in the form of Initial Value Problems (IVP) what equations can handle how to code into how to choose the right solver how to get the solver to do

More information

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 1. Runge-Kutta Methods

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 1. Runge-Kutta Methods Numerical Analysis by Dr. Anita Pal Assistant Professor Department of Mathematics National Institute of Technology Durgapur Durgapur-71309 email: anita.buie@gmail.com 1 . Chapter 8 Numerical Solution of

More information

Tutorial 2. Introduction to numerical schemes

Tutorial 2. Introduction to numerical schemes 236861 Numerical Geometry of Images Tutorial 2 Introduction to numerical schemes c 2012 Classifying PDEs Looking at the PDE Au xx + 2Bu xy + Cu yy + Du x + Eu y + Fu +.. = 0, and its discriminant, B 2

More information

Math 266: Ordinary Differential Equations

Math 266: Ordinary Differential Equations Math 266: Ordinary Differential Equations Long Jin Purdue University, Spring 2018 Basic information Lectures: MWF 8:30-9:20(111)/9:30-10:20(121), UNIV 103 Instructor: Long Jin (long249@purdue.edu) Office

More information

Vectors, matrices, eigenvalues and eigenvectors

Vectors, matrices, eigenvalues and eigenvectors Vectors, matrices, eigenvalues and eigenvectors 1 ( ) ( ) ( ) Scaling a vector: 0.5V 2 0.5 2 1 = 0.5 = = 1 0.5 1 0.5 ( ) ( ) ( ) ( ) Adding two vectors: V + W 2 1 2 + 1 3 = + = = 1 3 1 + 3 4 ( ) ( ) a

More information

Manifesto on Numerical Integration of Equations of Motion Using Matlab

Manifesto on Numerical Integration of Equations of Motion Using Matlab Manifesto on Numerical Integration of Equations of Motion Using Matlab C. Hall April 11, 2002 This handout is intended to help you understand numerical integration and to put it into practice using Matlab

More information

Chapter 6 - Ordinary Differential Equations

Chapter 6 - Ordinary Differential Equations Chapter 6 - Ordinary Differential Equations 7.1 Solving Initial-Value Problems In this chapter, we will be interested in the solution of ordinary differential equations. Ordinary differential equations

More information

Chap. 20: Initial-Value Problems

Chap. 20: Initial-Value Problems Chap. 20: Initial-Value Problems Ordinary Differential Equations Goal: to solve differential equations of the form: dy dt f t, y The methods in this chapter are all one-step methods and have the general

More information

Chapter 9b: Numerical Methods for Calculus and Differential Equations. Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers

Chapter 9b: Numerical Methods for Calculus and Differential Equations. Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers Chapter 9b: Numerical Methods for Calculus and Differential Equations Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers Acceleration Initial-Value Problems Consider a skydiver

More information

Index. higher order methods, 52 nonlinear, 36 with variable coefficients, 34 Burgers equation, 234 BVP, see boundary value problems

Index. higher order methods, 52 nonlinear, 36 with variable coefficients, 34 Burgers equation, 234 BVP, see boundary value problems Index A-conjugate directions, 83 A-stability, 171 A( )-stability, 171 absolute error, 243 absolute stability, 149 for systems of equations, 154 absorbing boundary conditions, 228 Adams Bashforth methods,

More information

Lecture 5: Single Step Methods

Lecture 5: Single Step Methods Lecture 5: Single Step Methods J.K. Ryan@tudelft.nl WI3097TU Delft Institute of Applied Mathematics Delft University of Technology 1 October 2012 () Single Step Methods 1 October 2012 1 / 44 Outline 1

More information

Complex Dynamic Systems: Qualitative vs Quantitative analysis

Complex Dynamic Systems: Qualitative vs Quantitative analysis Complex Dynamic Systems: Qualitative vs Quantitative analysis Complex Dynamic Systems Chiara Mocenni Department of Information Engineering and Mathematics University of Siena (mocenni@diism.unisi.it) Dynamic

More information

Physics 584 Computational Methods

Physics 584 Computational Methods Physics 584 Computational Methods Introduction to Matlab and Numerical Solutions to Ordinary Differential Equations Ryan Ogliore April 18 th, 2016 Lecture Outline Introduction to Matlab Numerical Solutions

More information

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs AM 205: lecture 14 Last time: Boundary value problems Today: Numerical solution of PDEs ODE BVPs A more general approach is to formulate a coupled system of equations for the BVP based on a finite difference

More information

Differential Equations

Differential Equations Differential Equations Overview of differential equation! Initial value problem! Explicit numeric methods! Implicit numeric methods! Modular implementation Physics-based simulation An algorithm that

More information

5.2 - Euler s Method

5.2 - Euler s Method 5. - Euler s Method Consider solving the initial-value problem for ordinary differential equation: (*) y t f t, y, a t b, y a. Let y t be the unique solution of the initial-value problem. In the previous

More information

Ordinary Differential Equations (ODE)

Ordinary Differential Equations (ODE) Ordinary Differential Equations (ODE) Why study Differential Equations? Many physical phenomena are best formulated mathematically in terms of their rate of change. Motion of a swinging pendulum Bungee-jumper

More information

Research Computing with Python, Lecture 7, Numerical Integration and Solving Ordinary Differential Equations

Research Computing with Python, Lecture 7, Numerical Integration and Solving Ordinary Differential Equations Research Computing with Python, Lecture 7, Numerical Integration and Solving Ordinary Differential Equations Ramses van Zon SciNet HPC Consortium November 25, 2014 Ramses van Zon (SciNet HPC Consortium)Research

More information

Lecture Introduction

Lecture Introduction Lecture 1 1.1 Introduction The theory of Partial Differential Equations (PDEs) is central to mathematics, both pure and applied. The main difference between the theory of PDEs and the theory of Ordinary

More information

UNIVERSITY of LIMERICK OLLSCOIL LUIMNIGH

UNIVERSITY of LIMERICK OLLSCOIL LUIMNIGH UNIVERSITY of LIMERICK OLLSCOIL LUIMNIGH Faculty of Science and Engineering Department of Mathematics and Statistics END OF SEMESTER ASSESSMENT PAPER MODULE CODE: MA4006 SEMESTER: Spring 2011 MODULE TITLE:

More information

Sample Solutions of Assignment 10 for MAT3270B

Sample Solutions of Assignment 10 for MAT3270B Sample Solutions of Assignment 1 for MAT327B 1. For the following ODEs, (a) determine all critical points; (b) find the corresponding linear system near each critical point; (c) find the eigenvalues of

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University The Implicit Schemes for the Model Problem The Crank-Nicolson scheme and θ-scheme

More information

CHAPTER 5: Linear Multistep Methods

CHAPTER 5: Linear Multistep Methods CHAPTER 5: Linear Multistep Methods Multistep: use information from many steps Higher order possible with fewer function evaluations than with RK. Convenient error estimates. Changing stepsize or order

More information

APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS

APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS LECTURE 10 APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS Ordinary Differential Equations Initial Value Problems For Initial Value problems (IVP s), conditions are specified

More information

Discrete (Difference) Equations

Discrete (Difference) Equations Discrete (Difference) Equations A discrete, or difference, equation expresses a relationship between the elements of a sequence, {y n }, where n N 0 {0, 1, 2,...}. For example, the trivial difference equation

More information

u n 2 4 u n 36 u n 1, n 1.

u n 2 4 u n 36 u n 1, n 1. Exercise 1 Let (u n ) be the sequence defined by Set v n = u n 1 x+ u n and f (x) = 4 x. 1. Solve the equations f (x) = 1 and f (x) =. u 0 = 0, n Z +, u n+1 = u n + 4 u n.. Prove that if u n < 1, then

More information

An Overly Simplified and Brief Review of Differential Equation Solution Methods. 1. Some Common Exact Solution Methods for Differential Equations

An Overly Simplified and Brief Review of Differential Equation Solution Methods. 1. Some Common Exact Solution Methods for Differential Equations An Overly Simplified and Brief Review of Differential Equation Solution Methods We will be dealing with initial or boundary value problems. A typical initial value problem has the form y y 0 y(0) 1 A typical

More information

Using Matlab to integrate Ordinary Differential Equations (ODEs)

Using Matlab to integrate Ordinary Differential Equations (ODEs) Using Matlab to integrate Ordinary Differential Equations (ODEs) Erica McEvoy (Dated: June 17, 2009) 1. INTRODUCTION Ordinary differential equations tend to arise whenever you need to model changing quantities

More information

Lecture 4: Numerical solution of ordinary differential equations

Lecture 4: Numerical solution of ordinary differential equations Lecture 4: Numerical solution of ordinary differential equations Department of Mathematics, ETH Zürich General explicit one-step method: Consistency; Stability; Convergence. High-order methods: Taylor

More information

Problem set 7 Math 207A, Fall 2011 Solutions

Problem 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 information

ENGI 9420 Lecture Notes 8 - PDEs Page 8.01

ENGI 9420 Lecture Notes 8 - PDEs Page 8.01 ENGI 940 ecture Notes 8 - PDEs Page 8.0 8. Partial Differential Equations Partial differential equations (PDEs) are equations involving functions of more than one variable and their partial derivatives

More information

Lesson 9: Predator-Prey and ode45

Lesson 9: Predator-Prey and ode45 Lesson 9: Predator-Prey and ode45 9.1 Applied Problem. In this lesson we will allow for more than one population where they depend on each other. One population could be the predator such as a fox, and

More information

. For each initial condition y(0) = y 0, there exists a. unique solution. In fact, given any point (x, y), there is a unique curve through this point,

. For each initial condition y(0) = y 0, there exists a. unique solution. In fact, given any point (x, y), there is a unique curve through this point, 1.2. Direction Fields: Graphical Representation of the ODE and its Solution Section Objective(s): Constructing Direction Fields. Interpreting Direction Fields. Definition 1.2.1. A first order ODE of the

More information

Woods Hole Methods of Computational Neuroscience. Differential Equations and Linear Algebra. Lecture Notes

Woods Hole Methods of Computational Neuroscience. Differential Equations and Linear Algebra. Lecture Notes Woods Hole Methods of Computational Neuroscience Differential Equations and Linear Algebra Lecture Notes c 004, 005 William L. Kath MCN 005 ODE & Linear Algebra Notes 1. Classification of differential

More information

Math 46, Applied Math (Spring 2008): Final

Math 46, Applied Math (Spring 2008): Final Math 46, Applied Math (Spring 2008): Final 3 hours, 80 points total, 9 questions, roughly in syllabus order (apart from short answers) 1. [16 points. Note part c, worth 7 points, is independent of the

More information

SYSTEMS OF ODES. mg sin ( (x)) dx 2 =

SYSTEMS OF ODES. mg sin ( (x)) dx 2 = SYSTEMS OF ODES Consider the pendulum shown below. Assume the rod is of neglible mass, that the pendulum is of mass m, and that the rod is of length `. Assume the pendulum moves in the plane shown, and

More information

Numerical Differential Equations: IVP

Numerical Differential Equations: IVP Chapter 11 Numerical Differential Equations: IVP **** 4/16/13 EC (Incomplete) 11.1 Initial Value Problem for Ordinary Differential Equations We consider the problem of numerically solving a differential

More information