I know that the chain rule for a function of one variable $y=f(x)$ is written as $$\frac{{\rm d}}{{\rm d}x}=\frac{{\rm d}}{{\rm d}y}\times \frac{{\rm d}y}{{\rm d}x}\tag{1}$$
I also know that if $u=f(x,y)$ then the total derivative is
$${\rm d}u=\frac{\partial u}{\partial x}\cdot{\rm d} x+\frac{\partial u}{\partial y}\cdot{\rm d}y$$
But from $(1)$ is there any plausibility in changing all the derivatives to partial derivatives such that $$\frac{\partial}{\partial x}=\frac{\partial}{\partial y}\times \frac{\partial y}{\partial x}$$ when $y=f(x)$ or does the above formula only hold iff $y=f(x,y)$?
To illustrate my confusion I will add this question and solution to give some context:
Start of Question:
If $f$ is an arbitrary function, show that $\psi(z,t)=f(z-vt)$ is a solution to the wave equation
$$\frac{\partial^2\psi}{\partial t^2}=v^2\frac{\partial^2\psi}{\partial z^2}$$
by writing $f(z-vt)$ as $f(y)$ and using the chain rule to differentiate with respect to $t$ and $z$.
End of Question.
The following is a word for word copy of the solution. I have marked $\color{red}{\mathrm{red}}$ the parts of the solution for which I do not understand and the parts marked with $\color{#180}{\text{green underbraces}}$ are not part of the solution and represent where I think the author has made mistakes:
Start of Solution:
The wave equation is $$\frac{\partial^2\psi}{\partial t^2}-v^2\frac{\partial^2\psi}{\partial z^2}=0$$ Writing $$f^{\prime}(y)=\frac{{\rm d}f(y)}{{\rm d}y}$$ and $$f^{\prime\prime}(y)=\frac{{\rm d}^2f(y)}{{\rm d}y^2}$$ then writing $y=z-vt$, $$\frac{\partial f(y)}{\partial z}=f^{\prime}(y)\underbrace{\color{red}{\frac{{\rm d}y}{{\rm d}z}}}_{\color{#180}{\Large\frac{\partial y}{\partial z}}}=f^{\prime}(y)\tag{A}$$ and $$\frac{\partial^2 f(y)}{\partial z^2}=\frac{{\rm d}f^{\prime}(y)}{{\rm d}y} \underbrace{\color{red}{\frac{{\rm d}y}{{\rm d}z}}}_{\color{#180}{\Large\frac{\partial y}{\partial z}}}=f^{\prime\prime}(y)$$ Similarly, $$\frac{\partial f}{\partial t}=f^{\prime}(y)\underbrace{\color{red}{\frac{{\rm d}y}{{\rm d}t}}}_{\color{#180}{\Large\frac{\partial y}{\partial t}}}=-vf^{\prime}(y)$$ and $$\frac{\partial^2 f(y)}{\partial z^2}=\frac{{\rm d}\left(-v f^{\prime}(y)\right)}{{\rm d}y}\underbrace{\color{red}{\frac{{\rm d}y}{{\rm d} z}}}_{\color{#180}{\Large\frac{\partial y}{\partial z}}}=v^2f^{\prime\prime}(y)$$ Substituting into the LHS of the wave equation gives $$\frac{\partial^2 f(z-vt)}{\partial z^2}-\frac{1}{v^2}\frac{\partial^2 f(z-vt)}{\partial t^2}=f^{\prime\prime}(z-vt)-\frac{1}{v^2}\left(v^2f^{\prime\prime}(z-vt)\right)=0$$
End of Solution.
I have three questions regarding the solution above:
- Are the parts marked in $\color{#180}{\text{green underbraces}}$ correct? I think they should be partial derivatives as $y$ is a function of two variables ($z$ and $t$) since $y=z-vt$.
- Iff the $\color{red}{{\rm red}}$ text turns out to be correct then from $({\rm A})$ $$\frac{\partial f(y)}{\partial z}=\frac{{\rm d}f(y)}{{\rm d}y}\times \frac{{\rm d}y}{{\rm d}z}$$ How can this possibly be true? Since we have a partial derivative on the LHS and two ordinary derivatives on the RHS. I didn't know that you could 'mix' up derivatives like that. If this is indeed true could someone please explain it to me?
- Iff the $\color{#180}{\text{green underbraces}}$ turn out to be correct then from $({\rm A})$ $$\frac{\partial f(y)}{\partial z}=\frac{{\rm d}f(y)}{{\rm d} y} \times \frac{\partial y}{\partial z}$$ But this means that the LHS is partial while the RHS is a mixture. Either way round, I don't understand why the partial derivatives can be mixed with ordinary derivatives.
Is anyone able to explain why you can mix partial and ordinary derivatives in the chain rule?
Feel free to answer using examples if it's easier to explain that way.