Solving of linear non-homogenous partial differential equation for complete integral, primarily using Charpit's method. How to solve :
$$xp+yq=z-a\sqrt{x^2+y^2}+z^2$$
Discussion:
Charpit's equation becomes:
$$\frac{dx}{x}=
\frac{dy}{y}=
\frac{dz}{px+qy}=
\frac{-dp}
{p+\frac{ax}{\sqrt{x^2+y^2}}-p(1+2z)}=
\frac{-dq}
{q+\frac{ay}{\sqrt{x^2+y^2}}-q(1+2z)}$$


*

*(1)(p/p) + (3)(x/x) + (2)(q/q) + (4)(y/y) does give a nice expression (when equated to (2)), but even that is difficult to manipulate.

*Does (1)=(2) (the solution of which is y=$c_1$x) have any significance (that is maybe it can be reused) ?
 A: $$x\frac{\partial z}{\partial x}+y\frac{\partial z}{\partial y}=z-a\sqrt{x^2+y^2}+z^2 \tag 1$$
$$\frac{dx}{x}=\frac{dy}{y}=\frac{dz}{z-a\sqrt{x^2+y^2}+z^2}=\frac{xdx+ydy}{x^2+y^2}$$
A first family of characteristic curves comes from $\frac{dx}{x}=\frac{dy}{y}$ :
$$\frac{y}{x}=c_1$$
A second family of characteristic curves comes from $\frac{dz}{z-a\sqrt{x^2+y^2}+z^2}=\frac{xdx+ydy}{x^2+y^2}$
Let $\quad \rho=\sqrt{x^2+y^2}\quad;\quad \rho d\rho=xdx+ydy $
$$\frac{dz}{z-a\rho+z^2}=\frac{\rho d\rho}{\rho^2}$$
$$\frac{dz}{d\rho}=\frac{z^2+z+a\rho}{\rho}$$
This is a Riccati's ODE. Solve it thanks to the usual method Eqs.(4-6) in http://mathworld.wolfram.com/RiccatiDifferentialEquation.html
The solution is rather complicated. Thanks to WolframAlpha :

All the above is valid in the characteristic curves with arbitrary $c_1$ and $c_2$. Outside the characteristic curves, $c_1$ and $c_2$ are related, for example such as :
$$c_2=\varphi(c_1)$$
For each function $\varphi$ the result is a solution of the PDE $(1)$. Thus the general solution of the PDE $(1)$ is :

$\varphi$ is an arbitrary function (to be determined if some boundary conditions are specified).
