# I Demo of cosine direction with curvilinear coordinates

Tags:
1. Dec 6, 2017

### fab13

1) Firstly, in the context of a dot product with Einstein notation :

$$\text{d}(\vec{V}\cdot\vec{n} )=\text{d}(v_{i}\dfrac{\text{d}y^{i}}{\text{d}s})$$

with $\vec{n}$ representing the cosine directions vectors, $v_{i}$ the covariant components of $\vec{V}$ vector, $y^{i}$ the curvilinear coordinates and $s$ an affine parameter (it may be the length along the line, isn't it ?)

Author says that $\dfrac{\text{d}y^{i}}{\text{d}s}$ (with $y^{i}$ curvilinear coordinates) represent the cosine directions and I would like to prove it : how to do it ?

For example, in polar coordinates, How can I express the 2 cosine directions with the 2 vectors curvilinear basis $\vec{e_{r}}$ and $\vec{e_{\theta}}$ ???

On the following figure, I don't know exactly how to represent the vector $\vec{n}$ :

2) Secondly, if $\dfrac{\text{d}y^{i}}{\text{d}s}$ are cosine directions, why does above scalar product is not equal rather to :

$$\text{d}(\vec{V}\cdot\vec{n} )=\text{d}(v^{i}\dfrac{\text{d}y^{i}}{\text{d}s})$$

with $v^{i}$ the contravariant components of $\vec{V}$. ???

Indeed,both ($v_{i}$ and $v^{i}$) are related by :

$$v_{i}=v^{i}\,\cos(\theta_i)$$ with $\cos(\theta_i)$ the cosine direction for the angle $\theta_i$ between $\vec{V}$ and $\vec{n}$ vectors.

I hope you will understand these 2 questions.

Any help is welcome, Thanks

2. Dec 6, 2017

To try to answer your first question: $\vec{r}=r \hat{a}_r$ in polar coordinates. But $\hat{r}=r(\cos{\theta} \hat{i}+\sin{\theta} \hat{j} )$ with $\hat{a}_r=\cos{\theta} \hat{i}+\sin{\theta} \hat{j}$. $\\$ This means, (by the chain rule for derivatives): $\\$ $d \vec{r}=dr \, \hat{a}_r+r(-\sin{\theta} \hat{i}+\cos{\theta} \hat{j} )d \theta =dr \, \hat{a}_r+(r d \theta )\, \hat{a}_{\theta}$, with $\hat{a}_{\theta}=-\sin{\theta} \hat{i}+\cos{\theta} \hat{j}$. $\\$ (Note that $\hat{a}_r \cdot \hat{a}_{\theta}=0$). $\\$ Let $d \vec{r}=d \vec{s}$. Then $ds=\sqrt{dr^2+(r d \theta)^2}$ and direction cosines are $dr/ds$ and $(r d\theta)/ds$.

Last edited: Dec 6, 2017
3. Dec 6, 2017

### fab13

@Charles Link : Thanks for your answer. I would like to clarify a little problem : I don't know how we can define systematically the direction cosine $\text{d}y^{i}/\text{d}s$.
Indeed, in the case of polar coordinates that we have taken here, the first direction is : $\text{d}y^{i}/\text{d}s=\text{d}r/\text{d}s$ , so we get the right matching $y^{1}=r$.
But on the second direction cosine, I get from your answer : $\text{d}y^{2}/\text{d}s=r\text{d}\theta/\text{d}s \neq \text{d}\theta/\text{d}s$, then we don't get the matching $y^{2}=\theta$, i.e I have this second direction cosine equal to $r\text{d}\theta/\text{d}s$.

How can I get rid off the factor $r$ between $r\text{d}\theta/\text{d}s$ and $\text{d}\theta/\text{d}s$ ??

Maybe If I start from the element : $ds^{2}=g_{ij}\dfrac{\text{d}y^{i}}{\text{d}s}\dfrac{\text{d}y^{j}}{\text{d}s}$, I can define $g_{11}=g_{rr}=\vec{e_{r}}\cdot\vec{e_{r}}=||\vec{e_{r}}||^{2}=1$

and $g_{22}=g_{\theta\theta}=\vec{e_{\theta}}\cdot\vec{e_{\theta}}=||\vec{e_{\theta}}||^{2}=r^2$

Then, even with this convention, I couldn't get to have the expression of second direction cosine, equal to $\text{d}y^{2}/\text{d}s=\text{d}\theta/\text{d}s$ since :

If I express this second direction cosine : $(\text{direction cosine})_{\theta}= \dfrac{\text{d}\vec{r}\cdot\vec{e_{\theta}}}{||\text{d}\vec{r}||\,||\vec{e_{\theta}}||} =\dfrac{\vec{e_{\theta}}\cdot\vec{e_{\theta}}\,\text{d}\theta}{r\text{d}s}=\dfrac{r^2\text{d}\theta}{r\text{d}s}=\dfrac{r\text{d}\theta}{\text{d}s}$

Unfortunately, I still obtain the factor $r$ which prevents to get $\text{d}y^{i}/\text{d}s=(\text{direction cosine})_{i}$

If someone could help me to solve this little issue ...

Last edited: Dec 6, 2017
4. Dec 6, 2017

I think the answer is that polar coordinates don't follow this simple formula because of problems with the metric. There are other people on this Physics Forums who know the details of that kind of mapping better than I do, but I think that is the conclusion that would be reached. Your additional calculations with the $g_{11}$ etc. look like they are on the right track, but I am no expert on this topic. $\\$@fresh_42 Perhaps you can add some expertise.

5. Dec 12, 2017

### fab13

@fresh_42 Could you take a look please at my issue above or anybody else ?

Maybe should I put this post on another forum ?

6. Dec 12, 2017

The "General Math" section would likely get more people reading it. Perhaps @Orodruin and/or @StoneTemplePython might also be able to give an input. They both have very solid mathematics backgrounds.

7. Dec 12, 2017

### fab13

ok, thanks, I move it from this forum

8. Dec 12, 2017

### fab13

The original post was on https://www.physicsforums.com/threads/demo-of-cosine-direction-with-curvilinear-coordinates.933583/

1) Firstly, in the context of a dot product with Einstein notation :

$$\text{d}(\vec{V}\cdot\vec{n} )=\text{d}(v_{i}\dfrac{\text{d}y^{i}}{\text{d}s})$$

with $\vec{n}$ representing the cosine directions vectors, $v_{i}$ the covariant components of $\vec{V}$ vector, $y^{i}$ the curvilinear coordinates and $s$ an affine parameter (it may be the length along the line, isn't it ?)

Author says that $\dfrac{\text{d}y^{i}}{\text{d}s}$ (with $y^{i}$ curvilinear coordinates) represent the cosine directions and I would like to prove it : how to do it ?

For example, in polar coordinates, How can I express the 2 cosine directions with the 2 vectors curvilinear basis $\vec{e_{r}}$ and $\vec{e_{\theta}}$ ???

On the following figure, I don't know exactly how to represent the vector $\vec{n}$ :

2) Secondly, if $\dfrac{\text{d}y^{i}}{\text{d}s}$ are cosine directions, why does above scalar product is not equal rather to :

$$\text{d}(\vec{V}\cdot\vec{n} )=\text{d}(v^{i}\dfrac{\text{d}y^{i}}{\text{d}s})$$

with $v^{i}$ the contravariant components of $\vec{V}$. ???

I know that ($v_{i}$ and $v^{i}$) are related by :

$$v_{i}=v^{i}\,\cos(\theta_i)$$ with $\cos(\theta_i)$ the cosine direction for the angle $\theta_i$ between $\vec{V}$ and $\vec{n}$ vectors.

I think that I make confusion between the cosine direction components and the angle $\theta_i$,

Any help is welcome

I would like to clarify a little problem : I don't know how we can define systematically the direction cosine $\text{d}y^{i}/\text{d}s$.
Indeed, in the case of polar coordinates that we have taken here, the first direction is : $\text{d}y^{i}/\text{d}s=\text{d}r/\text{d}s$ , so we get the right matching $y^{1}=r$.
But on the second direction cosine, I get from your answer : $\text{d}y^{2}/\text{d}s=r\text{d}\theta/\text{d}s \neq \text{d}\theta/\text{d}s$, then we don't get the matching $y^{2}=\theta$, i.e I have this second direction cosine equal to $r\text{d}\theta/\text{d}s$.

How can I get rid off the factor $r$ between $r\text{d}\theta/\text{d}s$ and $\text{d}\theta/\text{d}s$ ??

Maybe If I start from the element : $ds^{2}=g_{ij}\dfrac{\text{d}y^{i}}{\text{d}s}\dfrac{\text{d}y^{j}}{\text{d}s}$, I can define $g_{11}=g_{rr}=\vec{e_{r}}\cdot\vec{e_{r}}=||\vec{e_{r}}||^{2}=1$

and $g_{22}=g_{\theta\theta}=\vec{e_{\theta}}\cdot\vec{e_{\theta}}=||\vec{e_{\theta}}||^{2}=r^2$

Then, even with this convention, I couldn't get to have the expression of second direction cosine, equal to $\text{d}y^{2}/\text{d}s=\text{d}\theta/\text{d}s$ since :

If I express this second direction cosine : $(\text{direction cosine})_{\theta}= \dfrac{\text{d}\vec{r}\cdot\vec{e_{\theta}}}{||\text{d}\vec{r}||\,||\vec{e_{\theta}}||} =\dfrac{\vec{e_{\theta}}\cdot\vec{e_{\theta}}\,\text{d}\theta}{r\text{d}s}=\dfrac{r^2\text{d}\theta}{r\text{d}s}=\dfrac{r\text{d}\theta}{\text{d}s}$

Unfortunately, I still obtain the factor $r$ which prevents to get $\text{d}y^{i}/\text{d}s=(\text{direction cosine})_{i}$

If someone could help me to solve this little issue ...

9. Dec 12, 2017

### Orodruin

Staff Emeritus
The vector $\vec n$ seems to be the tangent vector of some curve, parametrised by its curve length $s$ such that $\vec n \cdot \vec n = 1$. Its components are the direction cosines only if you use a basis that is orthonormal. When you are using a curvilinear coordinate system, this is not generally true when you use the coordinate bases. The inner product $\vec n \cdot \vec V$, is an invariant that is always equal to the magnitude of $\vec V$ multiplied by the cosine of the angle between $\vec V$ and $\vec n$ (since $\vec n$ was normalised). For any two vectors $\vec A$ and $\vec B$, the inner product can be written as $\vec A \cdot \vec B = A_i B^i = A^i B_i$. Note that $A_i B_i$ as well as $A^i B^i$ are not invariants. In your special case, the contravariant components of $\vec n$ are $n^i = dy^i/ds$ (by definition of what a tangent vector is) and so to obtain the invariant $\vec n \cdot \vec V$ you must contract those components with the covariant components of $\vec V$.

Note that $dy^i/ds$ is not a direction cosine, since the coordinate basis $\vec E_i = \partial_i \vec x$ is generally not orthonormal (in particular, $\vec E_\theta$ in polar coordinates is not normalised).

10. Dec 22, 2017

### fab13

I make confusions, for example in polar coordinates ($\rho,\theta$) , between the coordinate $\theta$ and the general equation of geodesics.

Indeed, following the expression of :

$$\text{d}(\vec{V}\cdot\vec{n} )=\text{d}(v_{i}\dfrac{\text{d}y^{i}}{\text{d}s})$$

$$d\,\bigg(v_{i}\,\dfrac{\text{d}\,y^{i}}{\text{d}\,s}\bigg)=\text{d}\,v_{k}\,\dfrac{\text{d}\,y^{k}}{\text{d}\,s}+v_{i}\,\dfrac{\text{d}^{2}\,y^{i}}{\text{d}\,s^{2}}\,\text{d}\,s$$

Taking : $$\text{d}\,v_{k}=\partial_{j}\,v_{k}\,\dfrac{\text{d}\,y^{j}}{\text{d}\,s}\,\text{d}\,s$$

and from general equation of geodesics : $$\text{d}^{2}\,y^{i}/\text{d}\,s^{2}$$

We get :

$$\text{d}\,\bigg(v_{i}\,\dfrac{\text{d}\,y^{i}}{\text{d}\,s}\bigg)=(\partial_{j}\,v_{k}-v_{i}\,\Gamma_{kj}^{i})\,\dfrac{\text{d}\,y^{k}}{\text{d}\,s}\,\dfrac{\text{d}\,y^{j}}{\text{d}\,s}\,d\,s$$

then,

$$\text{d}\,(\vec{V}\,\cdot\,\vec{n})=(\partial_{j}\,v_{k}-v_{i}\,\Gamma_{kj}^{i}\,\text{d}\,y^{j})\,\dfrac{\text{d}\,y^{k}}{\text{d}\,s}=\text{D}\,v_{k}\,\dfrac{\text{d}\,y^{k}}{\text{d}\,s}$$

with defined Absolute differential : $$\text{D}\,v_{k}=(\partial_{j}\,v_{k}-v_{i}\,\Gamma_{kj}^{i})\,d\,y^{j}$$

Finally, I obtain the definition of Covariant derivative : $$\bigg(\nabla_{j}\,\vec{v}\bigg)_{k}=\partial_{j}\,v_{k}-v_{i}\,\Gamma_{kj}^{i}$$

How can I circumvent the issue from the factor $r$ which appears with the curvilinear coordinate $\theta$ (I speak about polar coordinates) ?

I know this is due to the curvilinear coordinates which is not orthonormal but I can't get to rid off this factor $r$ between coordinates $(r,\theta)$.

Any help is welcome for clarifications.

Last edited: Dec 22, 2017
11. Dec 22, 2017

### Orodruin

Staff Emeritus
I am sorry, but your notation makes your post almost impossible to read as you seem to be mixing different meanings of $d$ and ${\rm d}$ wildly. Also, I am not sure most of your post is relevant for what you are actually asking:
You have not once in your post defined what you mean with "the factor $r$". In fact, this is the first time you mention $r$ at all apart from the beginning where you called it $\rho$. It is unclear where you want to get rid of it because you have not written down a single equation containing it.

12. Dec 22, 2017

### fab13

My main issue is about the differential of inner product :

$$\text{d}(\vec{V}\cdot\vec{n} )=\text{d}(v_{i}\dfrac{\text{d}y^{i}}{\text{d}s})$$

In polar coordinates, I must take for coordinate $y^{\theta}=\theta$ but $\dfrac{\text{d}y^{i}}{\text{d}s}$ is not equal to the $\theta$ coordinate of normalized tangent vector $\vec{n}$ :

I can't write $\vec{n}=\dfrac{\text{d}y^{i}}{\text{d}s} \vec{e_i}$ with $i=\theta$ and $\dfrac{\text{d}y^{i}}{\text{d}s}=\dfrac{\text{d}\theta}{\text{d}s}$, since in this case, norm of $\vec{n}$ could not be equal to 1.

Indeed, one must have : $$\text{d}s=\sqrt{\text{d}r^2+(r \text{d}\theta)^2}\,\,\,\,\,\,\Leftrightarrow\,\,\,\,\,\,\vec{n}\cdot\vec{n}=\sum_{i}\bigg(\dfrac{\text{d}y^{i}}{\text{d}s}\bigg)^2=1$$

And if take $y^{1}=r$ and $y^{2}=\theta$, I have not the relation above for $\vec{n}\cdot\vec{n}=||\vec{n}||^2=1$ since this problematic factor $r$.

I hope my question is clearer

Last edited: Dec 22, 2017
13. Dec 25, 2017

### fab13

@Orodruin

Sorry for the errors, in my notation, I consider the polar coordinates as $(r,\theta)$ . Do you understand better my issue with my last post ?

14. Dec 26, 2017

### Orodruin

Staff Emeritus
You cannot write it like that if you are using a normalised set of basis vectors $\vec e_i$. This is generally not what we are doing in differential geometry. The coordinate basis is generally not orthonormal, as evidenced by the metric not being represented by the identity matrix.

This is not correct. Where did the metric go in your inner product?

15. Dec 26, 2017

### fab13

ok, I understood my issue that was not really a issue ; into my inner product :

$$\text{d}(\vec{V}\cdot\vec{n} )=\text{d}(v_{i}\dfrac{\text{d}y^{i}}{\text{d}s})$$

I can also write :

$$\text{d}(\vec{V}\cdot\vec{n} )=\text{d}(v^{j}g_{ij}\dfrac{\text{d}y^{i}}{\text{d}s})$$

and so, $j-th$ director cosine $\alpha_j$ is represented by : $\alpha_j=g_{ij}\dfrac{\text{d}y^{i}}{\text{d}s}$

since for example in polar coordinates : $\text{d}s^2 = g_{rr} \text{d}r^2+g_{\theta\theta}\text{d}\theta = \text{d}r^2+r^2\text{d}\theta$ so :

$$1=\alpha_{r}^{2}+\alpha_{\theta}^2=\dfrac{\text{d}r^2}{\text{d}s^2}+\dfrac{r^2\text{d}\theta^2}{\text{d}s^2}$$ with $\alpha_{\theta}$ director cosine = $\dfrac{r\text{d}\theta}{\text{d}s}$

Finaly, I get from :

$$\text{d}(\vec{V}\cdot\vec{n} )=\text{d}(v_{i}\dfrac{\text{d}y^{i}}{\text{d}s})$$

the inner product between vector $\vec{V}$ and the vector of directors cosine whose $j-th$ component is equal to $g_{ij}\dfrac{\text{d}y^{i}}{\text{d}s}$.

16. Dec 30, 2017

### fab13

Sorry, I wanted to say that director cosine $\alpha_{i}$ is equal to (without Einstein notation) :

$$\alpha_{i}=\sqrt{g_{ii}}\dfrac{\text{d}y^{i}}{\text{d}s}$$

By the way, if I consider any system of coordinates $(y^{1},y^{2})$, could we have the relation, for example director cosine $\alpha_{1}$ (here with Einstein notation) :

$$\alpha_{1}^{2}=g_{1i}\dfrac{\text{d}y^{1}}{\text{d}s}\dfrac{\text{d}y^{i}}{\text{d}s}$$

??

Thanks

17. Dec 31, 2017

### fab13

This would imply that $g_{ij} \neq 0$ for $i \neq j$ and so that curvilinear basis is not orthogonal , is it possible for curvilinear coordinates ?

Last edited: Dec 31, 2017