Taylor series for two variables and truncation error

318 Views Asked by At

Im trying to show a scheme is consistent and I have some troubling computing $u_{k+1}^{n+1} - u_{k-1}^{n+1}$ where $u_k^n = v( k \Delta x, n \Delta t)$. I understand since there is a change in both variables, I can use taylor in two variables: I obtain \begin{aligned} u_{k+1}^{n+1} &= u_k^n + (u_x)_k^n \Delta x + (u_t)_k^n \Delta t + \tfrac{1}{2} \big( (u_{xx} )_k^n \Delta x^2 + 2(u_{xt})_k^n \Delta x \Delta t + (u_{tt})_k^n \Delta t^2\big)\\ & + O( \Delta x^3, \Delta t^3) \end{aligned} Am I having difficulties to see when to stop and when to use the big OH. Notice that when I do the difference $u_{k+1}^{n+1} - u_{k-1}^{n+1} $ some cancellation will happen. So, my question is, how do I terminate the taylor and write the big oh? is there a criteria to do so?

1

There are 1 best solutions below

0
On BEST ANSWER

You indeed need to expand the solution as a Taylor series of two variables. The expression in OP looks correct. The expansion of $u_{k-1}^{n+1}$ is obtained by substituing $\Delta x \to -\Delta x$ in the expression of $u_{k+1}^{n+1}$. Thus, $$ \frac{u_{k+1}^{n+1} - u_{k-1}^{n+1}}{2\Delta x} = (u_x)_k^n + (u_{xt})_k^n\Delta t + O(\Delta x^2, \Delta t^3/\Delta x) . $$ At least, we have proven that the previous centered finite difference is consistent with $u_x$ if $\Delta t^3/\Delta x$ goes to zero as $\Delta t$ and $\Delta x$ vanish. However, we do not know if the scheme is first-order accurate, or higher. To do so, one should examine the full expression of the scheme and exploit the fact that $u$ is assumed to solve the PDE. There may be additional cancellations.