Exercise 4: The Crank-Nicolson scheme for $u_t + a u_x = 0$ is given by $$ \frac{U_{j,n+1}-U_{j,n}}{\Delta t} + \frac{a}{2}\frac{D_xU_{j,n}}{2\Delta x} + \frac{a}{2}\frac{D_xU_{j,n+1}}{2\Delta x} = 0 .$$ Show that the LTE is given by $$ \mathcal{L}_\Delta u = au_{xxx} \left(\frac{1}{6} + \frac{p^2}{12}\right) {\Delta x}^2 + O({\Delta x}^3,{\Delta t}^3) , $$ where $p = a{\Delta t}/{\Delta x}$. Find the amplification factor and find the conditions for stability.
I am just trying to work out the LTE of the Crank-Nicolson scheme, however i do not get the same answers the book. Here is my working if anyone could have a look and tell me what i am doing wrong, thank you.
The scheme $ u_j^{n+1} = u_j^n -\frac{1}{4}(u_{j+1}^n -u_{j-1}^{n}+ u_{j+1}^{n+1}-u_{j-1}^{n+1})$ rewrites as $$ \frac{(u(x,t+\Delta t) - u(x.t)}{\Delta t} + \frac{a}{4 \Delta x} [ u(x+\Delta x,t) - u(x-\Delta x ,t) + u(x+ \Delta x, t+ \Delta t)- u ( x-\Delta x , t+\Delta t) $$ Expanding using Taylor series, I get $$ u_t + \frac{1}{2} u_{tt} \Delta t + \frac{1}{6}u_{ttt} \Delta t^{2} + O(\Delta t^{3}) $$ and similarly for the $x$ and $t$. I get $$ \frac{a}{4 \Delta x} [ u(x,t) + u_x \Delta + \frac{1}{2} u_{xx} \Delta x^2 + \frac{1}{6} u_{xxx} \Delta x^{3} + O(\Delta x ^{4})- (u(x,t)-u_{x} \Delta x......)] $$ after some simplification i get the even terms remaining.. $$ \frac{a}{2}u_{x} + \frac{au_{xxx}\Delta x^{2}}{12} + O(\Delta x^{3}) $$ similarly for the last expansion. And $t$ and $x$ together, i get $$ \frac{a}{2}u_{x} + \frac{a}{2} u_{xt} \Delta t + o(\Delta t^{2}) + \frac{a}{12}u_{xxx} \Delta x^{2} $$ Putting all these terms back into the equation and using $u_{t} - = -au_{x}$, $u_{tt} = -au_{xt}$, I am left with $\frac{1}{6} u_{ttt} \Delta t^{2} + \frac{1}{6} a u_{xxx} \Delta x^{2} + O( \Delta t^{3} \Delta x^{3})$. However the answer in the book is $ au_{xxx}(\frac{1}{6} + \frac{p^2}{12} )\Delta x^{2}$.