Differentiation spherical coordinates

In summary, the conversation discusses the process of inverting a mass matrix and the use of the expression ##\dfrac{q}{\partial \mathbf{r}}##, which means ##\dfrac{\partial q}{\partial \mathbf{r}}##. The issue arises when ##q=0## and the individual has trouble solving for ##\dfrac{\partial q}{\partial \mathbf{r}}##. It is suggested to transform the gradient to spherical coordinates or use the correct expression of the covariant differential operators to obtain the correct result.
  • #1
ebrattr
17
0
Hi ! I'm trying to inverse a mass matrix so I need to do something like this

[itex] \dfrac{q}{\partial \mathbf{r}} [/itex] where [itex] \cos q = \dfrac{\mathbf{r}\cdot \hat{\mathbf{k}}}{r} [/itex]

However, when [itex] \mathbf{r} = \hat{\mathbf{k}} \text{ or } -\hat{\mathbf{k}} [/itex] I have problems.

¿What can I do?

Thanks !
 
Physics news on Phys.org
  • #2
ebrattr said:
Hi ! I'm trying to inverse a mass matrix so I need to do something like this

[itex] \dfrac{q}{\partial \mathbf{r}} [/itex] where [itex] \cos q = \dfrac{\mathbf{r}\cdot \hat{\mathbf{k}}}{r} [/itex]
What does ##\dfrac{q}{\partial \mathbf{r}} ## mean?
Did you mean to write this?
##\dfrac{\partial q}{\partial \mathbf{r}}##
ebrattr said:
However, when [itex] \mathbf{r} = \hat{\mathbf{k}} \text{ or } -\hat{\mathbf{k}} [/itex] I have problems.

¿What can I do?
Isn't k##\cdot##k = 1, and similarly, isn't -k##\cdot##k = -1? What problems are you having?
 
  • #3
Yes, I mean [itex] \dfrac{\partial q}{\partial \mathbf{r}} [/itex] As you know if you do [itex] \dfrac{\partial}{\partial \mathbf{r}} [/itex] both sides you get [itex] \dfrac{\partial q}{\partial \mathbf{r}} -\sin q = \dfrac{\hat{\mathbf{k}}}{L} [/itex]. Solving for [itex] \dfrac{\partial q}{\partial \mathbf{r}} [/itex] you get [itex] \dfrac{\partial q}{\partial \mathbf{r}} = -\dfrac{\hat{\mathbf{k}}}{L\sin q} [/itex] So, when [itex] q=0 [/itex] I'm having troubles.
 
  • #4
You have to transform the gradient to spherical coordinates first. This you get with
[tex]\mathrm{d} f=\mathrm{d} \vec{r} \cdot \vec{\nabla} f = (\mathrm{d} r \vec{e}_r \cdot +\mathrm{d} \vartheta r \vec{e}_{\vartheta} + \mathrm{d} \varphi r \sin \vartheta \vec{e}_{\varphi}) \cdot \nabla{f}.[/tex]
Since [itex]\vec{e}_{r}[/itex], [itex]\vec{e}_{\vartheta}[/itex], and [itex]\vec{e}_{\varphi}[/itex] build a complete orthonormal system you immediately read off
[tex]\vec{\nabla} \cdot \vec{r}=\vec{e}_r \frac{\partial f}{\partial r} + \vec{e}_{\vartheta} \frac{1}{r} \frac{\partial f}{\partial \vartheta} + \vec{e}_{\varphi} \frac{1}{r \sin \vartheta} \frac{\partial f}{\partial \vartheta}.[/tex]
For [itex]f=\vartheta[/itex] you thus get
[tex]\vec{\nabla} \vartheta=\frac{1}{r} \vec{e}_{\vartheta}.[/tex]
You can of course do the whole thing in Cartesian coordinates:
[tex]f=\arccos \left (\frac{\vec{k} \cdot \vec{r}}{r} \right ).[/tex]
Using the chain rule gives
[tex]\vec{\nabla} f=-\frac{1}{\sin \vartheta} \vec{\nabla} \left (\frac{\vec{k} \cdot \vec{r}}{r} \right )=-\frac{1}{\sin \vartheta} \left (\frac{\vec{k}}{r}-\frac{(\vec{r} \cdot \vec{k}) \vec{r}}{r^3} \right ).[/tex]
Now we can simplify
[tex]\frac{\vec{k}}{r}-\frac{(\vec{r} \cdot \vec{k}) \vec{r}}{r^3}
=\frac{1}{r} \left (\vec{k} - \frac{(\vec{r} \cdot \vec{k})
\vec{r}}{r^2} \right )=-\frac{\sin \vartheta}{r} \begin{pmatrix}
\cos \varphi \cos \vartheta \\ \sin \varphi \cos \vartheta \\ -\sin \vartheta
\end{pmatrix}=-\frac{\vec{e}_{\vartheta} \sin \vartheta}{r}.[/tex]
Plugging this into the equation above you again get
[tex]\vec{\nabla} \vartheta=\frac{1}{r} \vec{e}_{\vartheta}.[/tex]
As you see you always must use the correct expression of the covariant differential operators to get the right result!
 

1. What are spherical coordinates?

Spherical coordinates are a system for representing points in three-dimensional space using three parameters: radius, inclination angle (also known as polar angle), and azimuth angle (also known as azimuth or longitudinal angle).

2. How do you convert between spherical and Cartesian coordinates?

To convert from spherical coordinates (r, θ, φ) to Cartesian coordinates (x, y, z), you can use the following equations: x = r sinθ cosφ, y = r sinθ sinφ, and z = r cosθ. To convert from Cartesian coordinates to spherical coordinates, the equations are r = √(x² + y² + z²), θ = arccos(z / r), and φ = arctan(y / x).

3. What is the use of spherical coordinates?

Spherical coordinates are commonly used in mathematics, physics, and engineering to describe the position of objects in three-dimensional space. They are particularly useful for describing points on a sphere or other curved surfaces, and for solving problems involving spherical symmetry.

4. What is the gradient in spherical coordinates?

The gradient in spherical coordinates is a vector operator that represents the rate and direction of change of a function. In spherical coordinates, the gradient is given by ∇f = (∂f / ∂r)er + (1 / r)(∂f / ∂θ)eθ + (1 / (rsinθ))(∂f / ∂φ)eφ, where er, eθ, and eφ are unit vectors in the radial, azimuthal, and polar directions, respectively.

5. How is differentiation performed in spherical coordinates?

Differentiation in spherical coordinates involves taking partial derivatives with respect to the three parameters: r, θ, and φ. The partial derivatives can then be combined to form the gradient, divergence, and curl operators, which are useful in solving many physical and mathematical problems involving spherical symmetry.

Similar threads

Replies
3
Views
1K
  • Calculus
Replies
7
Views
1K
Replies
4
Views
351
Replies
5
Views
3K
  • Atomic and Condensed Matter
Replies
0
Views
482
Replies
3
Views
1K
  • Classical Physics
Replies
2
Views
888
Back
Top