# Solving a nonlinear poisson equation via variational minimization

I am kind of new in finite elements and I am solving simple "Poisson nonlinear" problem.

$- \nabla ((1 + u^2) \nabla u) = f$

$u = 0 \ \text{on} \ \Omega$

I am using Newton solver, where I have defined step as following

$J = s * ( -g )$,

where $J = \int (2 \delta u \nabla u_h) \nabla v + (( 1 + u_h^2) \nabla \delta u ) \nabla v dx$

and

g = $\int (1 + u^2 ) \nabla u \nabla v - f v \ dx$.

I would like to check my solution and monitor energy, however I am bit stuck here. I know that in linear case it would be QP function, but how is my strain energy function defined here?