Different approximations for the same problem

  • Context: Undergrad 
  • Thread starter Thread starter Silviu
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the different finite difference approximations used in a statistical mechanics problem, specifically focusing on the implications of using various approximations for spatial and temporal derivatives. Participants explore the accuracy and convenience of these approximations in the context of numerical methods for solving differential equations.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant notes confusion regarding the use of different approximations for spatial and temporal derivatives in the problem, suggesting that different choices might yield different answers.
  • Another participant points out that one approximation may be more convenient for calculations, emphasizing that the limit as ##\Delta x, \Delta t \to 0## will unify the derivatives.
  • It is mentioned that the first finite difference approximation is 2nd order accurate in ##\Delta x##, while the second is 1st order accurate in ##\Delta t##, indicating that the 2nd order approximation is generally more accurate.
  • A participant questions why one wouldn't consistently use the same order of approximation for both space and time.
  • Further, it is suggested that using a 2nd order approximation in the spatial direction can provide additional accuracy when solving differential equations numerically, with a reference to the Crank-Nicholson method for time derivatives.

Areas of Agreement / Disagreement

Participants express differing views on the appropriateness of using different approximations for spatial and temporal derivatives, with some advocating for consistency while others highlight the benefits of varying orders of accuracy. The discussion remains unresolved regarding the best approach to take.

Contextual Notes

Participants do not reach a consensus on the optimal choice of approximation, and there are unresolved considerations regarding the trade-offs between accuracy and convenience in numerical methods.

Silviu
Messages
612
Reaction score
11
Hello I am looking at Stat Mech problem 2 from here (page 8) with solution here. I am confused about their approximations. They are all valid, but they are different. For example in part a) they use $$\frac{\partial P}{\partial x}(x+\frac{1}{2}\Delta x,t)=\frac{P(x+\Delta x,t)-P(x,t)}{\Delta x}$$ and a bit lower they use $$\frac{\partial P}{\partial x}(x,t)=\frac{P(x,t+\Delta t)-P(x,t)}{\Delta t}$$ Why would I use one over the other? If you know what answer you need, you might figure it out, but in general I think you would get a different answer if using different approximations (by a factor of 2 or something?). Also in part b) they use a Taylor series, which could have been used equally well in part a) and I am not sure why they used it here but not there.
 
Science news on Phys.org
The second one should be a time derivative.

One might be more convenient for the following calculations. It doesn't really matter as you take the limit of ##\Delta x, \Delta t \to 0## later anyway.

In this limit,
$$\frac{\partial P}{\partial x}(x+\frac{1}{2}\Delta x,t)=\frac{\partial P}{\partial x}(x,t) = \frac{\partial P}{\partial x}(x+\Delta x,t)$$
 
The first finite difference approximation is 2nd order accurate in ##\Delta x##, meaning that the error is on the order of ##(\Delta x)^2##. The second finite difference approximation is 1st order accurate in ##\Delta t##, meaning that the error is on the order of ##\Delta t##. A 2nd order approximation is more accurate than a 1st order approximation.
 
Chestermiller said:
The first finite difference approximation is 2nd order accurate in ##\Delta x##, meaning that the error is on the order of ##(\Delta x)^2##. The second finite difference approximation is 1st order accurate in ##\Delta t##, meaning that the error is on the order of ##\Delta t##. A 2nd order approximation is more accurate than a 1st order approximation.
Thank you for your reply! I remember we studied this in a numerical method class. However, why wouldn't one stick to a certain approximation for both space and time?
 
Silviu said:
Thank you for your reply! I remember we studied this in a numerical method class. However, why wouldn't one stick to a certain approximation for both space and time?
If you are solving a differential equation numerically like $$\frac{\partial P}{\partial t}=k\frac{\partial^2 P}{\partial x^2}$$you can get added accuracy (for free) in the x direction if you use the 2nd order formula. Sometimes (but not usually) a 2nd order approximation is used for the first derivative in the t direction also; this is called Crank-Nicholson.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K