How is the Chain and Product rule applied to work out the second derivative $\frac{d^2u}{dx^2}=\frac{d}{dx}(2x\frac{du}{d\psi}+\frac{du}{d\eta})$? I'm trying to work out a solution to a partial differential equation and in the step where I wan't to reduce the equation to its cannonical I encounter a problem when wanting to introduce new variable. I need to work out the first and the second derivative of a characteristic equation and I get stuck on the following problem.
How is the Chain and Product rule applied to work out the second derivative $\frac{d^2u}{dx^2}$$=\frac{d}{dx}(2x\frac{du}{d\psi}+\frac{du}{d\eta})$ ? Where $\psi = x^2 + y^2$ and $\eta = x$.
I was able to work out the first derivative of $\psi = x^2 + y^2$ and $\eta = x$.
$$\frac{du}{dx} = \frac{du}{d\psi} \times \frac{d \psi}{dx} + \frac{du}{d\eta} \times \frac{d \eta}{dx}$$
$$=2x \times \frac{du}{d\psi}+\frac{du}{d\eta}$$
However trying to work out the second derivative I can't understand how.
From my worksheet I know that to work this out we need to use both chain rule and product rule as my teacher had demonstated, however I'm having difficulty in applying these. I know that the result is the following,
$$\frac{d^2u}{dx^2}=\frac{d}{dx}(2x\frac{du}{d\psi}+\frac{du}{d\eta})$$
$$=2\frac{du}{d\psi}+2x\frac{d}{dx}(\frac{du}{d\psi})+\frac{d}{dx}(\frac{du}{d\eta})$$ Here I already don't understand what happened, where did  the 2 come from, how is the chain rule applied I don't see the relationship. I undestand that $2x$ was differentiated, but it stayed together with $\frac{du}{d\psi}$. Further on we get,
$$=2\frac{du}{d\psi}+2x(\frac{d^2u}{d\psi^2} \times \frac{d\psi}{dx}+\frac{d^2u}{d\psi d\eta} \times \frac{d \eta}{dx}$$
$$=2\frac{du}{d\psi}+2x(2x \times \frac{d^2u}{d\psi^2}+\frac{d^2u}{d\psi d \eta}$$
$$=2\frac{du}{d\psi}+4x^2\frac{d^2u}{d\psi^2}+2x\frac{d^2u}{d\psi \eta}$$
 A: You have $u(\psi, \eta)$, where $\eta = x$ and $\psi(x,y) = x^2 + y^2$.
So $\partial \psi /\partial x = 2x. $. and $\partial \eta / \partial x = d\eta /dx  = 1.$  You plug those into your first line and get the second line.
Do you understand the third line?  It is writing out that you are taking the derivative with respect to $x$ of both sides of your second line.  Given that,
$ 2x \cdot \partial u/\partial \psi$ is a product and needs the product rule, yielding two terms.  You need to take the derivative of $2x$ which is $2$, and you need to take the derivative of $\partial u/\partial \psi$, and put them together with $(AB)' = A'B + AB'$.  Meanwhile the last term is straightforward, I hope.  So that takes us through the fourth line.
In the fifth line it looks like the chain rule is being applied symbolically to $\partial u/\partial \psi$, giving two partials multiplied + two more partials multiplied, and the whole shebang is to be differentiated, so you have product rules again.
I hope that cleared some of it up.
