# Confusion with using product rule with partial derivatives and chain rule (multi-variable)

I want to find an expression for $f''(x_1)$ from the equation below. Note that the partial derivative of the first slot and second slot of $u(x_1, f(x_1))$ are denoted $u_1, u_2$. Also, for clarification:$u : \mathbb{R^2 \rightarrow \mathbb{R}}, f : \mathbb{R} \rightarrow \mathbb{R}$ and $x_1 \in \mathbb{R}$

Given:

$\frac{\partial u(x_1, f(x_1))}{\partial x_1} + \frac{\partial u(x_1, f(x_1))}{\partial x_2}f'(x_1) = 0$.

So, what I try to do is totally differentiate the expression to get (where I try to use the product rule on the second expression and the chain rule in both):

$\left[\frac{\partial^2 u(x_1, f(x_1))}{\partial x_1 \partial x_1} + \frac{\partial^2 u(x_1, f(x_1))}{\partial x_1 \partial x_2}f'(x_1)\right] + \left[\frac{\partial u(x_1, f(x_1))}{\partial x_2}f''(x_1) + f'(x_1) \left(\frac{\partial^2 u(x_1, f(x_1))}{\partial x_2 \partial x_1} + \frac{\partial^2 u(x_1, f(x_1))}{\partial x_2 \partial x_2}f'(x_1)\right)\right] = 0$

Writing with shorthand:

$u_{11} + u_{12}f'(x_1) + u_2f''(x_1) + f'(x_1)u_{21} + u_{22}(f'(x_1))^2 = 0$

Solving, and I know $u_2 > 0$:

$f''(x_1) = \frac{-u_{11} - u_{12}f'(x_1)-f'(x_1)u_{21} - u_{22}(f'(x_1))^2}{u_2}$

I am really rusty and uncertain about how I took the derivative, can anyone confirm this is correct or have I completely butchered the operation. I am unsure about my application of total differentiation, multi-variable product rule, and chain rule.

My understanding is if you have $u(x, y)$ the total derivative w.r.t $x$ is $\frac{du(x,y)}{dx} = u_1\frac{dx}{dx} + u_2 \frac{dy}{dx}$.

As long as $u$ and $f$ are real-valued and $x_1\in\mathbb R$, this should be okay (as opposed to, say, vector fields and a vector, respectively).
• Yes, sorry I should have clarified. $u : \mathbb{R^{2}_+ \rightarrow \mathbb{R_+}}, f : \mathbb{R_+} \rightarrow \mathbb{R_+}$ and $x_1 \in \mathbb{R_+}$. – student_t Sep 24 '17 at 18:19