Solving $\displaystyle p(1-q^2)=q(1-z)$ To Solve: $\displaystyle \frac{\partial z}{\partial x} \left \{1-\left(\frac{\partial z}{\partial y}\right)^2\right \}=\frac{\partial z}{\partial y}(1-z)$
My Attempt:
Assume $z$ is a function of $\displaystyle u=x+ay$, where a is an arbitrary constant.
Therefore, $\displaystyle p= \frac{\partial z}{\partial x}=\frac{dz}{du}\frac{\partial u}{\partial x}=\frac{dz}{du}$
and  $\displaystyle q= \frac{\partial z}{\partial y}=\frac{dz}{du}\frac{\partial u}{\partial y}=a\frac{dz}{du}$
$\displaystyle \frac{dz}{du}-a^2\left(\frac{dz}{du}\right)^3=a\frac{dz}{du}(1-z)$
When I cancel $\displaystyle \frac{dz}{du}$ from each side during simplication, is it justified that I am assuming that  $\displaystyle \frac{dz}{du}\neq 0$? 
I don't know how that assumption holds true. Please advise.

is of the form f(z, p, q) =0
The first step is put q=ap in the given equation
The equation becomes p(1-a^2p^2) =ap(1-z)
1-a^2p^2=a-az
p=√(1-a+az) /a
dz=pdx+qdy
dz=pdx+apdy
dz=p(dx+ady)
dz/p=dx+ady
adz/(√1-a+az)=dx+ady
Put 1-a+az=t
adz=dt
Integrating, we get
2(√1-a+az)=x+ay+c
Squaring on both sides,the general solution is 4(1-a+az) =(x+ay+c) ^2
