Derivative with respect to a unit vector: is my computation right?

Click For Summary

Homework Help Overview

The discussion revolves around computing a derivative with respect to the components of a unit vector in spherical coordinates. The original poster attempts to express the derivative of a function with respect to one component of the unit vector as a combination of derivatives with respect to the spherical coordinates, specifically theta and phi.

Discussion Character

  • Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants explore the validity of the original poster's approach to expressing the derivative and question the inversion of partial derivatives. There is a discussion about the use of Jacobians in this context.

Discussion Status

Some participants have provided feedback on the original poster's method, suggesting that the inversion of partial derivatives may not be valid in this case. The conversation has prompted further inquiries about the Jacobian and its application to the problem.

Contextual Notes

There is a mention of potential confusion regarding the notation of the unit vector components and the implications of treating them as scalars. The original poster seeks clarification on the mathematical principles involved in their computation.

fairy._.queen
Messages
47
Reaction score
0
Hi all!
I must compute a derivative with respect to the components of a unit vector [itex]\hat{p}^{i}[/itex]. In spherical coordinates,
[itex]\hat{p}^{1}=\hat{p}^{1}(\theta,\phi)=\cos\theta \sin\phi[/itex]

I want to express the derivative [itex]\frac{\partial}{\partial\hat{p}^1}[/itex] as a combination of [itex]\frac{\partial}{\partial\theta}[/itex] and [itex]\frac{\partial}{\partial\phi}[/itex].
What I did is:
[itex]\frac{\partial f}{\partial\hat{p}^1}=\frac{\partial f}{\partial\theta}\frac{\partial\theta}{\partial \hat{p}^1}+\frac{\partial f}{\partial\phi}\frac{\partial\phi}{\partial\hat{p}^1}[/itex]

Since [itex]\frac{\partial\hat{p}^1}{\partial\theta}=-\sin\theta\sin\phi[/itex] and [itex]\frac{\partial\hat{p}^i}{\partial\phi}=\cos\theta \cos\phi[/itex] I thought
[itex]\frac{\partial\theta}{\partial\hat{p}^1}=-\frac{1}{\sin\theta\sin\phi}[/itex] and [itex]\frac{\partial\phi}{\partial\hat{p}^1}=\frac{1}{ \cos\theta\cos\phi}[/itex]

so that the final derivative is
[itex]\frac{\partial f}{\partial\hat{p}^1}=-\frac{1}{\sin\theta\sin\phi}\frac{\partial f}{\partial\theta}+\frac{1}{\cos\theta\cos\phi} \frac{\partial f}{\partial\phi}[/itex]

I would like to know if all this is correct. Thanks in advance!
 
Physics news on Phys.org
Anybody?
 
Your unit vector looks like a scalar with magnitude that isn't 1. It could be I am not familiar with the notation.

But what I spotted was the inverting of a partial derivative. In functions of one variable, it is valid to invert dy/dx to get dx/dy but this is not generally true of partial differentials. Lookup Jacobians to find out how to do it.
 
Thanks for replying!

[itex]\hat{p}^1[/itex] is the first component of a unit vector, the other two are
[itex]\hat{p}^2=\sin\theta\sin\phi[/itex]
[itex]\hat{p}^3=\cos\phi[/itex]

Could you please explain further what you mean by looking up the Jacobian to find out how to invert partial derivatives?
Thanks again!
 
fairy._.queen said:
Could you please explain further what you mean by looking up the Jacobian to find out how to invert partial derivatives?
Thanks again!

I saw above you did ∂p/∂θ => ∂θ/∂p . This is not true.

Just for an easy example, consider cartesian and polar in 2d. We have this:

x=r cosθ
y=r sinθ

This tells how to convert from polar to cartesian coordinates and we can use these functions to find all partial derivatives of x or y with respect to r,θ in a straightforward manner. Finding partials of r,θ with respect to x,y would involve first solving for r,θ in terms of x,y and then taking the partials.

Let's do one.

∂x/∂r = cosθ

r=√(x2+y2)
∂r/∂x = x/√(x2+y2) = cosθ
(above I used tanθ = y/x)

Notice ∂x/∂r ≠ (∂r/∂x)-1


So the intuitive guess didn't work, take a closer look at what is happening. The polar to cartesian functions are explicitly defining x,y in terms of r,θ but if we regard x,y as the independent variables, they are also implicity defining r,θ. So rewrite the equations like so:

f1(x,y,r(x,y),θ(x,y)) = 0 = x -rcosθ
f2(x,y,r(x,y),θ(x,y)) = 0 = y -rsinθ

I have decided I want x,y to be independent and r,θ will be the functions I am after; this is like solving the above equations for r,θ in terms of x,y as I did with r=√(x2+y2)

I'm after ∂r/∂x so let's take partial derivatives of those two equations wrt x:

∂f1/∂x = 1 + rsinθ ∂θ/∂x - cosθ ∂r/∂x = 0
∂f2/∂x = -rcosθ ∂θ/∂x - sinθ ∂r/∂x = 0

Arrange this into a matrix with ∂θ/∂x and ∂r/∂x being the unknowns and solve for ∂r/∂x using Cramer's Rule. You'll find ∂r/∂x = cosθ


This prodecure can be generalized and the matrix you get (as I found above) is called the Jacobian. You can then use the Jacobian to compute the inverted partials.
 
Thank you very much!
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
Replies
2
Views
2K
Replies
33
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
3
Views
2K
Replies
3
Views
2K