Derivation of 3pt forward formula

  • Thread starter Thread starter jkthejetplane
  • Start date Start date
  • Tags Tags
    Derivation Formula
Click For Summary

Homework Help Overview

The discussion revolves around the derivation of the three-point forward formula in numerical analysis, particularly focusing on Taylor series expansions and their application in approximating derivatives. Participants explore the relationships between function values at different points and the implications of including higher-order derivatives in the derivation process.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • Participants discuss the Taylor expansions for f(x+h) and f(x+2h) and how to eliminate the second derivative terms to derive the forward formula. There are questions about specific terms in the formula and the reasoning behind their presence, particularly the term 4f(x-h).

Discussion Status

Several participants have provided insights into the derivation process, with some clarifying the need to eliminate certain terms for accuracy. There is an ongoing exploration of the implications of including higher-order derivatives, and while some participants express confusion, others attempt to clarify the rationale behind the derivation steps.

Contextual Notes

Participants note that the discussion is based on an image that lacks detailed explanations, leading to questions about specific terms and their significance in the derivation. There is also mention of assumptions regarding the error terms in the context of the three-point method compared to two-point methods.

jkthejetplane
Messages
29
Reaction score
4
Homework Statement
3 Point forward derivation using Taylor expansion
Relevant Equations
Hi,
My homework is to derive the formula for 3 point forward difference using Taylor expansion.
I have just gotten back into school after some years off and I feel like I’m overthinking a piece to get me started.
Should I start with taking the Taylor expansion of f(x+2h) and f(x+h), subtract the later from the former, then solve for f’(x)?
I have been trying to look up how get started but I feel like I’m setting it up wrong. Anyone point me in the correct direction with an explanation?
Thanks
f(x+2h) = f(x) + 2hf’(x) + .5(2h)^2f”(x)
f(x+h) = f(x) + hf’(x) + .5h^2f”(x)

f(x+2h) - f(x+h)?

f(x+2h) - 2f(x+h)?
 
Physics news on Phys.org
Last edited:
Steve4Physics said:
Try this: https://www.physicsforums.com/attachments/sdfdfs-jpg.111906/

The formula at the top is the 3 point forward distance formula.
So you would start by finding f(x+h) and f(x+2h) and then the derivation is similar to the 3 point backward distance formul which is shown.

why is the formula in the red 4f(x-h)?
I was given the formula and the way I tried to derive it I felt like I was missing terms. Maybe from the 4 but I’m not sure why it’s there
 
jkthejetplane said:
why is the formula in the red 4f(x-h)?
Whoever solved it noticed that 4f(x - h) - f(x - 2h) led to an equation involving f(x) and f'(x) and some other terms that could be ignored. It's not at all an obvious thing to do.
 
What you do is write the 3 term expansions for f(x+h) and f(x+2h) and then eliminate the f'' term between the two equations. This will automatically deliver the 3 point 2nd order accurate forward formula for f'(x)
 
  • Like
Likes   Reactions: Steve4Physics and jkthejetplane
jkthejetplane said:
why is the formula in the red 4f(x-h)?
I was given the formula and the way I tried to derive it I felt like I was missing terms. Maybe from the 4 but I’m not sure why it’s there

It’s an old image I found. The red ringing must have been associated with an acompanying explanation: it is linked to the elimination of the *second* derivative terms (see below).

Pardon the lack of Latex for equations.

In the derivation in the image, the Taylor expansions required are:

f(x-h) = f(x) – hf’(x) + f’’(x)h²/4

f(x-2h) = f(x) – 2hf’(x) + f’’(x)(2h)²/4
= f(x) – 2hf’(x) + f’’(x)h²

Note we include 2nd derivatives. Having 3 (rather than 2) points improves accuracy because we can take account both 1st and 2nd derivatives. That’s what makes a 3 point method more accurate than a 2 point method

We need to eliminate f’’(x)h² terms from and . So we multiply by 4 to give:
4f(x-h) = 4f(x) – 4hf’(x) + f’’(x)h² ③

Then ③ – ② gives:
4f(x-h) – f(x-2h) = 4f(x) – 4hf’(x) + f’’(x)h² - (f(x) – 2hf’(x) + f’’(x)h²)
= 4f(x) – 4hf’(x) - f(x) + 2hf’(x)
This eliminates the f’’(x)h² terms. You should now understand the red ringing.

After a bit of simple algebra we are left with
2hf’(x) = 3f(x) - 4f(x-h) + f(x-2h)
Q.E.D.

That the backwards difference. The forwards difference is very similar.
 
  • Like
Likes   Reactions: jkthejetplane
Steve4Physics said:
It’s an old image I found. The red ringing must have been associated with an acompanying explanation: it is linked to the elimination of the *second* derivative terms (see below).

Pardon the lack of Latex for equations.

In the derivation in the image, the Taylor expansions required are:

f(x-h) = f(x) – hf’(x) + f’’(x)h²/4

f(x-2h) = f(x) – 2hf’(x) + f’’(x)(2h)²/4
= f(x) – 2hf’(x) + f’’(x)h²

Note we include 2nd derivatives. Having 3 (rather than 2) points improves accuracy because we can take account both 1st and 2nd derivatives. That’s what makes a 3 point method more accurate than a 2 point method

We need to eliminate f’’(x)h² terms from and . So we multiply by 4 to give:
4f(x-h) = 4f(x) – 4hf’(x) + f’’(x)h² ③

Then ③ – ② gives:
4f(x-h) – f(x-2h) = 4f(x) – 4hf’(x) + f’’(x)h² - (f(x) – 2hf’(x) + f’’(x)h²)
= 4f(x) – 4hf’(x) - f(x) + 2hf’(x)
This eliminates the f’’(x)h² terms. You should now understand the red ringing.

After a bit of simple algebra we are left with
2hf’(x) = 3f(x) - 4f(x-h) + f(x-2h)
Q.E.D.

That the backwards difference. The forwards difference is very similar.
Isn't this the unabridged version of what I said in my post?
 
  • Like
Likes   Reactions: jkthejetplane
THANK YOU ALL. I guess i just didn't notice that the goal was to eliminate the f" term as i assumed it was the same as two point and it was the error term. I see now the error term is the f"' term which now makes sense looking back at the final equation that i was trying to derive.
Thank you again to all who contributed
-jk
 
Chestermiller said:
Isn't this the unabridged version of what I said in my post?

Hi. Apologies. I didn’t see your post. I saw the OP’s query about the image I attached (“why is the formula in the red 4f(x-h)? ”) and just jumped in. Your post was below so I missed it.

The OP seemed to be struggling, so I expanded on the working in the image and gave the rationale. Probably too much direct help in hindsight.

I’ll take care to read all replies in future. FWIW I’ve given #5 a ‘Like’.
 

Similar threads

Replies
12
Views
1K
Replies
32
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 19 ·
Replies
19
Views
2K
Replies
15
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
4
Views
5K
  • · Replies 1 ·
Replies
1
Views
1K