Solve the given non-linear differential equation using charpit's method: $$Z = \frac{p^2+q^2}{2}+(p-x)(q-y)$$
my work:
After writing charpit's auxilliary equation, I equated the fractions twice and solved them and got $p=x+a$ and $q=y+b$ (a and b are constants) and I have verified them, they are correct.
Doubt:
Now what i have to do next ?
should I directly out these values of p and q in $dz= pdx +qdy$ or should i put one of the(p or q) in the original differential equation and then solve it to get p(or q). As per the steps mentioned in the book(attachment), I should go with the 2nd approach but i don't think it's the correct way forward.
attachment

Both methods give the same result. The first method, which I used in Find the complete integral of following partial differential equation $z=(p^2 + q^2)/2 + (p-x)(q-y)$, gives the following result: $$ z=\frac{1}{2}(x+a)^2+\frac{1}{2}(y+b)^2+ab. \tag{1} $$ Now, let's use the second method. Integrating $\frac{\partial z}{\partial x}=p=x+a$, we find $$ z=\frac{x^2}{2}+ax+f(y), \tag{2} $$ hence $q=\frac{\partial z}{\partial y}=f'(y)$. Substituting these expressions for $z, p,$ and $q$ in the PDE, we obtain $$ \frac{x^2}{2}+ax+f(y)=\frac{1}{2}(x+a)^2+\frac{1}{2}(f'(y))^2+a(f'(y)-y) $$ $$ \implies (f'(y)+a)^2=2f(y)+2ay \implies \frac{f'(y)+a}{\sqrt{2f(y)+2ay}} = \pm 1 $$ $$ \implies \sqrt{2f(y)+2ay}=\pm (y +c) \implies f(y)=\frac{1}{2}(y+c)^2-ay. \tag{3} $$ Substituting $(3)$ in $(2)$, and defining $b:=c-a$, we finally obtain \begin{align} z&=\frac{x^2}{2}+ax+\frac{1}{2}(y+a+b)^2-ay \\ &=\frac{1}{2}(x+a)^2+\frac{1}{2}(y+b)^2+ab, \tag{4} \end{align} which is identical to $(1)$.