# Product rule of a trig function

1. Nov 18, 2015

### DiracPool

I'm trying to understand how the derivative of this function:

x=ρcosθ

Becomes this:

dx=−ρsinθdθ+cosθdρ

First off I'm guessing that x is a function of both ρ AND cosθ, or else we wouldn't be using the product rule in the first place..Am I correct? So how could we write this in functional notation? Like so?

x(ρ,cosθ)= ρcosθ

Then might the next step of taking the derivative of x with respect to ρ and cosθ look like this?

dx/(dρ dθ) = −ρsinθ+cosθ

Moving the denominator on the left side to the right could yield the answer:

dx=−ρsinθdθ+cosθdρ

But how do we know to put the dθ next to the sin term and the dρ next to the cos term? Perhaps I'm working this out wrong?

To put it another way, if we took the derivative of the function x=ρcosθ with respect to each of the variables separately, we'd get

dx/dρ = cosθ and dx/dθ = -ρsin(θ)

But I guess I'm missing how we combine these separate operations to get the equation:

dx=−ρsinθdθ+cosθdρ

Perhaps we are not even using the product rule here?

2. Nov 18, 2015

### BvU

$\rho$ and $\theta$ are two orthogonal directions in a coordinate transform in the plane: from (x,y) to $(\rho, \ \theta)$: when $\rho$ varies, x varies too. And when $\theta$ varies, x varies too. $\rho$ and $\theta$ are independent and orthogonal, so in first order you can add the variations, hence the + sign. And in the differential limit this last expression holds exactly.

welcome to the world of differentials !

3. Nov 18, 2015

### DiracPool

So does this mean that we are taking the derivative of the function separately with respect to ρ and θ and then are simply combining the two expressions with the + sign, and are not using the product rule at all?

4. Nov 18, 2015

### BvU

In a way we are, and we use the chain rule too, but it's rather trivial: $\ {d\over d\rho}(\rho\cos\theta) ={d\rho\over d\rho}\cos\theta + {d\cos\theta \over d\rho}\rho = \cos\theta + \rho\sin\theta{d\theta \over d\rho} = \cos\theta$ .

The term with ${d\theta \over d\rho}$ (which is zero), is zero here, but it comes into play when the new coordinates are not orthogonal.

5. Nov 18, 2015

### Chandra Prayaga

What you have written is not the derivative, but the differential of a function of two variables. Irrespective of whether it is a coordinate transformation or not, x here is a function of the two variables ρ and θ, not cosθ: x(ρ, θ) = ρ cosθ. The differential is then:

dx = (∂x/∂ρ) dρ + (∂x/∂θ) dθ = cosθ dρ - ρ sinθ dθ

6. Nov 18, 2015

### WWGD

I think the product rule you are referring to is the one used for functions of a single variable.

7. Nov 19, 2015

### BvU

Dirac seen the light yet ?

8. Nov 19, 2015

### Chandra Prayaga

The symbols that I wrote, (∂x/∂ρ) and (∂x/∂θ) are called partial derivatives. You will need to check from your calculus textbook, what they are, how they are defined and calculated. We did not use the product rule here, but there is still a product rule in partial derivatives. We just did not have to use it here.

9. Nov 20, 2015

### DiracPool

Yes Lawd, I have seen the light!

Ok, I see, no product rule. You'd use the product rule only if you had, say, two terms multiplied by each other that were both the function of the same variable being differentiated. Here we have two separate variables. So is the idea here is that we are using partial derivatives because ∂x/∂ρ and ∂x/∂θ refer to dimensions in space? Is the operation to add these together as in this equation a property of partial derivatives in and of themselves, or some sort of "linear combination" process?

10. Nov 20, 2015

### BvU

x and y are functions of two variables. That is why we use partial derivatives. It's a very general thing, not limited to dimensions in space. The operation to add these together is indeed a "sort of vector addition". Make a few sketches and things may become a little clearer. Or follow Chandra's good advice in post #5: read up on calculus. Lots of threads that point you to good books (or free pdf) in the subforum