The Taylor series can be used to approximate a derivative to a desired amount of error. For instance
$\displaystyle \frac{du}{dx} = \frac{u_{i+1}-u_{i-1}}{2\Delta x} + O((\Delta x)^2)$
I have a problem where it asks for a 4th order noncompact difference. Can someone please explain what noncompact means in this context and how it differs from a compact scheme? Thanks
I'm kind of embarrassed how long it took me to find the Wikipedia article on this.
https://en.wikipedia.org/wiki/Non-compact_stencil
https://en.wikipedia.org/wiki/Compact_stencil
Essentially non-compact refers to the stencil used to create the finite difference approximation. A compact approximation may only use the values at a single node and its adjacent nodes while a non-compact approximation does not have this restriction.
For example in 2D a compact approximation can use only the red center node and the adjacent black nodes.
A non-compact scheme can use any node in any layer of nodes surrounding the current node.
A 1 dimensional 4th order finite difference approximation to the first derivative such as
$\displaystyle \frac{df}{dx} = \frac{f_{i-2}-8f_{i-1}+8f_{i+1}-f_{i+2}}{12\Delta x} + O((\Delta x)^4)$
would be non-compact because it uses 2 layers of nodes ($i\pm1$ and $i\pm2$)