Numerical Solution of Differential Equations



Similar documents
AP Calculus BC 2001 Free-Response Questions

A First Course in Elementary Differential Equations. Marcel B. Finan Arkansas Tech University c All Rights Reserved

Differentiation of vectors

Math 241, Exam 1 Information.

L 2 : x = s + 1, y = s, z = 4s Suppose that C has coordinates (x, y, z). Then from the vector equality AC = BD, one has

2.2 Derivative as a Function

AP Calculus BC 2006 Free-Response Questions

2008 AP Calculus AB Multiple Choice Exam

correct-choice plot f(x) and draw an approximate tangent line at x = a and use geometry to estimate its slope comment The choices were:

Numerical Solution of Differential

Mark Howell Gonzaga High School, Washington, D.C.

MATH 10550, EXAM 2 SOLUTIONS. x 2 + 2xy y 2 + x = 2

Applications of Second-Order Differential Equations

= δx x + δy y. df ds = dx. ds y + xdy ds. Now multiply by ds to get the form of the equation in terms of differentials: df = y dx + x dy.

AP Calculus BC Exam. The Calculus BC Exam. At a Glance. Section I. SECTION I: Multiple-Choice Questions. Instructions. About Guessing.

AP Calculus AB 2005 Free-Response Questions

(a) We have x = 3 + 2t, y = 2 t, z = 6 so solving for t we get the symmetric equations. x 3 2. = 2 y, z = 6. t 2 2t + 1 = 0,

F = ma. F = G m 1m 2 R 2

PLOTTING DATA AND INTERPRETING GRAPHS

Mathematical Modeling and Engineering Problem Solving

A QUICK GUIDE TO THE FORMULAS OF MULTIVARIABLE CALCULUS

Solving Quadratic Equations

Ground Rules. PC1221 Fundamentals of Physics I. Kinematics. Position. Lectures 3 and 4 Motion in One Dimension. Dr Tay Seng Chuan

AP Calculus BC 2008 Scoring Guidelines

Notice numbers may change randomly in your assignments and you may have to recalculate solutions for your specific case.

PRACTICE FINAL. Problem 1. Find the dimensions of the isosceles triangle with largest area that can be inscribed in a circle of radius 10cm.

An Introduction to Calculus. Jackie Nicholas

Homework #2 Solutions

Calculus AB 2014 Scoring Guidelines

3.2 Sources, Sinks, Saddles, and Spirals

Isaac Newton s ( ) Laws of Motion

Worksheet 1. What You Need to Know About Motion Along the x-axis (Part 1)

An Introduction to Applied Mathematics: An Iterative Process

AP Calculus AB 2010 Free-Response Questions Form B

ab = c a If the coefficients a,b and c are real then either α and β are real or α and β are complex conjugates

AP Calculus AB First Semester Final Exam Practice Test Content covers chapters 1-3 Name: Date: Period:

AP1 Oscillations. 1. Which of the following statements about a spring-block oscillator in simple harmonic motion about its equilibrium point is false?

Homework #1 Solutions

Displacement (x) Velocity (v) Acceleration (a) x = f(t) differentiate v = dx Acceleration Velocity (v) Displacement x

More Quadratic Equations

Multi-variable Calculus and Optimization

Physical Science Chapter 2. Forces

3. KINEMATICS IN TWO DIMENSIONS; VECTORS.

1. First-order Ordinary Differential Equations

1.(6pts) Find symmetric equations of the line L passing through the point (2, 5, 1) and perpendicular to the plane x + 3y z = 9.

AP Calculus AB 2004 Scoring Guidelines

Work and Energy. Physics 1425 Lecture 12. Michael Fowler, UVa

Differential Relations for Fluid Flow. Acceleration field of a fluid. The differential equation of mass conservation

Section 12.6: Directional Derivatives and the Gradient Vector

Lecture L2 - Degrees of Freedom and Constraints, Rectilinear Motion

AP Physics C. Oscillations/SHM Review Packet

3.1 MAXIMUM, MINIMUM AND INFLECTION POINT & SKETCHING THE GRAPH. In Isaac Newton's day, one of the biggest problems was poor navigation at sea.

Class Meeting # 1: Introduction to PDEs

What does the number m in y = mx + b measure? To find out, suppose (x 1, y 1 ) and (x 2, y 2 ) are two points on the graph of y = mx + b.

Eigenvalues, Eigenvectors, and Differential Equations

AP Calculus AB 2007 Scoring Guidelines Form B

Don't Forget the Differential Equations: Finishing 2005 BC4

Nonlinear Systems of Ordinary Differential Equations

AP Calculus AB 2006 Scoring Guidelines

Differential Equations

LINES AND PLANES CHRIS JOHNSON

Visualizing Differential Equations Slope Fields. by Lin McMullin

Review Solutions MAT V (a) If u = 4 x, then du = dx. Hence, substitution implies 1. dx = du = 2 u + C = 2 4 x + C.

In order to describe motion you need to describe the following properties.

x = + x 2 + x

Spring Simple Harmonic Oscillator. Spring constant. Potential Energy stored in a Spring. Understanding oscillations. Understanding oscillations

Microeconomic Theory: Basic Math Concepts

Mechanics 1: Conservation of Energy and Momentum

Chapter 4 One Dimensional Kinematics

3 Contour integrals and Cauchy s Theorem

Weight The weight of an object is defined as the gravitational force acting on the object. Unit: Newton (N)

Motion. Complete Table 1. Record all data to three decimal places (e.g., or or 0.000). Do not include units in your answer.

3.2. Solving quadratic equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

Second Order Linear Differential Equations

Lecture 07: Work and Kinetic Energy. Physics 2210 Fall Semester 2014

AP Calculus AB Syllabus

The Basics of Physics with Calculus. AP Physics C

19.7. Applications of Differential Equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

Chapter 6 Work and Energy

When the fluid velocity is zero, called the hydrostatic condition, the pressure variation is due only to the weight of the fluid.

Newton s Laws. Physics 1425 lecture 6. Michael Fowler, UVa.

Elements of a graph. Click on the links below to jump directly to the relevant section

Prelab Exercises: Hooke's Law and the Behavior of Springs

Calculus 1st Semester Final Review

Hydraulics Laboratory Experiment Report

Lecture L22-2D Rigid Body Dynamics: Work and Energy

Solutions to old Exam 1 problems

Derive 5: The Easiest... Just Got Better!

Linear algebra and the geometry of quadratic equations. Similarity transformations and orthogonal matrices

FRICTION, WORK, AND THE INCLINED PLANE

Acceleration of Gravity Lab Basic Version

Review of Fundamental Mathematics

The dynamic equation for the angular motion of the wheel is R w F t R w F w ]/ J w

AP Calculus AB 2011 Free-Response Questions

Journal of Engineering Science and Technology Review 2 (1) (2009) Lecture Note

Student name: Earlham College. Fall 2011 December 15, 2011

AP Physics 1 and 2 Lab Investigations

Transcription:

Numerical Solution of Differential Equations Dr. Alvaro Islas Applications of Calculus I Spring 2008

We live in a world in constant change

We live in a world in constant change

We live in a world in constant change

We live in a world in constant change

We live in a world in constant change

Blue Question: Rate of Change is measured by A Pythagoras theorem. B The zeros of a function. C Derivatives. D Similar triangles. D None of the above.

And change is measured by [C] Derivatives!

Blue Question: Derivatives give the A zeros of a function. B steepness of a function. C asymptotes. D All of the above. E None of the above.

Derivatives give the [B] steepness of a function!

Blue Question: If we KNOW the function that fits the data then we can determine A The derivative. B The zeros of the function. C The maximum and minimum values. D All of the above. E None of the above.

If we KNOW the function then we know [D] All of the above! 0.4 sin(x)/(x-pi) 0 0.2 0-0.2-0.4-0.6-0.8-1 -15-10 -5 0 5 10 15

If we DON T KNOW the function Then we could make a guess. try to fit it to known equations. try to find an equation containing derivatives. Equations containing derivatives are called Differential equations.

Blue Question: Which equations are differential equations? 1) x 2 + y 2 = r 2 2) x 2 + 4xy + y 2 = 1 3) x 2 y + xy + y = 0 ( 4) x 2 + y 2) 4 = 25(x 2 y 2 ) 5) y + y = 0 A) 1 & 3 B) 2 & 4 C) 3 & 5 D) none E) all

Which equations are differential equations? 1) x 2 + y 2 = r 2 2) x 2 + 4xy + y 2 = 1 3) x 2 y + xy + y = 0 ( 4) x 2 + y 2) 4 = 25(x 2 y 2 ) 5) y + y = 0 [C] 3 & 5!

Blue Question: How do we derive a differential equation? A Using basic principles. B Doing experiments. C By trial and error. D All of the above. E None of the above.

How do we derive a differential equation? A Using basic principles. B Doing experiments. C By trial and error. D All of the above. E None of the above. [D] All of the above!

Example: Falling Body Newton s second law: Net Force = mass acceleration. F = m a = m v where v(t) is the velocity of the falling body, and v is its derivative with respect to time. Assume that the only forces acting on the body are gravity and air resistance. Gravity is constant on the surface of the earth. Air resistance is proportional to the velocity. Putting it all together we have our first differential equation: mv = 9.8 γv

Examples: Spring Motion Consider a spring immersed in a fluid. By Newton s second law and many lab experiments we have found that my = CY KY where m is the mass, K is the spring constant, and C is the damping constant.

Examples: Population Models One species (i) Unlimeted resources and growth rate k. dp dt = kp, P(t) is the population at time t. One species (ii) Limeted resources and competion. ( dp = kp 1 P ), C is the carrying capacity. dt C

Examples: Population Models Two species dx dt dy dt = ax αxy, X(t) is the prey = bx + βxy, Y (t) is the predator

Initial-value Problems Every problem starts somewhere. Derivatives give only rates of change. A problem s complete description is given by a differential equation plus some initial condition(s). dp dt = kp, P(t 0 ) = P 0 d 2 y dt 2 = k 2 y, y(t 0 ) = y 0, y dt (t 0) = v 0

How do we solve a differential equation? Many differential equations have analytical solutions. These can be given by explicit or implicit formulas. For example an analytical solution to the DE y = 2x is given by y = x 2 + C, since the derivative of a constant is zero. Another simple example is the DE given by y = 32.

Approximate solutions Most differential equations don t have an analytical solution! The solution has to be approximated. The linear approximation gives a first order approximation. To get a better idea on how the linear approximation works, let s first take a geometric view of differential equations. We want to use the fact that the derivative gives the slope of the tangent lines to the curve. Since we know the derivative (from the differential equation), we could draw a bunch of (small tangent lines) and get an idea of the curve.

Direction fields. Example: v = 9.8 0.196v. To obtain a geometric view we use the fact that the derivative gives the slope of the tangent line and take the following steps: Find the points where the slopes have given values. For example, start with the points with zero slopes. (In this case, v = 0 means they are of the form (t, v) = (t, 50)). Plot horizontal arrows at these points to indicate the arrows are horizontal there.

Direction fields. Example: v = 9.8 0.196v. Direction field where the slopes are zero.

Direction fields. Example: v = 9.8 0.196v. Add arrows where the slopes are positive.

Direction fields. Example: v = 9.8 0.196v. Add arrows where the slopes are negative.

Direction fields. Example: v = 9.8 0.196v. Now we can visualize the solution that starts at 30.

Direction fields. Example: v = 9.8 0.196v. Or we can visualize several other solutions.

Red Question Draw the direction field and a few curves for the population equation P = P(1 P) by taking the following steps: Find the points where the slopes are zero. Draw some arrows with zero slope. Then draw a few arrows with positive slope. And a few with negative slope. Last draw a few curves that follow the arrows.

The direction field and a few curves are given by P P P x A B 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0 1 2 3 4 5 6 7 8 9 10 t 0 1 2 3 4 5 6 7 8 9 10 t C D 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0 1 2 3 4 5 6 7 8 9 10 t 0 1 2 3 4 5 6 7 8 9 10 t

The direction field and a few curves are given by [C]! 2 1.8 1.6 1.4 1.2 P 1 0.8 0.6 0.4 0.2 0 0 1 2 3 4 5 6 7 8 9 10 t

How do we get the approximate values of f (x)? Using the linear approximation!

Given f (x) the linear approximation is given by [B] f (x) L(x) = f (a) + f (a)(x a)!

Tangent Below the Curve f 10 5 0 5 0 0.5 1 1.5 2 2.5 3 3.5 4 x Figure: The tangent line is completely below the curve and the linear approximation gives an underestimate.

Tangent Above the Curve f 10 5 0 5 4 3.5 3 2.5 2 1.5 1 0.5 0 x Figure: The tangent line is completely above the curve and the linear approximation gives an overestimate.

Tangent Above and Below the Curve f 120 100 80 60 40 20 0 20 10 8 6 4 2 0 2 4 6 8 10 x Figure: The tangent line is above the curve (overestimate) on one side of the tangent point and below (underestimate) on the other side.

Population Models Now we are ready to start working on a real application. Suppose we want to describe a given species population growth. The simplest model assumes that the population rate of change is proportional to the population size. That is dp dt = kp, P 0 = P(0) where k is the constant rate of growth and P 0 is the initial population.

Direction field and the solution for P = 0.02P, P 0 = 1 P = 0.02 P 10 9 8 7 6 P 5 4 3 2 1 0 0 10 20 30 40 50 60 70 80 90 100 t

How do we use L(t) to approximate the solution The linear approximation starts at t = 0 and is given by L 0 (t) = P(0) + P (0) (t 0) = P(0) + k P(0) (t 0) = 1 + 0.02 1 t = 1 + 0.02t 10 8 6 P 4 2 0 2 10 0 10 20 30 40 50 60 70 80 90 100 t

How do we use L(t) to approximate the solution Continued This linear approximation is good only near t = 0, say for 0 t 10. To continue we need to use a new linear approximation at t = 10. It uses the initial value given by the previous approximation. L 1 (t) = L 0 (10) + P (10) (t 10) L 1 (t) = 1.2 + 0.02 1.2 (t 10) L 1 (t) = 1.2 + 0.24 (t 10)

How do we use L(t) to approximate the solution Which again is good only for t near t = 10, say for 10 t 20. 1.5 1.45 1.4 1.35 1.3 1.25 1.2 1.15 1.1 1.05 exact L 0 (t) L 1 (t) 1 0 2 4 6 8 10 12 14 16 18 20

Euler s Method By repeating this step, with timesteps of length h = 10, we can advance the solution to t 3, t 4,..., t N t 1 = t 0 + h = 10 P 1 = P 0 + h (0.02 P 0 ) = 1.2 t 2 = t 1 + h = 20 P 2 = P 1 + h (0.02 P 1 ) = 1.44. t N+1 = t N + h P N+1 = P N + h (0.02 P N ) This procedure is known as Euler s Method.

Euler s Method with two different timesteps. 8 7 6 Population 5 4 3 2 1 0 10 20 30 40 50 60 70 80 90 100 Time Figure: Numerical (h = 10 (dotted line), h = 5 (dashed line)) and exact (solid line) solutions.

Population Model for two species Consider the population of rabits (R) and wolves (W) as described by the Lotka-Volterra equations dr dt dw dt = 0.08R 0.001RW = 0.02W + 0.00002RW

Equilibrium occurs when [C] Both derivatives are equal to zero! That is neither population grows.

There exists an equilibrium point when [B] R = 1000 and W = 80!

Euler s Method for a system of equations The linear approximations at t = t 0 for both the rabit and wolf populations are given just as before L r (t) = R(t 0 ) + dr dt (t 0)(t t 0 ) L w (t) = W (t 0 ) + dw dt (t 0 )(t t 0 ) The difference is that both derivatives are functions of both R and W.

Euler s Method in vector form The linear approximations, as before, are good near t = t 0, say up to t 1 = t 0 + h. Then we need a new approximation at t = t 1 which again is only good near t 2. And so on... ( R1 W 1 ( R2 W 2 ) ) = = ( R0 W 0 ( R1 W 1 ) ( R + (t 0 ) W (t 0 ) ) + ( R (t 1 ) W (t 1 ) ) h ) h ( RN+1 W N+1 ). = ( RN W N ) ( R + (t N ) W (t N ) ) h

Euler s Method in vector form Or replacing the derivatives with their corresponding expressions ( ) ( ) ( R1 R0 0.08R = + 0 0.001R 0 W 0 W 1 W 0 0.02W 0 + 0.00002R 0 W 0 ( ) ( ) ( R2 R1 0.08R = + 1 0.001R 1 W 1 W 1 0.02W 1 + 0.00002R 1 W 1 W 2 ) h ) h ( RN+1 W N+1 ). = ( RN W N ) ( + 0.08R N 0.001R N W N 0.02W N + 0.00002R N W N ) h

A plot of W vs R looks like [C]! 250 tsdat.3 200 150 100 50 0 0 1000 2000 3000 4000 5000 6000 7000

Euler s method with h = 1 gives 250 tsdat.1 200 150 100 50 0 0 1000 2000 3000 4000 5000 6000 7000

Euler s method with h = 0.5 gives 250 tsdat.2 200 150 100 50 0 0 1000 2000 3000 4000 5000 6000 7000

A Modified Euler s method with h = 1 ( R1 W 1 ) = ( R0 W 0 ) ( + 0.08R 0 0.001R 0 W 0 0.02W 0 + 0.00002R 1 W 0 ) h 250 tsdat.3 200 150 100 50 0 0 1000 2000 3000 4000 5000 6000 7000

The Last Question: We have learned A About differential equations. B How to derive simple differential equations. C How to use the linear approximation to solve them. D How we apply these ideas to systems of equations. E All of the above.

The Last Question: We have learned [E] All of the above! Have a nice Spring Break!