Calculating $u_t$, $u_x$, and $u_{xx}$ for $u(x, t) = -2 \frac{\partial}{\partial{x}}\log(\phi(x,t))$

chain rulemultivariable-calculuspartial derivativepartial differential equationsreal-analysis

I am trying to calculate $u_t$, $u_x$, and $u_{xx}$ for $u(x, t) = -2 \dfrac{\partial}{\partial{x}}\log(\phi(x,t))$.

I've been trying for hours, but I've become so confused with the chain rule here that I don't know what to do.

Can someone please demonstrate how to correctly calculate these? Please show your calculations so that I can learn how I'm supposed to be applying the chain rule.

EDIT:

Thank you for all posting great answers. Here is my attempt without using simplification

$$u(x,t) = -2\overbrace{\frac{\partial\phi(x,t)}{\partial x}}^{\;\;\text{derivative of}\\\text{argument of }\log}\underbrace{\frac{1}{\phi(x,t)}}_{\text{derivative of }\log(x)\\ \text{with argument }\phi(x,t)}$$

at the beginning.

$$u_x = -2 \left[ \frac{\partial}{\partial x} \left( \frac{\partial}{\partial x} (\log(\phi(x, t)) \right) \right] $$

$$= -2 \left[ \frac{\partial}{\partial{(\log(\phi))}} \left( \frac{\partial}{\partial x} (\log(\phi(x, t)) \right) \right] \times \left[ \frac{\partial}{\partial{(\phi)}} (\log(\phi(x, t)) \right] \times \frac{\partial{\phi}}{\partial{x}}$$

(By the chain rule.)

$$= -2 \left[ \frac{\partial}{\partial{x}} \left[ \left( \frac{1}{\phi} \right) \frac{\partial{\phi}}{\partial{x}} \right] \times \frac{1}{\phi} \times \frac{\partial{\phi}}{\partial{x}} \right]$$

$$= -2 \left[ \frac{\partial}{\partial{x}} \left[ \left( \frac{1}{\phi} \right) \frac{\partial{\phi}}{\partial{x}} \right] \times \frac{1}{\phi} \times \frac{\partial{\phi}}{\partial{x}} \right]$$

$$= -2 \left[ \left( -\phi^{-2}(x, t) \times \frac{\partial{\phi}}{\partial{x}} + \frac{\partial^2{\phi}}{\partial{x}^2} \times \frac{1}{\phi} \right) \times \frac{1}{\phi} \times \frac{\partial{\phi}}{\partial{x}} \right]$$

Feedback on this attempt is appreciated.

Best Answer

You could do all the calculations without evaluating the first derivative in the function, but we'll do it anyway $$u(x,t) = -2\overbrace{\frac{\partial\phi(x,t)}{\partial x}}^{\;\;\text{derivative of}\\\text{argument of }\log}\underbrace{\frac{1}{\phi(x,t)}}_{\text{derivative of }\log(x)\\ \text{with argument }\phi(x,t)}$$ Now you can see that the function $u(x,t)$ is the product of two functions! We can evaluate the other derivatives using the derivative of the product of functions, mainly $$u_x(x,t) = \frac{\partial}{\partial x}\left(-2\frac{\partial\phi(x,t)}{\partial x}\frac{1}{\phi(x,t)}\right) = \underbrace{-2\frac{\partial^2\phi}{\partial x^2}\frac{1}{\phi}}_{D[1^{\text{st}}]\times2^{\text{nd}}}+\underbrace{2\frac{\partial \phi}{\partial x}\frac{\partial\phi}{\partial x}\frac{1}{\phi^2}}_{D[2^{\text{nd}}]\times1^{\text{st}}}=2\left(\frac{1}{\phi}\frac{\partial \phi}{\partial x}\right)^2 -2\frac{\partial^2\phi}{\partial x^2}\frac{1}{\phi}\\ u_t(x,t) =-2\frac{\partial^2 \phi}{\partial x \partial t}\frac{1}{\phi}+2\frac{\partial \phi}{\partial x}\frac{\partial \phi}{\partial t}\frac{1}{\phi^2}\\ u_{xx}(x,t) = \frac{\partial}{\partial x}\left(\color{red}{2\left(\frac{1}{\phi}\frac{\partial \phi}{\partial x}\right)^2} \color{blue}{-2\frac{\partial^2\phi}{\partial x^2}\frac{1}{\phi}}\right) = \\=\color{red}{-4\left(\frac{1}{\phi}\frac{\partial \phi}{\partial x}\right)\left(\frac{1}{\phi^2}\frac{\partial\phi}{\partial x}+\frac{1}{\phi}\frac{\partial^2\phi}{\partial x^2}\right)}\color{blue}{-2\left(\frac{1}{\phi}\frac{\partial^3\phi}{\partial x^3}-\frac{1}{\phi^2}\frac{\partial \phi}{\partial x}\frac{\partial^2\phi}{\partial x^2}\right)}$$ all done by using the chain rule. I used coloring to simplify the visualization of the derivatives