# Solving Schrodinger Equation with finite element and Crank-Nicolson?

The Schrodinger equation without potential has the following form: $$\partial_t\psi =i\nabla^2\psi.$$

The finite element software that I'm using does not handle complex function directly, so I solve it by splitting the equation into real and imaginary parts: $$\partial_t\psi_R = -\nabla^2\psi_I, \quad\quad \partial_t\psi_I = \nabla^2\psi_R .$$ Now if I apply finite element method, the equations become $$M\dot{\xi_R} = -A\xi_I, \quad\quad M\dot{\xi_I} = A\xi_R.$$

Here $$M$$ is the mass matrix, and $$A$$ is the diffusion matrix, and we solve for $$\xi_R$$ and $$\xi_I$$. Assuming periodic boundary here. If I apply the Crank-Nicolson Method, it becomes $${\xi_{R,n+1}} = \left(\dfrac{2M-\Delta tA}{2M+\Delta tA}\right)\xi_{I,n}, \quad\quad {\xi_{I,n+1}} =\left(\dfrac{2M+\Delta tA}{2M-\Delta tA}\right)\xi_{R,n}.$$

I am following approximately this paper to derive the equations.

Problem: After one time step, the function evolves correctly, but as it evolves to further timestep, the solusion simply goes back and forth between 0 and 1 timestep, because $$\left(\dfrac{2M+\Delta tA}{2M-\Delta tA}\right)\left(\dfrac{2M-\Delta tA}{2M+\Delta tA}\right) = I.$$ so $$\xi_{R,n+2} = I\xi_{R,n}$$

Does any expert here know how to resolve this problem, so I can go to further timestep? Thanks.

You made an error in the indices for the real and imaginary part. $$M\frac{\xi_{R,n+1}-\xi_{R,n}}{Δt}=-A\frac{\xi_{I,n+1}+\xi_{I,n}}2 \\ M\frac{\xi_{I,n+1}-\xi_{I,n}}{Δt}=A\frac{\xi_{R,n+1}+\xi_{R,n}}2$$ has all 4 vectors in each equation, it does not factorize the way you wrote. $$\begin{bmatrix} 2M&Δt\,A\\ -Δt\,A&2M \end{bmatrix} \begin{bmatrix} \xi_{R,n+1}\\\xi_{I,n+1} \end{bmatrix} = \begin{bmatrix} 2M&-Δt\,A\\ Δt\,A&2M \end{bmatrix} \begin{bmatrix} \xi_{R,n+1}\\\xi_{I,n+1} \end{bmatrix}$$