# This should be an easy partial derivative

1. Feb 16, 2009

### redstone

1. The problem statement, all variables and given/known data
2. Relevant equations
This should be easy, I don't know what I've done wrong...

polar coordinates
$$x=r cos(\theta)$$
$$y=r sin(\theta)$$
$$r^2=x^2+y^2$$

3. The attempt at a solution
so with $$x=r cos(\theta)$$
$$\partial{x}/\partial{r}=cos(\theta)$$
$$\partial{x}/\partial{r}=x/r$$
thus the inverse
$$\partial{r}/\partial{x}=r/x$$

similarly with $$r=x/cos(\theta)$$
partial of r wrt x
I get
$$\partial{r}/\partial{x}=1/cos(\theta)$$
$$\partial{r}/\partial{x} = r/x$$

now doing same thing on the r^2 equation
partial of r wrt x
$$2r\partial{r}/\partial{x}=2x$$
$$\partial{r}/\partial{x}=x/r$$

what the heck? why am I getting two different (and inverse) answers from these two related equations?

Last edited: Feb 16, 2009
2. Feb 16, 2009

### tiny-tim

Welcome to PF!

Hi redstone ! Welcome to PF!

(have a theta: θ and a curly d: ∂ )
Both are correct!

∂r/∂x means the change in r if you change x, keeping all the other variables constant.

If you define r = x/cosθ, then the other variable is θ …

draw a diagram, and you find that if θ is fixed, then increasing x by dx does increase r by r/x dx …

but if you keep y fixed, increasing x by dx increases r by x/r dx

3. Feb 16, 2009

### redstone

Ha! That's been frustrating me for two days and I was right the whole time!
Thanks!

As a related question, is it absurd to write the derivative with partials like this:
r = x/cosθ
∂r = ∂x/cosθ - xsinθ ∂θ ?

(I'm trying to transform coordinates of the strain tensor from Cartesian to polar, and trying to remember the math I need... so if you happen to know an online source that has the transform all worked out, I'd be interested in checking my math to it when I'm done)

Thanks again for the help!

4. Feb 16, 2009

### tiny-tim

Hi redstone!

You'd write it with d rather than ∂:

dr = dx/cosθ - xsinθ/cos2θ dθ

But whyever would you want to express as a function of x and θ?

5. Feb 16, 2009

### redstone

oops, silly math mistake on my part there...

But my mistake aside, I don't really want to express it like that, just wanted to check the proper use of partials, and whether it was OK to write that expression with a partial. I guess not, you need to use the full derivative.

Thanks a lot for your help.