%{ Function returns the jacobian from the Euler-Lagrange equations. Used in the Gauss-Seidel methods %} function v = jacobian2MS(u,i,j,dx,a,kappa2,kappa3) v = zeros(3,1); b = -2/(dx^2); v(1) = (4/3)*a + (8/3)*b + (10/9)*kappa2*b + (2/9)*kappa3*(4*xxderiv(u,1,i,j,dx) - 2*yyderiv(u,1,i,j,dx) + u(1,i,j)*2*b +6*u(2,i,j)*b); v(2) = 4*a + 8*b + 2*kappa2*b + (2/9)*kappa3*(6*u(1,i,j)*b + 18*yyderiv(u,2,i,j,dx) + 18*u(2,i,j)*b); v(3) = 4*a + (4 + 2*kappa2)*2*b + (2/9)*kappa3*(6*u(1,i,j)*b + 18*u(2,i,j)*b + 36*xyderiv(u,3,i,j,dx)); end