Different approximations for the same problem

  • I
  • Thread starter Silviu
  • Start date
In summary: 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.
  • #1
Silviu
624
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.
 
Physics news on Phys.org
  • #2
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)$$
 
  • #3
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.
 
  • #4
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?
 
  • #5
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.
 

FAQ: Different approximations for the same problem

1. What are the different types of approximations used for the same problem?

There are several types of approximations that can be used for the same problem, depending on the specific problem and its requirements. Some common types include numerical approximations, analytical approximations, and statistical approximations.

2. How do these different approximations differ from each other?

These different approximations differ in terms of their approach and level of accuracy. Numerical approximations involve using numerical methods to solve the problem, while analytical approximations use mathematical equations to approximate the solution. Statistical approximations use data and probability to estimate the solution.

3. When should I use a specific type of approximation?

The type of approximation used depends on the nature of the problem and the desired level of accuracy. For complex and highly precise problems, analytical approximations may be more suitable, while for problems with large amounts of data, statistical approximations may be more appropriate. Numerical approximations are often used when a precise analytical solution is not possible.

4. What are the advantages and disadvantages of using different approximations?

The advantages of using different types of approximations include their versatility and ability to provide solutions for a wide range of problems. However, the accuracy of these approximations can vary, and some may be more time-consuming or resource-intensive than others.

5. How can I determine the accuracy of a particular approximation method?

The accuracy of an approximation method can be evaluated by comparing its results to known solutions or experimental data. Additionally, the level of precision and error can be calculated to determine the effectiveness of the approximation.

Similar threads

Replies
1
Views
938
Replies
1
Views
893
Replies
1
Views
2K
Replies
3
Views
854
Back
Top