# Trouble taking 2nd deriv of multi variable

1. Apr 27, 2013

### mrcleanhands

1. The problem statement, all variables and given/known data

Use * to show -->

2. Relevant equations

3. The attempt at a solution

So I've begun by trying to take the 2nd derivative of $\frac{\partial z}{\partial r}=\cos\theta\frac{\partial z}{\partial x}+\sin\theta\frac{\partial z}{\partial y}$

Which gives me this: $\frac{\partial^{2}z}{\partial r^{2}}=-\sin\theta\frac{\partial z}{\partial x}+\cos\theta\frac{\partial^{2}z}{\partial x^{2}}+\cos\theta\frac{\partial z}{\partial y}+\sin\theta\frac{\partial^{2}z}{\partial y^{2}}$

I've tried playing around a little but can't seem to get it in the form shown. I can see the form is something like (a+b)^2 but can't mimic this...

Have I done something wrong?

#### Attached Files:

• ###### showthatforreal.jpg
File size:
13.3 KB
Views:
122
2. Apr 27, 2013

### tiny-tim

hi mrcleanhands!
??

you seem to be using the product rule instead of the chain rule

3. Apr 27, 2013

### Ray Vickson

Sometimes the surest, most trouble-free (but *not shortest*) way is to do it directly: let
$$F(p,q) = z((r+p) \cos(\theta +q),(r+p) \sin(\theta + q)),$$
where z(x,y) is assumed smooth enough. Now just find the Taylor expansion of F(p,q) to terms of up to second order in (p,q). The coefficient of p^2 will be $(1/2) \partial^2 z/ \partial r^2$, etc.

4. Apr 27, 2013

### mrcleanhands

Were not supposed to do it using a Taylor expansion. Last time I used polar co-ordinates to find a limit where no method was specified and lost marks. Besides, I forgot Taylor expansions.

Hey Tim. So I can't apply product rule to find second derivatives of that? If that was an equation without differentials in it I would be using product rule to take second derivatives. I don't see how I would use chain rule here. I thought maybe I could substitute what I found for $\frac {\partial z}{\partial x}$ and $\frac {\partial z}{\partial y}$ but I keep going around in circles and not getting anywhere :(

5. Apr 28, 2013

### tiny-tim

hi mrcleanhands!

(just got up :zzz:)
never mind ∂z/∂x and ∂z/∂y

what is ∂/∂r in terms of ∂/∂x and ∂/∂y ?

6. Apr 28, 2013

### mrcleanhands

Ok, I see what I did. I was trying to take a derivative of a constant....

$\frac{\partial z}{\partial r}(\frac{\partial z}{\partial r})=(\cos\theta\frac{\partial z}{\partial x}+\sin\theta\frac{\partial z}{\partial y})(\cos\theta\frac{\partial z}{\partial x}+\sin\theta\frac{\partial z}{\partial y})$

and I just got it :D On my way to finishing this question.

Thanks again....

Last edited: Apr 28, 2013
7. May 1, 2013

### mrcleanhands

I did this and it's wrong. I've just taken the product, not the 2nd derivative (which I still haven't figured out) but for some reason my answer was correct.

8. May 1, 2013

### mrcleanhands

I'm confusing myself more now.
with z=f(x,y), x=rcosθ and y=rsinθ

$\frac{\partial z}{\partial r}=\frac{\partial z}{\partial x}\frac{\partial x}{\partial r}+\frac{\partial z}{\partial y}\frac{\partial y}{\partial r}$ means $\frac{\partial z}{\partial r}=\frac{\partial z}{\partial r}+\frac{\partial z}{\partial r}=2\frac{\partial z}{\partial r}$
which doesn't make any sense

9. May 1, 2013

### Staff: Mentor

Stop here - you're done with this partial.
No, it doesn't mean that. You can't cancel as you did, since these aren't fractions.

10. May 1, 2013

### tiny-tim

nooo, it's $\frac{\partial}{\partial r}(\frac{\partial z}{\partial r})=(\cos\theta\frac{\partial}{\partial x}+\sin\theta\frac{\partial}{\partial y})(\cos\theta\frac{\partial z}{\partial x}+\sin\theta\frac{\partial z}{\partial y})$

(what you wrote is correct, but it's just a product

what i've written is a derivative )​

anyway, show us how you expand this

11. May 1, 2013

### mrcleanhands

I will look this up again.

I just stumbled on that answer by chance because I was actually doing a product for some reason.

Now I get this:
$\frac{\partial^{2}z}{\partial r^{2}}=\frac{\partial}{\partial r}(\cos\theta\frac{\partial z}{\partial x})+\frac{\partial}{\partial r}(\sin\theta\frac{\partial z}{\partial y})$

θ is independent from r so the change in cosθ for a change in r is 0...

but I don't know what happens when it's $\frac{\partial}{\partial r}(\cos\theta\frac{\partial z}{\partial x})$
Or even $\frac{\partial}{\partial r}(\frac{\partial z}{\partial x})$

This is a change in r for a change in z with respect to x.

12. May 1, 2013

### tiny-tim

i'll say it again …

it's $(\cos\theta\frac{\partial}{\partial x}+\sin\theta\frac{\partial}{\partial y})(\cos\theta\frac{\partial z}{\partial x}+\sin\theta\frac{\partial z}{\partial y})$

expand this

13. May 1, 2013

### mrcleanhands

I know that when expanded that becomes $\frac{\partial^{2}z}{\partial r^{2}}=\cos^{2}\theta\frac{\partial^{2}z}{\partial x^{2}}+2\sin\theta\cos\theta\frac{\partial^{2}z}{\partial x\partial y}+\sin^{2}\theta\frac{\partial^{2}z}{\partial y^{2}}$ (the answer) but I don't get how we go from $\frac{\partial^{2}z}{\partial r^{2}}=\frac{\partial}{\partial r}(\cos\theta\frac{\partial z}{\partial x})+\frac{\partial}{\partial r}(\sin\theta\frac{\partial z}{\partial y})$ to that.

When I originally "got" that and thought I proved i,t I actually just multiplied the derivative by itself.

14. May 1, 2013

### cepheid

Staff Emeritus
You should think of ∂/∂r[] as an "operator": something that operates (acts on) a function. When you stick the function f(r,θ) (or f(x,y) equivalently) into this operator (i.e. into the square brackets), the operator differentiates that function w.r.t. r. So, in this problem, what you're being told is that the operator ∂/∂r[] can be expressed in Cartesian coordinates as:$$\frac{\partial}{\partial r}\left[~\right] \equiv \cos\theta \frac{\partial}{\partial x}\left[~\right] + \sin\theta \frac{\partial}{\partial y}\left[~\right]$$

So, in the equation quoted above, everywhere we see ∂/∂r, we can replace it with the equivalent differential operator expressed in Cartesian coords:$$\frac{\partial^{2}z}{\partial r^{2}}=\frac{\partial}{\partial r}\left[\cos\theta\frac{\partial z}{\partial x}\right]+\frac{\partial}{\partial r}\left[\sin\theta\frac{\partial z}{\partial y}\right]$$ $$= \cos\theta \frac{\partial}{\partial x}\left[\cos\theta\frac{\partial z}{\partial x}\right] + \sin\theta \frac{\partial}{\partial y}\left[\cos\theta\frac{\partial z}{\partial x}\right]+ \cos\theta \frac{\partial}{\partial x}\left[\sin\theta\frac{\partial z}{\partial y}\right] + \sin\theta \frac{\partial}{\partial y}\left[\sin\theta\frac{\partial z}{\partial y}\right]$$

Can you take it from here?

15. May 1, 2013

### mrcleanhands

But this was actually derived when finding dz/dr (z w.r.t to r)... How else would you come up with this operator? How then do I know I can remove the z and plug anything else in?

I have the same problem with $\cos\theta\frac{\partial}{\partial r}\left[\frac{\partial z}{\partial x}\right].$How do I interpret/do $\frac{\partial}{\partial r}\left[\frac{\partial z}{\partial x}\right]$

16. May 1, 2013

### mrcleanhands

Ok, I got it. I found some material on this online. I just didn't have enough prereq knowledge to understand.

17. May 1, 2013

### mrcleanhands

Now I'm getting this

For $\frac{\partial}{\partial r}(\frac{\partial z}{\partial x})$:

$\frac{\partial}{\partial r}(\frac{\partial z}{\partial x})=\cos\theta\frac{\partial}{\partial x}(\frac{\partial z}{\partial x})+\sin\theta\frac{\partial}{\partial y}(\frac{\partial z}{\partial x})$
$\frac{\partial}{\partial r}(\frac{\partial z}{\partial x})=\cos\theta\frac{\partial^{2}z}{\partial x^{2}}+\sin\theta(\frac{\partial^{2}z}{\partial xy})$

For $\frac{\partial}{\partial r}(\frac{\partial z}{\partial y})$
$\frac{\partial}{\partial r}(\frac{\partial z}{\partial y})=\cos\theta\frac{\partial^{2}z}{\partial xy}+\sin\theta\frac{\partial^{2}z}{\partial y^{2}}$

Now substitute these into the original mess of $\frac{\partial^{2}z}{\partial r^{2}}$ :

$\frac{\partial^{2}z}{\partial r^{2}}=-\sin\theta\frac{\partial z}{\partial x}+\cos\theta\frac{\partial}{\partial r}(\frac{\partial z}{\partial x})+\cos\theta\frac{\partial z}{\partial y}+\sin\theta\frac{\partial}{\partial r}(\frac{\partial z}{\partial y})$
$\frac{\partial^{2}z}{\partial r^{2}}=-\sin\theta\frac{\partial z}{\partial x}+\cos\theta(\cos\theta\frac{\partial^{2}z}{\partial x^{2}}+\sin\theta(\frac{\partial^{2}z}{\partial xy}))+\cos\theta\frac{\partial z}{\partial y}+\sin\theta(\cos\theta\frac{\partial^{2}z}{\partial xy}+\sin\theta\frac{\partial^{2}z}{\partial y^{2}})$...
$\frac{\partial^{2}z}{\partial r^{2}}=-\sin\theta\frac{\partial z}{\partial x}+\cos^{2}\theta\frac{\partial^{2}z}{\partial x^{2}}+2\sin\theta\cos\theta(\frac{\partial^{2}z}{\partial xy}))+\cos\theta\frac{\partial z}{\partial y}+\sin^{2}\theta\frac{\partial^{2}z}{\partial y^{2}}$

which is wrong

18. May 2, 2013

### tiny-tim

i don't understand why you're doing all this

2z/∂r2

= ∂/∂r(∂z/∂r)

= $(\cos\theta\frac{\partial}{\partial x}+\sin\theta\frac{\partial}{\partial y})\left((\cos\theta\frac{\partial}{\partial x}+\sin\theta\frac{\partial}{\partial y})(z)\right)$

19. May 5, 2013

### mrcleanhands

I know what I did wrong and I finally understand the question. I was taking the second derivative of dz/dr and used the product rule but r is independent of $\theta$ so when I treat $\theta$ as a constant I get the same answer as you.

Thanks again for helping me out guys! much appreciated.