The exercise here is to calculate $\dfrac{\partial}{\partial x} \sin(xz)$
The usual way is just considering $z$ as a constant and deriving, so it would be $z\cos(xz)$.
However, I want to solve it this way: Define $a=xz$, then $\sin(a) = \sin(xz)$
$\dfrac{\partial}{\partial x} \sin(a) = \dfrac{\partial}{\partial a} \sin(a) \dfrac{\partial}{\partial x} xz = z\cos(a) = z\cos(xz)$.
Is this second way correct? My friend said it is not making sense and not a proper use of notation. But I do not understant why...
(Just to not leave this unanswered)
As comments suggested, this is a fair use of chain rule and there is nothing wrong. The other given answers are talking about problems that doesn't exist.