I am trying to solve a second-order elliptic non-linear PDE on a disk, and it seems that the "solution" given by NDSolve (more precisely, NDSolveValue) is either incorrect or is only correct at C^0 level (so its derivatives are inaccurate). In particular, it seems that if I plug the "solution" in the PDE I do not get zero -- in fact, I get O(1) errors!
Please consider the following example. The PDE is
usol = NDSolveValue[{\!\(
\*SubsuperscriptBox[\(\[Del]\), \({x, y}\), \(2\)]\(u[x, y]\)\) +
0.5 Exp[-u[x, y]] - 2. Exp[u[x, y]] == 0.,
DirichletCondition[u[x, y] == 2. Log[1. - 0.5 Sin[2. ArcTan[x, y]]],
True]}, u, {x, y} \[Element] Disk[]]
The plot of the solution looks fine
Plot3D[usol[x, y], {x, y} \[Element] Disk[], PlotRange -> Full,
AxesLabel -> Automatic]
Now I apply the PDE on the solution
Eqsol[x_, y_] :=
Derivative[2, 0][usol][x, y] + Derivative[0, 2][usol][x, y] +
0.5 Exp[-usol[x, y]] - 2. Exp[usol[x, y]]
And if I plot it I get
Plot3D[Eqsol[x, y], {x, y} \[Element] Disk[], PlotRange -> Full,
AxesLabel -> Automatic]
Since this should vanish for an actual solution, we have an O(1) discrepancy. In an average sense things are just slightly better, but still not good, as we can see by integrating the square of Eqsol,
NIntegrate[Eqsol[x, y]^2, {x, y} \[Element] Disk[]]
0.128622
So what could be happening? Am I doing something wrong? How can I obtain accurate derivatives of the solution of the PDE (ideally up to second order, but I only really need first derivatives for my main purposes)? Thank you.
Note: I tried playing with AccuracyGoal, PrecisionGoal and InterpolationOrder without success. I also tried other equations, boundary conditions and domain shapes. The only case that I got really nice results (Eqsol ~ 10^-12) was for a linear equation, with sufficiently simple boundary conditions (such as x^2- y^2) in a rectangular domain.