Use a joint variation equation, :

, so

Substitute k in a new joint variation equation using and :

, so