# Gradient transforms under axes rotation

1. Feb 9, 2012

### Karol

1. The problem statement, all variables and given/known data
$f$ is a function of two variables: y, z. I want to show that the gradient:

$$\nabla f=\frac{\partial f}{\partial y}\hat y + \frac{\partial f}{\partial z}\hat z$$
Transforms as a vector under rotation of axes.
2. Relevant equations
The rotation of axes:
$$A \left\{\begin{array}{l}\bar {y} = y \cdot \cos \phi + z \cdot \sin \phi \\ \bar {z} = -y \cdot \sin + z \cdot \cos \end{array}\right.$$
3. The attempt at a solution
I use the chain rule:
$$\frac{\partial f}{\partial \bar {y}}=\frac{\partial f}{\partial y}\frac{\partial y}{\partial \bar {y}}+\frac{\partial f}{\partial z}\frac{\partial z}{\partial \bar {y}}$$
And the similar for $\frac{\partial f}{\partial \bar {z}}$. In order to find $\frac{\partial y}{\partial \bar {y}}$ and $\frac{\partial z}{\partial \bar {z}}$ i solve A for y and z and get:

$$\left\{\begin{matrix} y= \bar {y}\cdot \cos \phi - \bar {z}\cdot \sin \phi \\ z= \bar {y}\cdot \sin \phi +\bar {z}\cdot \cos \phi\end{matrix}\right.$$

Now i get:
$$\left\{\begin{array}{l}\frac{\partial f}{\partial \bar {y}}=\frac{\partial f}{\partial y}(-\sin \phi)+\frac{\partial f}{\partial z}\cos \phi \\ \frac{\partial f}{\partial \bar {z}}=\frac{\partial f}{\partial y}(-\cos \phi)+\frac{\partial f}{\partial z}(-\sin \phi)\end{array}\right.$$
Not as i expected, in the form of A.
It is closer to switching between the axes, but that's all i understand from this result.

2. Feb 9, 2012

### vela

Staff Emeritus
How did you get $\partial y/\partial \bar{y} = -\sin \phi$? That's what your final results imply. Similar questions for the other derivatives.

3. Feb 14, 2012

### Karol

For $\partial y/\partial \bar{y}$ I differentiated the formula i derived earlier:
$$y= \bar {y}\cdot \cos \phi - \bar {z}\cdot \sin \phi$$

4. Feb 14, 2012

### vela

Staff Emeritus
Which doesn't give you $\partial y/\partial \bar{y} = -\sin \phi$. That's why I'm asking where did you get that from.

5. Feb 15, 2012

### Karol

You mean i have a mistake in differentiating $y= \bar {y}\cdot \cos \phi - \bar {z}\cdot \sin \phi$? how come?
The derivative of $\cos$ is $-\sin$, and i ignore the second member $\bar {z}\cdot \sin \phi$ because it doesn't contain $\bar {y}$.
Or you ask how did i get: $y= \bar {y}\cdot \cos \phi - \bar {z}\cdot \sin \phi$?

6. Feb 15, 2012

### HallsofIvy

Staff Emeritus
$-sin(\phi)$ is the derivative of $cos(\phi)$ with respect to $\phi$. You are not differentiating with respect to $\phi$. $\phi$ is a constant.

7. Feb 15, 2012

Thanks!!!