Figure 11. difference in the y-values difference in the x-values

Similar documents
11.1 Average Rate of Change

Practice Exam 1. Use the limit laws from class compute the following limit. Show all your work and cite all rules used explicitly. xf(x) + 5x.

Complex Survey Sample Design in IRS' Multi-objective Taxpayer Compliance Burden Studies

Introduction. Valuation of Assets. Capital Budgeting in Global Markets

What are Swaps? Spring Stephen Sapp ISFP. Stephen Sapp

Calculus I Homework: Four Ways to Represent a Function Page 1. where h 0 and f(x) = x x 2.

The study guide does not look exactly like the exam but it will help you to focus your study efforts.

ECON 200 EXERCISES (1,1) (d) Use your answer to show that (b) is not the equilibrium price vector if. that must be satisfied?

What are Swaps? Basic Idea of Swaps. What are Swaps? Advanced Corporate Finance

ACC 471 Practice Problem Set # 4 Fall Suggested Solutions

PRICE INDEX AGGREGATION: PLUTOCRATIC WEIGHTS, DEMOCRATIC WEIGHTS, AND VALUE JUDGMENTS

2017 Year-End Retirement Action Plan

3.1 THE 2 2 EXCHANGE ECONOMY

A Guide to Mutual Fund Investing

Capital Budgeting in Global Markets

EXAMINATIONS OF THE HONG KONG STATISTICAL SOCIETY

2.11 School Board Executive Compensation Practices. Introduction

Chapter 4 Rates of Change

a) Give an example of a case when an (s,s) policy is not the same as an (R,Q) policy. (2p)

Exercise 1: Robinson Crusoe who is marooned on an island in the South Pacific. He can grow bananas and coconuts. If he uses

VARIANCE-BASED SAMPLING FOR CYCLE TIME - THROUGHPUT CONFIDENCE INTERVALS. Rachel T. Johnson Sonia E. Leach John W. Fowler Gerald T.

Chapter 8. Introduction to Endogenous Policy Theory. In this chapter we begin our development of endogenous policy theory: the explicit

Assessment of Vulnerability to Extreme Flash Floods in Design Storms

Maximizing the Sharpe Ratio and Information Ratio in the Barra Optimizer

Relaxing Standard Hedging Assumptions in the Presence of Downside Risk

Buildings and Properties

Binary Search Tree and AVL Trees. Binary Search Tree. Binary Search Tree. Binary Search Tree. Techniques: How does the BST works?

Market shares and multinationals investment: a microeconomic foundation for FDI gravity equations

Hedging Segregated Fund Guarantees

2.21 The Medical Care Plan Beneficiary Registration System. Introduction

Problem Solving Day: Geometry, movement, and Free-fall. Test schedule SOH CAH TOA! For right triangles. Last year s equation sheet included with exam.

Growth transmission. Econ 307. Assume. How much borrowing should be done? Implications for growth A B A B

Delocation and Trade Agreements in Imperfectly Competitive Markets (Preliminary)

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Splay Trees Date: 9/27/16

SAT Practice Test #1 IMPORTANT REMINDERS. A No. 2 pencil is required for the test. Do not use a mechanical pencil or pen.

DATABASE-ASSISTED spectrum sharing is a promising

2.15 Province of Newfoundland and Labrador Pooled Pension Fund

Managing and Identifying Risk

A General Welfare Decomposition for CGE Models

AMERICAN DEPOSITARY RECEIPTS. ISFP Stephen Sapp

Who gets the urban surplus?

CAMBRIDGE PUBLIC SCHOOLS FAMILY AND MEDICAL LEAVE, PARENTAL LEAVE AND SMALL NECESSITIES LEAVE POLICY

Facility Sustainment and Firm Value: A Case Study Based on Target Corporation

European Accounting Review, 17 (3):

Raising Capital in Global Financial Markets

POVERTY REDUCTION STRATEGIES IN A BUDGET- CONSTRAINED ECONOMY: THE CASE OF GHANA

2.17 Tax Expenditures. Introduction. Scope and Objectives

The Long (and Short) on Taxation and Expenditure Policies

Price indeterminacy in day-ahead market

Analysis of a Hybrid Finite Difference Scheme for the Black-Scholes Equation Governing Option Pricing

P s = 1. s=1. where the index of summation t is used to denote states in the denominator, so as to distinguish it from the particular state s, and

Raising Capital in Global Financial Markets

Raising Capital in Global Financial Markets

In the following I do the whole derivative in one step, but you are welcome to split it up into multiple steps. 3x + 3h 5x 2 10xh 5h 2 3x + 5x 2

Managing and Identifying Risk

Making Informed Rollover Decisions

Efficient Replication of Factor Returns

Loading Factors and Equilibria in Insurance Markets

On Plutocratic and Democratic CPIs. Abstract

WORKING PAPER SERIES 2013-ECO-13

ETNA Kent State University

A NOTE ON VARIANCE DECOMPOSITION WITH LOCAL PROJECTIONS

Number of Municipalities. Funding (Millions) $ April 2003 to July 2003

A N N U A L R E P O R T 225 North 13th Avenue Post Office Box 988 Laurel, Mississippi

Raising Capital in Global Financial Markets

INTRODUCING HETEROGENEITY IN THE ROTHSCHILD-STIGLITZ MODEL

The International Elasticity Puzzle

Global Financial Markets

Econ 551 Government Finance: Revenues Winter, 2018

South Korea s Trade Intensity With ASEAN Countries and Its Changes Over Time*

Nominal Exchange Rates and Net Foreign Assets Dynamics: the Stabilization Role of Valuation Effects

Supplemantary material to: Leverage causes fat tails and clustered volatility

SUSTAINABLE ENERGY TECHNOLOGIES AND LOCAL AUTHORITIES: ENERGY SERVICE COMPANY, ENERGY PERFORMANCE CONTRACT, FORFEITING

Research. Michigan. Center. Retirement

The Implicit Pipeline Method

Bayesian range-based estimation of stochastic volatility models

Health or Wealth: Decision Making in Health Insurance

Financial Markets. What are Financial Markets? Major Financial Markets. Advanced Corporate Finance

TRADE FACILITATION AND THE EXTENSIVE MARGIN OF EXPORTS

Alcohol-Leisure Complementarity: Empirical Estimates and Implications for Tax Policy

FDI and International Portfolio Investment - Complements or Substitutes? Preliminary Please do not quote

Season Audition Packet Cymbals

ON CONDITIONAL MOMENTS OF GARCH MODELS, WITH APPLICATIONS TO MULTIPLE PERIOD VALUE AT RISK ESTIMATION

Using Financial Assets to Hedge Labor Income Risks: Estimating the Benefits

Finite difference method for the Black and Scholes PDE (TP-1)

International Journal of Pure and Applied Sciences and Technology

Asset Pricing with Heterogeneous Agents and Long-Run Risk

The Effect of Alternative World Fertility Scenarios on the World Interest Rate, Net International Capital Flows and Living Standards

MATH 104 Practice Problems for Exam 3

Retirement and Weight *

Evidence of Engel curves in food away from home: A study of Malaysia

Data driven recovery of local volatility surfaces

A Simple Model of Bankruptcy in General Equilibrium

Can more education be bad? Some simple analytics on financing better education for development

THE ROLE OF GOVERNMENT IN THE CREDIT MARKET. Benjamin Eden. Working Paper No. 09-W07. September 2009

Phelps Centre for the Study of Government and Business. Working Paper

b) According to the statistics above the graph, the slope is What are the units and meaning of this value?

Taxes and Entry Mode Decision in Multinationals: Export and FDI with and without Decentralization

MATH 104 Practice Problems for Exam 3

INTERNATIONAL REAL ESTATE REVIEW 1999 Vol. 2 No 1: pp

Transcription:

1. Numerical differentiation Tis Section deals wit ways of numerically approximating derivatives of functions. One reason for dealing wit tis now is tat we will use it briefly in te next Section. But as we sall see in tese next few pages, te tecnique is useful in itself. 2. First derivatives Our aim is to approximate te slope of a curve f at a particular point x = a in terms of f(a) and te value of f at a nearby point were x = a +. Te sorter broken line Figure 11 may be tougt of as giving a reasonable approximation to te required slope (sown by te longer broken line), if is small enoug. f Tis slope approximates f (a) Slope of line is f (a) a a+ x Figure 11 So we migt approximate f (a) slope of sort broken line = difference in te y-values difference in te x-values = f(a + ) f(a). Tis is called a one-sided difference or forward difference approximation to te derivative of f. A second version of tis arises on considering a point to te left of a, rater tan to te rigt as we did above. In tis case we obtain te approximation f (a) f(a) f(a ) Tis is anoter one-sided difference, called a backward difference, approximation to f (a). A tird metod for approximating te first derivative of f can be seen in Figure 12. HELM (2008): Section 31.3: Numerical Differentiation 59

f Tis slope approximates f (a) Slope of line is f (a) a a a+ x Figure 12 Here we approximate as follows f (a) slope of sort broken line = difference in te y-values difference in te x-values Tis is called a central difference approximation to f (a). = f(x + ) f(x ) 2 Tree approximations to te derivative f (a) are Key Point 11 First Derivative Approximations 1. te one-sided (forward) difference 2. te one-sided (backward) difference 3. te central difference f(a + ) f(a) f(a) f(a ) f(a + ) f(a ) 2 In practice, te central difference formula is te most accurate. Tese first, rater artificial, examples will elp fix our ideas before we move on to more realistic applications. 60 HELM (2008): Workbook 31: Numerical Metods of Approximation

Example 18 Use a forward difference, and te values of sown, to approximate te derivative of cos(x) at x = π/3. (a) = 0.1 (b) = 0.01 (c) = 0.001 (d) = 0.0001 Work to 8 decimal places trougout. Solution (a) f cos(a + ) cos(a) 0.41104381 0.5 (a) = = 0.88956192 0.1 (b) f cos(a + ) cos(a) 0.49131489 0.5 (a) = = 0.86851095 0.01 (c) f cos(a + ) cos(a) 0.49913372 0.5 (a) = = 0.86627526 0.001 (d) f cos(a + ) cos(a) 0.49991339 0.5 (a) = = 0.86605040 0.0001 One advantage of doing a simple example first is tat we can compare tese approximations wit te exact value wic is 3 f (a) = sin(π/3) = = 0.86602540 to 8 d.p. 2 Note tat te accuracy levels of te four approximations in Example 15 are: (a) 1 d.p. (b) 2 d.p. (c) 3 d.p. (d) 3 d.p. (almost 4 d.p.) Te errors to 6 d.p. are: (a) 0.023537 (b) 0.002486 (c) 0.000250 (d) 0.000025 Notice tat te errors reduce by about a factor of 10 eac time. Example 19 Use a central difference, and te value of sown, to approximate te derivative of cos(x) at x = π/3. (a) = 0.1 (b) = 0.01 (c) = 0.001 (d) = 0.0001 Work to 8 decimal places trougout. HELM (2008): Section 31.3: Numerical Differentiation 61

Solution (a) f cos(a + ) cos(a ) 0.41104381 0.58396036 (a) = = 0.86458275 2 0.2 (b) f cos(a + ) cos(a ) 0.49131489 0.50863511 (a) = = 0.86601097 2 0.02 (c) f cos(a + ) cos(a ) 0.49913372 0.50086578 (a) = = 0.86602526 2 0.002 (d) f cos(a + ) cos(a ) 0.49991339 0.50008660 (a) = = 0.86602540 2 0.0002 Tis time successive approximations generally ave two extra accurate decimal places indicating a superior formula. Tis is illustrated again in te following Task. Task Let f(x) = ln(x) and a = 3. Using bot a forward difference and a central difference, and working to 8 decimal places, approximate f (a) using = 0.1 and = 0.01. (Note tat tis is anoter example were we can work out te exact answer, wic in tis case is 1.) 3 Your solution 62 HELM (2008): Workbook 31: Numerical Metods of Approximation

Answer Using te forward difference we find, for = 0.1 f ln(a + ) ln(a) 1.13140211 1.09861229 (a) = = 0.32789823 0.1 and for = 0.01 we obtain f ln(a + ) ln(a) 1.10194008 1.09861229 (a) = = 0.33277901 0.01 Using central differences te two approximations to f (a) are f (a) ln(a + ) ln(a ) 2 = 1.13140211 1.06471074 0.2 = 0.33345687 and f ln(a + ) ln(a ) 1.10194008 1.09527339 (a) = = 0.33333457 2 0.02 Te accurate answer is, of course, 0.33333333 Tere is clearly little point in studying tis tecnique if all we ever do is approximate quantities we could find exactly in anoter way. Te following example is one in wic tis so-called differencing metod is te best approac. Example 20 Te distance x of a runner from a fixed point is measured (in metres) at intervals of alf a second. Te data obtained are t 0.0 0.5 1.0 1.5 2.0 x 0.00 3.65 6.80 9.90 12.15 Use central differences to approximate te runner s velocity at times t = 0.5 s and t = 1.25 s. Solution Our aim ere is to approximate x (t). Te coice of is dictated by te available data given in te table. Using data wit t = 0.5 s at its centre we obtain x (0.5) x(1.0) x(0.0) 2 0.5 = 6.80 m s 1. Data centred at t = 1.25 s gives us te approximation x (1.25) x(1.5) x(1.0) 2 0.25 Note te value of used. = 6.20 m s 1. HELM (2008): Section 31.3: Numerical Differentiation 63

Task Te velocity v (in m s 1 ) of a rocket measured at alf second intervals is t 0.0 0.5 1.0 1.5 2.0 v 0.000 11.860 26.335 41.075 59.051 Use central differences to approximate te acceleration of te rocket at times t = 1.0 s and t = 1.75 s. Your solution Answer Using data wit t = 1.0 s at its centre we obtain v v(1.5) v(0.5) (1.0) = 29.215 m s 2. 1.0 Data centred at t = 1.75 s gives us te approximation v (1.75) v(2.0) v(1.5) 0.5 = 35.952 m s 2. 3. Second derivatives An approac wic as been found to work well for second derivatives involves applying te notion of a central difference tree times. We begin wit f (a) f (a + 1) f (a 1) 2 2. Next we approximate te two derivatives in te numerator of tis expression using central differences as follows: f (a + 1 f(a + ) f(a) ) 2 and f (a 1 2 f(a) f(a ) ). 64 HELM (2008): Workbook 31: Numerical Metods of Approximation

Combining tese tree results gives f (a) f (a + 1) f (a 1) 2 2 1 {( ) ( )} f(a + ) f(a) f(a) f(a ) = f(a + ) 2f(a) + f(a ) 2 Key Point 12 Second Derivative Approximation A central difference approximation to te second derivative f (a) is f (a) f(a + ) 2f(a) + f(a ) 2 Example 21 Te distance x of a runner from a fixed point is measured (in metres) at intervals of alf a second. Te data obtained are t 0.0 0.5 1.0 1.5 2.0 x 0.00 3.65 6.80 9.90 12.15 Use a central difference to approximate te runner s acceleration at t = 1.5 s. Solution Our aim ere is to approximate x (t). Using data wit t = 1.5 s at its centre we obtain x (1.5) x(2.0) 2x(1.5) + x(1.0) 0.5 2 = 3.40 m s 2, from wic we see tat te runner is slowing down. HELM (2008): Section 31.3: Numerical Differentiation 65

Exercises 1. Let f(x) = cos(x) and a = 2. Let = 0.01 and approximate f (a) using forward, backward and central differences. Work to 8 decimal places and compare your answers wit te exact result, wic is sin(2). 2. Te distance x, measured in metres, of a downill skier from a fixed point is measured at intervals of 0.25 s. Te data gatered are Answers t 0 0.25 0.5 0.75 1 1.25 1.5 x 0 4.3 10.2 17.2 26.2 33.1 39.1 Use a central difference to approximate te skier s velocity and acceleration at te times t =0.25 s, 0.75 s and 1.25 s. Give your answers to 1 decimal place. 1. Forward: f cos(a + ) cos(a) 3.79865301 3.76219569 (a) = = 3.64573199 0.01 Backward: f cos(a) cos(a ) 3.76219569 3.72611459 (a) = = 3.60810972 0.01 Central: f cos(a + ) cos(a ) 3.79865301 3.72611459 (a) = = 3.62692086 2 0.02 Te accurate result is sin(2) = 3.62686041. 2. Velocities at te given times approximated by a central difference are: 20.4 m s 1, 32.0 m s 1 and 25.8 m s 1. Accelerations at tese times approximated by a central difference are: 25.6 m s 2, 32.0 m s 2 and 14.4 m s 2. 66 HELM (2008): Workbook 31: Numerical Metods of Approximation