Exam question, complicated chain rule I have this old exam question that I don't understand.
Calculate $\frac{d}{dt}ln(x^2+y^2)$ where $x=e^t+e^{-t}$ and $y=e^t-e^{-t}$. Write the answer in x and y's. 
The solution given does the following:
$$\frac{dx}{dt}=e^t-e^{-t}=y$$
$$\frac{dy}{dt}=e^t+e^{-t}=x$$
then use the chain rule to:
$$\frac{d}{dt}ln(x^2+y^2)=\frac{\partial}{\partial x}ln(x^2+y^2)\frac{dx}{dt}+\frac{\partial}{\partial y}ln(x^2+y^2)\frac{dy}{dt}=$$
$$=\frac{1}{x^2+y^2}*2x*y+\frac{1}{x^2+y^2}*2y*x=\frac{4xy}{x^2+y^2}$$
Question:
How does the teacher do that chain rule step? I would really need a step by step explanation how it's made. I guess I don't understand how dt relates to dx and dy.
Thank you.
EDIT: Updated with last $\frac{dy}{dt}$term that the teacher had left out of the solution sheet.
 A: I think you are having trouble with the concept of a total derivative of a function of several variables. Consider $f=f(x,y)$ where $x=x(t)$ and $y=y(t)$. Then $${d\over dt}f(x,y)={\partial f\over \partial x}\cdot {dx\over dt}+{\partial f\over \partial y}\cdot {dy\over dt}.$$
Here, $f(x,y)=\ln(x^2+y^2)$ with $x=e^t-e^{-t}$ and $y=e^t+e^{-t}$. Thus, 
\begin{align}
{d\over dt}(\ln(x^2+y^2))
&={\partial f\over \partial x}\cdot {dx\over dt}+{\partial f\over \partial y}\cdot {dy\over dt}\\
&={1\over x^2+y^2}\cdot 2x\cdot (e^t+e^{-t})+{1\over x^2+y^2}\cdot 2y\cdot (e^t-e^{-t})\\
&={1\over x^2+y^2}\cdot 2x\cdot y+{1\over x^2+y^2}\cdot 2y\cdot x\\
&={4xy\over x^2+y^2}.
\end{align}
A: (S)He's using the multivariable chain rule that usually written as
$$
\frac{df}{dt} = \frac{\partial f}{\partial x}\frac{d x}{dt} + \frac{\partial f}{\partial y}\frac{d y}{dt}.
$$
Here $f$ is a function of $x$ and $y$, and $x$ and $y$ are both functions of $t$. The terms $\frac{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$ by "ignoring" the fact that $x$ and $y$ are functions of $t$ and computing regular old partial derivatives.
In your case $f(x,y) = \ln(x^2+y^2)$. To compute $\frac{\partial f}{\partial x}$, you treat $y$ as a constant and differentiate with respect to $x$ using the single-variable chain rule
$$
\frac{\partial f}{\partial x} = \frac{\partial}{\partial x}\ln(x^2+y^2) = \frac{2x}{x^2+y^2},
$$
and similarly you compute $\frac{\partial f}{\partial y}$ in the same manner (treating $x$ as fixed and applying the single-variable chain rule for $y$)
$$
\frac{\partial f}{\partial y} = \frac{2y}{x^2+y^2}.
$$
Now onto computing $dx/dt$ and $dy/dt$. Since $x = e^t + e^{-t}$ and $y = e^t - e^{-t}$ are single variable functions of $t$, you compute these just like you would in single variable calculus:
\begin{align*}
\frac{dx}{dt} &= \frac{d}{dt}(e^t + e^{-t}) = e^t - e^{-t} = y\\
\frac{dy}{dt} &= \frac{d}{dt}(e^t - e^{-t}) = e^t + e^{-t} = x.
\end{align*}
Now substitute in the first formula I mentioned above to conclude
$$
\frac{df}{dt} = \left(\frac{2x}{x^2+y^2}\right)y + \left(\frac{2y}{x^2+y^2}\right)x.
$$
