Help in partial differential coefficient. This might sound silly,but i am somewhat stucked :
If $\eta=\eta(x,y)$ and $\tau=\tau(x,y)$
$$p=\frac{\partial z}{\partial x}=\frac{\partial z}{\partial \tau}\frac{\partial \tau}{\partial x}+\frac{\partial z}{\partial \eta}\frac{\partial \eta}{\partial x}$$
$$q=\frac{\partial z}{\partial y}=\frac{\partial z}{\partial \tau}\frac{\partial \tau}{\partial y}+\frac{\partial z}{\partial \eta}\frac{\partial \eta}{\partial y}$$
Then i have to find $r=\frac{\partial^2 z}{\partial x^2}$
Consider the first part of $\frac{\partial}{\partial x}(p)$
$$\frac{\partial }{\partial x}\bigg(\frac{\partial z}{\partial n} \frac{\partial \eta}{\partial x}\bigg)=\frac{\partial^2 z}{\partial \eta^2}\bigg(\frac{\partial \eta}{\partial x}\bigg)^2+\frac{\partial z}{\partial x}\frac{\partial^2 \eta}{\partial x^2}$$
I feel i am making some mistake here,as 
The answer given is 
$$\frac{\partial }{\partial x}\bigg(\frac{\partial z}{\partial n} \frac{\partial \eta}{\partial x}\bigg)=\frac{\partial^2 z}{\partial \eta^2}\bigg(\frac{\partial \eta}{\partial x}\bigg)^2+\frac{\partial z}{\partial x}\frac{\partial^2 \eta}{\partial x^2}+
\frac{\partial^2 z}{\partial \eta \partial \tau}\frac{\partial \tau}{\partial x}\frac{\partial n}{\partial x}
$$
Can anyone point out where this extra term came from ?
the other part will rely upon the correctness of this,pointing out the mistake in this part will help.
 A: Applying the product rule we obtain:
$$\frac{\partial }{\partial x}\bigg(\frac{\partial z}{\partial n} \frac{\partial \eta}{\partial x}\bigg)=\frac{\partial}{\partial x}\left(\frac{\partial z}{\partial \eta} \right)\frac{\partial \eta}{\partial x}+\frac{\partial z}{\partial \eta}\frac{\partial}{\partial x}\left(\frac{\partial \eta}{\partial x} \right).$$
Applying the chain rule we have: 
$$\frac{\partial}{\partial x}\left(\frac{\partial z}{\partial \eta} \right) = \frac{\partial \eta}{\partial x}\frac{\partial}{\partial \eta}\left(\frac{\partial z}{\partial \eta}\right)+\frac{\partial \tau}{\partial x}\frac{\partial}{\partial \tau}\left(\frac{\partial z}{\partial \eta}\right)\tag{1}$$
and from that you obtain the expected result. 
Let me be more explicit on the calculation of $\frac{\partial}{\partial x}\left(\frac{\partial z}{\partial \eta} \right)$.
We are thinking of $z$ as a function on the variables $(\eta,\tau)$. Besides that, $\eta$ and $\tau$ are functions of $x$ and $y$. Now, the same happens to $f(\eta,\tau) := \frac{\partial z}{\partial \eta}$. The function $f$ depends on $(\eta,\tau)$. Applying the Chain Rule we obtain:
$$\frac{\partial f}{\partial x} = \frac{\partial \eta}{\partial x}\frac{\partial f}{\partial \eta}+\frac{\partial \tau}{\partial x}\frac{\partial f}{\partial \tau}. \tag{2}$$
The expression $\frac{\partial f}{\partial x} $ is a shorter way of writting
$\frac{\partial }{\partial x}\left[f(\eta(x,y),\tau(x,y))\right] $.
So, putting $f= \frac{\partial z}{\partial \eta}$ on the equation $(2)$ we obtain the equation $(1)$.
