Applying displacement control loading using lagrange multipliers in the material non-linear finite element method

Hi I am trying to implement a simple plasticity based finite element code. I am not clear how to set up displacement control applied through Lagrange multipliers. In case of a linear problem, I did the following to apply displcament control and it worked. Lets say the energy balance equation in the absence of body force is $$\frac{1}{2} \bf K u^2=f_{ext}u$$ Now I need to apply boundary conditions at some dof , $$u_b$$. The contraint equations can be written as $$Au_b=u_{app},$$ where, $$u_b$$ are the constrained/controlled DOF. $$u_{app}$$ are the constrain values. $$\lambda$$ - pseudo load term. The combined energy functional is $$\frac{1}{2} \bf K u^2 + \lambda(Au_b-u_{app)}=f_{ext}u$$ If I differentiate the above energy term w.r.t $$u$$ and $$\lambda$$, I get the following force balance set as below $$\bf K \bf u + \lambda A= \bf f_{ext}$$

$$\begin{bmatrix} \bf K & \bf A\\ \bf A^T & \bf 0 \end{bmatrix} \begin{Bmatrix} \bf u\\ \lambda \end{Bmatrix}= \begin{Bmatrix} \bf f_{ext}\\ u_{app} \end{Bmatrix}$$ Incase of non-linear problems, the $$\bf K$$ is $$\bf K(u)$$ and is non-linear. So the energy balance equation is $$\frac{1}{2} \bf K(\bf u) u^2 + \lambda (A \bf u_b-\bf u_{app})=\bf f_{ext}\bf u$$ If I differentiate the above energy term w.r.t $$u$$, I get the force balance as below $$\frac{1}{2} \frac{\partial{\bf K(\bf u)}}{\partial{\bf u}} \bf u^2 + \bf K \bf u + \lambda \bf A= \bf f_{ext}$$ It feels wrong. How do I evaluate this? How are the matrix form of equations modified in the non-linear case?

The addition of the Lagrange multiplier term is an unnecessary complication in this case, so let's just consider the simpler root finding problem $$F(u) = \frac12 u^TK(u)u - fu = 0.$$ Your question is how to solve this using, for example, a Newton method. The answer is that you need to solve a sequence of problems of the form $$J(u_k) \; \delta u_k = -F(u_k)$$ where the Jacobian matrix $$J$$ is defined as $$J(u)_{ij} = \frac{\partial F(u)_i}{\partial u_j}.$$
It requires a bit of work to sort out how $$J_{ij}$$ looks like, but it's not conceptually difficult. You just need to differentiate the various occurrences of the terms in $$F$$ with regard to $$u_j$$ and keep track of the summations that appear in $$F$$.