# Multivariable Chain-Rule in Wave-Energy Equations

I was solving some exercises on energy transportation on waves and found myself in trouble. The question was "Determine the average energy density in the wave, $\left\langle \frac{dE}{dx} \right\rangle$, in Joules per meter up to two decimal places". Earlier it had given the informations that we were dealing with a sinusoidal wave on a string, also giving the values of the wave velocity ($v = 20$ m/s), the linear density of the string in which the wave was propagating ($\mu = 0.20$ kg/m), the wave's amplitude ($A = 0.10$ m) and it's frequency ($\nu = 5.0$ Hz). After some calcuation, I found that the wavelenght is $\lambda = 4.0$ m and that the tension force applied to the string is $F_T = 80$ N. I solved the question like this:

$$\frac{dK}{dx} = \frac{1}{2} \mu \left( \frac{\partial y}{\partial t} \right)^2 \qquad \frac{dU}{dx} = \frac{1}{2} F_T \left( \frac{\partial y}{\partial x} \right)^2$$

$$\frac{dE}{dx} = \frac{1}{2} \mu \left( \frac{\partial y}{\partial t} \right)^2 + \frac{1}{2} F_T \left( \frac{\partial y}{\partial x} \right)^2$$

$$\frac{dE}{dx} = \frac{1}{2} \mu \left( \frac{\partial y}{\partial x} \right)^2 \cdot \left( \frac{dx}{dt} \right)^2+ \frac{1}{2} F_T \left( \frac{\partial y}{\partial x} \right)^2$$

$$\frac{dE}{dx} = \frac{1}{2} \mu \left( \frac{\partial y}{\partial x} \right)^2 \cdot v^2+ \frac{1}{2} F_T \left( \frac{\partial y}{\partial x} \right)^2$$

$$F_T = \mu \cdot v^2$$

$$\frac{dE}{dx} = F_T \left( \frac{\partial y}{\partial x} \right)^2$$

$$y(x,t) = A \cos (\phi) \qquad \phi = kx - \omega t + \delta$$

$$\frac{\partial y}{\partial x} = - A k \sin (\phi)$$

$$\frac{dE}{dx} = F_T \cdot A^2 k^2 \sin^2 (\phi)$$

$$\left\langle \frac{dE}{dx} \right\rangle= F_T \cdot A^2 k^2 \left\langle \sin^2 (\phi) \right\rangle$$

$$\left\langle \frac{dE}{dx} \right\rangle = \frac{1}{2} F_T \cdot A^2 k^2$$

Then I simply considered that $k = \frac{2 \pi}{\lambda}$ and replaced the variables with the values the problem had already given me or I found out. The answer I got was $\left\langle \frac{dE}{dx} \right\rangle \approx 0.99$ J/m, which agrred with the official answer. However, I'm bothered with the step in which I had made $\frac{\partial y}{\partial t} = \frac{\partial y}{\partial x} \cdot \frac{d x}{d t}$. Is this chain rule correct or did I just got lucky? If it is indeed correct, was I correct in interpreting $\frac{d x}{d t}$ as the same thing as $v$? The argument I used to convince myself of it was considering a level curve $L$ of $y(x,t)$ so that $y(x,t) = y_0, \forall (x,t) \in L$. Then one may isolate $x$ in terms of $t$, take the derivative and see that $\frac{d x}{d t} = v$. Is this argument valid in the situation presented in this exercise?

It is possible to analyze the situation in a discrete way. Assume a given point in the string in moving on the $Oy$ axis with velocity $u$ and on the $Ox$ axis with velocity $v$. The ratio between a displacement in the $Oy$ axis $\Delta y$ and a displacement in the $Ox$ axis $\Delta x$ is the same as the ratio between $u$ and $v$ (you can just divide by the time interval in both the numerator and the denominator). Therefore, we have
$$\frac{\Delta y}{\Delta x} = \frac{u}{v}$$ $$\frac{\Delta y}{\Delta x} = \frac{\left( \frac{\Delta y}{\Delta t} \right)}{\left( \frac{\Delta x}{\Delta t} \right)}$$ $$\frac{\Delta y}{\Delta t} = \frac{\Delta y}{\Delta x} \cdot \frac{\Delta x}{\Delta t}$$
Taking the limit as $t \to 0$, we may write: $$\frac{\partial y}{\partial t} = \frac{\partial y}{\partial x} \cdot \frac{d x}{d t}$$