Central Difference Approximation of the First Derivative

Similar documents
Effect of Significant Digits on Derivative of a Function

Differentiation of Discrete Functions

Differentiation of Continuous Functions Central Difference Approximation of the First Derivative

Concepts of Approximate Error: Approximate Error, Absolute Approximate Error, Relative Approximate Error, and Absolute Relative Approximate Error

Convergence of the Method

Polynomial Regression Model

Romberg Rule of Integration

5/21/07 3:13 PM MATLAB Command Window 1 of 6

Adequacy in Solution of Simultaneous Linear Equations

Newton-Raphson Method--Graphical Simulation of the Method.

Integration. Topic: Trapezoidal Rule. Major: General Engineering. Author: Autar Kaw, Charlie Barker.

3.1 Symmetry & Coordinate Graphs

Classroom Tips and Techniques: Eigenvalue Problems for ODEs - Part 1

Classroom Tips and Techniques: Electric Field from Distributed Charge

Adequacy in Solution of Simultaneous Linear Equations

Calculus I Practice Final Exam A

AP Calculus (BC) Chapter 9 Test No Calculator Section Name: Date: Period:

AP Calculus AB Worksheet - Differentiability

Newton Divided Difference Method of Interpolation--Graphical

Adequacy of Regression Models

Unit 9: Symmetric Functions

Classroom Tips and Techniques: Series Expansions Robert J. Lopez Emeritus Professor of Mathematics and Maple Fellow Maplesoft

arxiv: v2 [math.gm] 8 Apr 2007

Spline Method of Interpolation--Simulation

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. C) x 8. C) y = x + 3 2

9.5 HONORS Determine Odd and Even Functions Graphically and Algebraically

Bisection Method of Solving a Nonlinear Equations

Polynomial Functions

Environmental Physics Computer Lab #8: The Butterfly Effect

MA 113 Calculus I Fall 2015 Exam 3 Tuesday, 17 November Multiple Choice Answers. Question

Math 142 Lecture Notes. Section 7.1 Area between curves

2.2 THE DERIVATIVE 2.3 COMPUTATION OF DERIVATIVES: THE POWER RULE 2.4 THE PRODUCT AND QUOTIENT RULES 2.6 DERIVATIVES OF TRIGONOMETRIC FUNCTIONS

Physics Assessment Unit A2 3

MA 125 CALCULUS I SPRING 2007 April 27, 2007 FINAL EXAM. Name (Print last name first):... Student ID Number (last four digits):...

Chapter 2. Polynomial and Rational Functions. 2.3 Polynomial Functions and Their Graphs. Copyright 2014, 2010, 2007 Pearson Education, Inc.

Esterification in CSTRs in Series with Aspen Plus V8.0

System of Linear Equations. Slide for MA1203 Business Mathematics II Week 1 & 2

AP Calculus Worksheet: Chapter 2 Review Part I

Hour Exam #1 Math 3 Oct. 20, 2010

Chapter 2 Differentiation. 2.1 Tangent Lines and Their Slopes. Calculus: A Complete Course, 8e Chapter 2: Differentiation

Without a Vector Calculus Coordinate System

Chapter 2 Solutions of Equations of One Variable

Calculus 221 worksheet

Calculus I Practice Final Exam B

Ternary Maps for Liquid-Liquid Equilibrium Illustration with Aspen Plus V8.0

SCIENCE ACADEMIES FOR GRADES K 4 TEKS VERTICAL ALIGNMENT

polynomial in one variable leading coefficient polynomial function power function end behavior quartic function quintic function

(2) Let f(x) = 5x. (3) Say f (x) and f (x) have the following graphs. Sketch a graph of f(x). The graph of f (x) is: 3x 5

Core Mathematics 1 Quadratics

WELCOME: SHIP CATHODIC PROTECTION DESIGN

Average and Instantaneous Velocity. p(a) p(b) Average Velocity on a < t < b =, where p(t) is the position a b

Companion. Jeffrey E. Jones

Experiment #1. Math Review

Describe in words how the graph of each function below would differ from the graph of f (x).

Solutions to Problems and


Calculus Review. v = x t

Math 120, Winter Answers to Unit Test 3 Review Problems Set B.

Fall 2016 Math 2B Suggested Homework Problems Solutions

( ) 4 and 20, find the value. v c is equal to this average CALCULUS WORKSHEET 1 ON PARTICLE MOTION

AP Physics C: Electricity & Magnetism Sample Multiple-Choice Questions

Higher-Degree Polynomial Functions. Polynomials. Polynomials

Function Practice. 1. (a) attempt to form composite (M1) (c) METHOD 1 valid approach. e.g. g 1 (5), 2, f (5) f (2) = 3 A1 N2 2

MA 125 CALCULUS I FALL 2006 December 08, 2006 FINAL EXAM. Name (Print last name first):... Instructor:... Section:... PART I

Total 100

Sample Final Exam. Math S o l u t i o n s. 1. Three points are given: A = ( 2, 2), B = (2, 4), C = ( 4, 0)

" $ CALCULUS 2 WORKSHEET #21. t, y = t + 1. are A) x = 0, y = 0 B) x = 0 only C) x = 1, y = 0 D) x = 1 only E) x= 0, y = 1

Application demonstration. BifTools. Maple Package for Bifurcation Analysis in Dynamical Systems

Worksheet 7, Math 10560

MATH 236 ELAC FALL 2017 CA 9 NAME: SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question.

CHM112 Lab Math Review Grading Rubric

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

x 1 2 i 1 5 2i 11 9x 9 3x 3 1 y 2 3y 4 y 2 1 Poudre School District s College Algebra Course Review

Science One Integral Calculus

Project 2: Using linear systems for numerical solution of boundary value problems

Integration. Tuesday, December 3, 13

Mathematics 1a, Section 4.3 Solutions

AMSC/CMSC 466 Problem set 3

Unit 2: Functions and Graphs

1 Chapter 1: Graphs, Functions, and Models

Math 1101 Test 2 Practice Problems

IB Math SL Year 2 Name Date Lesson 10-4: Displacement, Velocity, Acceleration Revisited

LTM - LandScape Terrain Modeller

Complete your Parent Function Packet!!!!

Integration. Antiderivatives and Indefinite Integration 3/9/2015. Copyright Cengage Learning. All rights reserved.

CHAPTER 1. Relations. 1. Relations and Their Properties. Discussion

Answer Key for AP Calculus AB Practice Exam, Section I

AP * Calculus Review. Limits, Continuity, and the Definition of the Derivative

2010 Maths. Advanced Higher. Finalised Marking Instructions

The Gibbs Free Energy of a Chemical Reaction System as a Function of the Extent of Reaction and the Prediction of Spontaneity


Math 131 Exam II "Sample Questions"

AP Calculus AB 1998 Free-Response Questions

v(t) v(t) Assignment & Notes 5.2: Intro to Integrals Due Date: Friday, 1/10

Finding local extrema and intervals of increase/decrease

APPLICATIONS OF DIFFERENTIATION

Sample Math 115 Midterm Exam Spring, 2014

Generating Random Variables

5-7 Solving Quadratic Inequalities. Holt Algebra 2

Esterification in a PFR with Aspen Plus V8.0

Transcription:

Differentiation of Continuous Functions Central Difference Approximation of the First Derivative Introduction Ana Catalina Torres, Autar Kaw University of South Florida United States of America kaw@eng.usf.edu This worksheet demonstrates the use of Mathcad to illustrate Central Difference Approximation of the first derivative of continuous functions. Central Difference Approximation of the first derivative uses a point h ahead and a point h behind of the given value of x at which the derivative of f(x) is to be found. f '( x) f ( x + h) f ( x h) 2 h Section 1: Input The following simulation approximates the first derivative of a function using Central Difference Approximation. The user inputs are a) function, f(x) b) point at which the derivative is to be found, xv c) starting step size, h d) number of times user wants to halve the starting step size, n The outputs include a) approximate value of the derivative at the point and given initial step size b) exact value c) true error, absolute relative true error, approximate error and absolute relative approximate error, least number of correct significant digits in the solution as a function of step size. Function f(x) f( x) := exp( 2 x) Value of x at which f '(x) is desired, xv xv := 4.0 Starting step size, h h := 0.2 Number of times starting step size is halved

n := 12 This is the end of the user section. All the information must be entered before proceeding to the next section.

Section 2: Procedure The following procedure estimates the solution of first derivate of an equation at a point xv. f (x) = function xv = value at which the solution is desired h = starting step size value n = number of times starting step size is halved CDD( f, xv, h) := deriv deriv ( f( xv + h) f( xv h) ) 2h

Section 3: Calculation The exact value EV of the first derivative of the equation: Given the function f( x) e 2x First, using the derivative command the solution is found. In the second step, the exact value of the derivative is shown The solution of the first derivative is d f' ( x) := dx f( x) f' ( x) 2 e 2x The exact solution of the first derivative is EV := f' ( xv) EV = 5961.915974 The next loop calculates the following: Av: Approximate value of the first derivative using Central Difference Approximation by calling the procedure "CDD" Ev: Exact value of the first derivative Et: True error ε t : Absolute relative true percentage error Ea: Approximate error ε a : Absolute relative approximate percentage error n sig : Least number of correct significant digits in an approximation table1 := for i 0.. n 1 N 2 i i h H i N i ( ) AV CDD f, xv, H i i E ti EV AV i E ti ε ti EV 100 augment H, AV, E t, ε t ( )

table2 := for i 0.. n 1 N 2 i i h H i N i ( ) AV CDD f, xv, H i i E ti EV AV i ε ti if i > 0 E ti EV 100 E ai AV AV i i 1 ε ai E ai 100 AV i ε ai n sigi floor 2 log if 0 < ε 0.5 ai < 5 n sigi 0 otherwise ( ) augment H, AV, E a, ε a, n sig The loop halves the value of the starting step size n times. Each time, the approximate value of the derivative is calculated and saved in a vector. The approximate error is calculated after at least two approximate values of the derivative have been saved. The number of significant digits is calculated. If the number of significant digits calculated is less than zero, it is shown as zero.

Section 4: Table of Values The next table shows the step size value, approximate value, true error, the absolute relative true percentage error, the approximate error, the absolute relative approximate percentage error and the least number of correct significant digits in an approximation as a function of the step size value. table1 = 0 1 2 3 4 5 6 7 8 9 10 11 H AV E t ε t 0 1 2 3 0.2 6122.18-160.26 2.69 0.1 6001.74-39.83 0.67 0.05 5971.86-9.94 0.17 0.03 5964.4-2.48 0.04 0.01 5962.54-0.62 0.01 0.01 5962.07-0.16 0 0 5961.95-0.04 6.51 10-4 0 5961.93-0.01 1.63 10-4 7.81 10-4 5961.92-0 4.07 10-5 3.91 10-4 5961.92-6.06 10-4 1.02 10-5 1.95 10-4 5961.92-1.52 10-4 2.54 10-6 9.77 10-5 5961.92-3.79 10-5 6.36 10-7 table2 = 0 1 2 3 4 5 6 7 8 9 10 11 H AV E a ε a n sig 0 1 2 3 4 0.2 6122.18 0 0 0 0.1 6001.74-120.44 2.01 1 0.05 5971.86-29.88 0.5 1 0.03 5964.4-7.46 0.13 2 0.01 5962.54-1.86 0.03 3 0.01 5962.07-0.47 0.01 3 0 5961.95-0.12 0 4 0 5961.93-0.03 4.88 10-4 5 7.81 10-4 5961.92-0.01 1.22 10-4 5 3.91 10-4 5961.92-0 3.05 10-5 6 1.95 10-4 5961.92-4.55 10-4 7.63 10-6 6 9.77 10-5 5961.92-1.14 10-4 1.91 10-6 7

Section 5: Graphs The following graphs show the approximate solution, absolute relative true error, absolute relative approximate error and least number of significant digits as a function of step size. x := 0.. h + 1 Approximate Solution of the First Derivative using Central Difference Approximation as a Function of Step Size 6.15 10 3 Approximate Value 6.1 10 3 6.05 10 3 610 3 5.95 10 3 0 0.05 0.1 0.15 0.2 Step Size Exact Solution Approximate Solution 3 Absolute Relative True Percentage Error as a Function of Step Size Absolute Relative True Error 2 1 0 0 0.05 0.1 0.15 Step Size

Absolute Relative Approximate Percentage Error as a Function of Step Size Absolute Relative Approximate Error 3 2 1 0 0 0.02 0.04 0.06 0.08 0.1 Step Size Least number of Correct Significant Digit Least Significant Digits Correct as a Function of Step Size 8 6 4 2 0 0 0.05 0.1 0.15 Step Size

References Numerical Differentiation of Continuous Functions. See http://numericalmethods.eng.usf.edu/mws/gen/02dif/mws_gen_dif_txt_continuous.pdf

Questions 1. The velocity of a rocket is given by 140000 v(t) = 2000 ln 9.8 t 140000 2100 t Use Central Divided Difference method with a step size of 0.25 to find the acceleration at t=5s. Compare with the exact answer and study the effect of the step size. 2. Look at the true error vs. step size data for problem # 1. Do you see a relationship between the value of the true error and step size? Is this concidential? 3.Choose a step size of h=10-10 in problem #1. Keep halving the step size. Does the approximate value get closer to the exact result or does the result seem odd?

Conclusions Central Difference Approximation is a very accurate method to find the first derivative of a function. Legal Notice: The copyright for this application is owned by the author(s). Neither Mathcad nor the author are responsible for any errors contained within and are not liable for any damages resulting from the use of this material. This application is intended for non-commercial, non-profit use only. Contact the author for permission if you wish to use this application for-profit activities.