You are on page 1of 1

CHEN 3020 Analysis of chemical engineering I Homework 1

Due Date: 10/2/2013

Problem Statement
Consider the function on the interval [-2,2] with h = 0.25, where h is the step size. Use the forward, backward, and centered finite difference approximations for the first and second derivatives so as to graphically illustrate which approximation is the most accurate. Graph all three firstderivative finite difference approximations along with the theoretical, and do the same for the second derivative as well.

Rubric
Methodology 1. Provide a statement of the problem. 2. Derive the forward finite difference approximations for the first and second derivatives. 3. Derive the backward finite difference approximations for the first and second derivatives. 4. Derive the centered finite difference approximations for the first and second derivatives. Results 1. Plot all three approximations for the first derivative as well as its theoretical value on one graph. 2. Plot all three approximations for the second derivative as well as its theoretical value on one graph. 3. Note that the theoretical value is continuous while the approximations are discrete. Error Analysis 1. For each approximation of the first derivative, calculate and tabulate the relative error at each point. 2. For each approximation of the second derivative, calculate and tabulate the relative error at each point. 3. State the most accurate approximation. Explain why the three approximations differ in accuracy. Python Code 1. Provide your Python code with comments. Using your classmates codes is considered cheating.