Numerical differentiation using forward, backward and central finite difference

In summary, the conversation is about a question given for a university assignment that involves finding the first derivative of a given function at all possible points within an interval. The question also asks for the three different methods of approximation - forward, backward, and central finite difference. The person is having trouble with the question, specifically with what to do when x=0 due to the undefined or -infinity value of ln(0). They are looking for ideas or suggestions on how to approach this.
  • #1
Pricey89
3
0
ive been given this question for a uni assignment:

given the function:

f (x) = 5(x^1.3) +1.5(7x − 3)+ 3(e^− x) + ln(2.5(x^3))

find the first derivative at all possible points within the interval [0, 6], with step length h = 1 for:
forward difference aproximation, backward difference aproximation and central finite difference aproximation.

having a bit of trouble with the question... pretty sure i know how to do most of it but not sure what to do when x=0 because ln(0) is undefined or -infinity...

any ideas?

thanks
 
Physics news on Phys.org
  • #2
Well, it says "for all possible points" which would exclude any points where ln(0) appears.
 
  • #3
Pricey89 said:
ive been given this question for a uni assignment:

given the function:

f (x) = 5(x^1.3) +1.5(7x − 3)+ 3(e^− x) + ln(2.5(x^3))

find the first derivative at all possible points within the interval [0, 6], with step length h = 1 for:
forward difference aproximation, backward difference aproximation and central finite difference aproximation.

having a bit of trouble with the question... pretty sure i know how to do most of it but not sure what to do when x=0 because ln(0) is undefined or -infinity...

any ideas?






thanks


LOL I'm guessing you're from brunel :P
I've figured out how to do the hand calculations but not the MATLAB part
 

FAQ: Numerical differentiation using forward, backward and central finite difference

1. What is numerical differentiation using forward, backward, and central finite difference?

Numerical differentiation is a method used to approximate the derivative of a mathematical function at a given point. Forward, backward, and central finite difference are three techniques used to calculate this approximation.

2. How does forward finite difference work?

Forward finite difference involves calculating the slope of a function at a given point by taking the difference between the function values at that point and a point slightly ahead of it. This method uses the first-order Taylor series approximation to estimate the derivative.

3. What is the difference between forward, backward, and central finite difference?

The main difference between these three techniques is the way they choose the points to calculate the derivative. Forward finite difference uses a point ahead of the given point, backward finite difference uses a point behind the given point, and central finite difference uses a point on either side of the given point.

4. When should I use central finite difference over forward or backward finite difference?

Central finite difference is generally preferred when the function is smooth and has a high degree of differentiability. This is because it uses points on either side of the given point, resulting in a more accurate approximation of the derivative.

5. Are there any limitations to numerical differentiation using finite difference?

Yes, there are a few limitations to this method. One limitation is that it can only approximate the derivative at a given point, and the accuracy of this approximation depends on the choice of step size. Another limitation is that it may not work well for functions with discontinuities or sharp changes. Additionally, round-off errors can affect the accuracy of the approximation.

Back
Top