- #1
fonseh
- 529
- 2
fonseh said:Homework Statement
Can someone explain why for the first derivative 3 point forward difference formula is 4f(x-h) - f(x-2h) ??
Homework Equations
The Attempt at a Solution
Why it's not f(x-h) - f(x-2h) ?
Is there anything wrong with the notes ?
please refer to the circled part ... it's really ##4 f(x-h)-f(x-2h)##Ray Vickson said:The formula is not ##4 f(x-h)-f(x-2h)##, and the notes make no such claim. Please try again with a correct question.
Anyway, as far as I can see the notes explain things in a perfectly clear way, using the Taylor expansion.
here's the full notesRay Vickson said:The formula is not ##4 f(x-h)-f(x-2h)##, and the notes make no such claim. Please try again with a correct question.
Anyway, as far as I can see the notes explain things in a perfectly clear way, using the Taylor expansion.
OK, but your first message said nothing about the "circled part"---that makes a difference. So, I have a question for you: have you taken the Taylor expansions for ##f(x-h)## and ##f(x-2h)## and performed the calculation of ##4f(x-h) - f(x-2h)?## Did you get a different answer from that in the notes?fonseh said:please refer to the circled part ... it's really ##4 f(x-h)-f(x-2h)##
The reason that your equation is not correct is that this is a first order accurate approximation, and the result they are trying to obtain is supposed to be accurate to terms of 2nd order in h.fonseh said:Homework Statement
Can someone explain why for the first derivative 3 point forward difference formula is 4f(x-h) - f(x-2h) ??
Homework Equations
The Attempt at a Solution
Why it's not f(x-h) - f(x-2h) ?
Is there anything wrong with the notes ?
No , i get the same as the notes , my question is why should we use 4f(x-h) ? why can't we use f(x-h) ?Ray Vickson said:OK, but your first message said nothing about the "circled part"---that makes a difference. So, I have a question for you: have you taken the Taylor expansions for ##f(x-h)## and ##f(x-2h)## and performed the calculation of ##4f(x-h) - f(x-2h)?## Did you get a different answer from that in the notes?
Can you explain further ? I still didnt get itChestermiller said:The reason that your equation is not correct is that this is a first order accurate approximation, and the result they are trying to obtain is supposed to be accurate to terms of 2nd order in h.
In my judgment, it is well explained in the visual you provided.fonseh said:Can you explain further ? I still didnt get it
Why we should use 4f(x-h) ? It's not explained in the notesChestermiller said:In my judgment, it is well explained in the visual you provided.
fonseh said:No , i get the same as the notes , my question is why should we use 4f(x-h) ? why can't we use f(x-h) ?
What they do is eliminate the term involving f'' from the two equations, and solve for f'. This results in a finite difference approximation that is accurate to terms if h^{2}.fonseh said:Why we should use 4f(x-h) ? It's not explained in the notes
why there is a need to eliminate f'' from the equation ?Chestermiller said:What they do is eliminate the term involving f'' from the two equations, and solve for f'. This results in a finite difference approximation that is accurate to terms if h^{2}.
I tried f(x-h) - f(x-2h) , i get -h'f(x) + (3 /2!) (f"(x) h^2) + (3/3!)(f"'(x)h^3) + ...Ray Vickson said:(a+b+c)f(x)+Bhf′(x)+Ch2f′′(x)+O(h3),(a+b+c)f(x)+Bhf′(x)+Ch2f″(x)+O(h3),(a+b+c) f(x) + B h f'(x) + C h^2 f''(x) + O(h^3),
Because otherwise you would find that the final finite difference equation would only be first order in h. Try any other linear combination of the two equations and see what you get for f'fonseh said:why there is a need to eliminate f'' from the equation ?
fonseh said:I tried f(x-h) - f(x-2h) , i get -h'f(x) + (3 /2!) (f"(x) h^2) + (3/3!)(f"'(x)h^3) + ...
I didnt get (a+b+c)f(x)+Bhf′(x)+Ch2f′′(x)+O(h3) though
Do you mean f(x) + f(x-h) - f(x-2h) ?Ray Vickson said:That is because you ignored what I wrote. I wrote ##a f(x) + b f(x-h) + c f(x-2h)##. I suggest you do the same, then tell us what you obtain.
fonseh said:Do you mean f(x) + f(x-h) - f(x-2h) ?
If so , i get f(x) -h'f(x) + (3 /2!) (f"(x) h^2) + (3/3!)(f"'(x)h^3) + ...
The "First derivative 3 point forward difference formula" is a mathematical formula used to approximate the first derivative of a function at a given point. It is based on the concept of forward difference, which calculates the slope of a function using data points that are ahead of the point of interest. This formula is commonly used in numerical analysis and is particularly useful for approximating derivatives of functions that are not easily differentiable.
The "First derivative 3 point forward difference formula" is derived by using Taylor's series expansion to approximate the value of a function at a given point. By taking three data points that are close to the point of interest, the formula is able to calculate the slope of the function at that point. The formula involves dividing the difference between the function values at the three points by the difference between the points, and then taking the limit as the difference between the points approaches zero.
One advantage of using the "First derivative 3 point forward difference formula" is that it is relatively simple to implement and does not require advanced mathematical knowledge. It also provides a reasonable approximation of the first derivative at a given point, making it useful for estimating the behavior of a function. Additionally, it can be used for both continuous and discrete data, making it a versatile tool for numerical analysis.
Yes, there are some limitations to the "First derivative 3 point forward difference formula". One limitation is that it can only approximate the first derivative at a single point, so it may not accurately represent the overall behavior of a function. It also assumes that the function is smooth and does not have any sharp changes or discontinuities. Additionally, the formula may introduce some error in the approximation, especially when the data points are not evenly spaced.
The accuracy of the "First derivative 3 point forward difference formula" depends on the function being approximated and the choice of data points. In general, it provides a reasonable estimate of the first derivative, but the accuracy decreases as the distance between the data points increases. It is important to note that this formula is an approximation and may not give an exact value for the first derivative, but it can still be a useful tool for analyzing the behavior of a function.