Adjoint equations in stability analysis