# Proof of ||∇h||^2 when h=fog

1. Oct 2, 2014

### infinitylord

1. The problem statement, all variables and given/known data
Let f:R2−>R be a differentiable function at any point, and g be the function g:R3−>R2defined by:

g(u,v,w)=(g1,g2)=(u2+v2+w2,u+v+w)

consider the function h=fog and prove that

||∇h||^2 = 4(∂f/∂x)^2*g1 + 4(∂f/∂x)(∂f/∂y)*g2 + 3(∂f/∂y)^2.

3. The attempt at a solution

H=fog=f(g1,g2)

∇h=∇(fog)=<∇f(g1,g2),∇g(u,v,w)> (dot product)

∇g(u,v,w)=(2u+2v+2w, 3)

∇f(x,y)=(∂f/∂x)+(∂f/∂y) evaluated at g1 and g2 respectively.

<∇f(g1,g2),∇g(u,v,w)>=(∂f/∂x)∇g1+(∂f/∂y)∇g2=∇h

I stopped here because looking ahead, I can see that I will ultimately be wrong here. I can see that (∂f/∂x)^2 + (∂f/∂x)(∂f/∂y) + (∂f/∂y)^2 will come from squaring my answer for ∇h., the 3 in front of (∂f/∂y)^2 is the same as ∇g2, and the 4 in front of (∂f/∂x)^2 may come from factoring out the 2 from ∇g2 and then squaring it. Any help? I would just like to know where in my process I went wrong and what I should be doing for the following step. Thank you!

2. Oct 3, 2014

### BvU

Could you proofread your post and place superscripts in the right places ? Good start!

Then write a dot product where you mean a divergence and nothing where you mean a gradient.

Perhaps viewing a few TeX examples here can get you a lot more help, a lot faster too!
Example: $\nabla \cdot f$ is made with $\#\#$ \nabla \cdot f $\#\#$

Last edited: Oct 3, 2014
3. Oct 3, 2014

### Orodruin

Staff Emeritus
Well, to start with, the gradient of $f\circ g$ should be a vector. For each individual gradient $\nabla f$ and $\nabla g$, the gradient should have more indices than the original function, i.e., $\nabla f$ should be a vector (2D) and $\nabla g$ should be a 3x2 matrix. In your attempt, the gradient of f seems to be a scalar and that of g seems to be a 1x2 matrix. How can you remedy this?

4. Oct 3, 2014

### infinitylord

Thank you! I actually immediately figured it out when you mentioned the matrices.

5. Oct 3, 2014

6. Oct 3, 2014

### infinitylord

Honestly because I believe I got the answer and I had to turn in the homework the following morning. I've been extremely busy with homework and preparing for my first college midterms.

7. Oct 3, 2014

### LCKurtz

Well, it wouldn't have hurt to post a quick "Thanks, I've got it now" or something similar to give the thread closure. It is frustrating to helpers to spend time in a thread only to have the OP never return. Some of us will quit responding to users that do that repeatedly.