Legendre Functions II: Recurrence Relations and Special Properties

In this lecture, we derive some important recurrence relations of Legendre functions and use them to show that Legendre functions are indeed solutions of a differential equation, called Legendre’s differential equation.

Differentiating the generating function
$$g(x,t)=(1-2xt+t^2)^{-1/2}=\sum_{n=0}^\infty P_n(x)t^n,\ |t|<1\ \ \ \ \ \mbox{(1)}$$
with respect to $t$, we get
\begin{align*}
\frac{\partial g(x,t)}{\partial t}&=\frac{x-t}{(1-2xt+t^2)^{3/2}}\ \ \ \ \ \mbox{(2)}\\&=\sum_{n=0}^\infty nP_n(x)t^{n-1}.\ \ \ \ \ \mbox{(3)}\end{align*}
(2) can be written as
$$\frac{x-t}{(1-2xt+t^2)(1-2xt+t^2)^{1/2}}=\frac{(x-t)(1-2xt+t^2)^{-1/2}}{1-2xt+t^2}.$$
By (1) and (3), we obtain
$$(x-t)\sum_{n=0}^\infty P_n(x)t^n=(1-2xt+t^2)\sum_{n=0}^\infty nP_n(x) t^{n-1}$$ or
$$(1-2xt+t^2)\sum_{n=0}^\infty nP_n(x) t^{n-1}+(t-x)\sum_{n=0}^\infty P_n(x)t^n=0$$
which can be written out as
\begin{align*}
\sum_{n=0}^\infty nP_n(x)t^{n-1}-\sum_{n=0}^\infty &2xnP_n(x)t^n+\sum_{n=0}^\infty nP_n(x)t^{n+1}\\&+\sum_{n=0}^\infty P_n(x)t^{n+1}-\sum_{n=0}^\infty xP_n(x)t^n=0.\ \ \ \ \ \mbox{(4)}\end{align*}
In (4) replace $n$ by $n+1$ in the first term, and replace $n$ by $n-1$ in the third and fourth term. Then (4) becomes
\begin{align*}
\sum_{n=0}^\infty (n+1)P_{n+1}(x)t^n-\sum_{n=0}^\infty &2xnP_n(x)t^n+\sum_{n=0}^\infty (n-1)P_{n-1}(x)t^n\\&+\sum_{n=0}^\infty P_{n-1}(x)t^n-\sum_{n=0}^\infty xP_n(x)t^n=0.
\end{align*}
This can be simplified to
$$\sum_{n=0}^\infty[(n+1)P_{n+1}(x)-(2n+1)xP_n(x)+nP_{n-1}(x)]t^n=0$$
which implies that
$$(2n+1)xP_n(x)=(n+1)P_{n+1}(x)+nP_{n-1}(x).\ \ \ \ \ \mbox{(5)}$$
The recurrence relation (5) can be used to calculate Legendre polynomials. For example, we found $P_0(x)=1$ and $P_1(x)=x$ here. For $n=1$, (5) is
$$3xP_1(x)=2P_2(x)+P_0(x)$$
i.e.
$$P_2(x)=\frac{1}{2}(3x^2-1).$$
Continuing this using the recurrence relation (5), we obtain
\begin{align*}
P_3(x)&=\frac{1}{2}(5x^3-3x),\\
P_4(x)&=\frac{1}{8}(35x^4-30x^2+3),\\
P_5(x)&=\frac{1}{8}(63x^5-70x^3+15x),\\
\cdots.
\end{align*}
A great advantage of having the recurrence relation (5) is that one can easily calculate Legendre polynomials using a computer with a simple programming. This can be easily done for instance in Maxima.

Let us load the following simple program to run the recurrence relation (5).

(%i1) Legendre(n,x):=block ([],
if n = 0 then 1
else
if n = 1 then x
else  ((2*n – 1)*x*Legendre(n – 1, x)-(n – 1)*Legendre(n – 2,x))/n);

(%o1) Legendre(n, x) := block([], if n = 0 then 1
else (if n = 1 then x else ((2 n – 1) x Legendre(n – 1, x)
– (n – 1) Legendre(n – 2, x))/n))

Now we are ready to calculate Legendre polynomials. For example, let us calculate $P_3(x)$.

(%i2) Legendre(3,x);

The output is not exactly what we may like because it is not simplified.

In Maxima, simplification can be done by the command ratsimp.

(%i3) ratsimp(Legendre(3,x));

The output is

That looks better. Let us calculate one more, say $P_4(x)$.

Now we differentiate $g(x,t)$ with respect to $x$.
$$\frac{\partial g(x,t)}{\partial x}=\frac{t}{(1-2xt+t^2)^{3/2}}=\sum_{n=0}^\infty P_n'(x)t^n.$$
From this we obtain
$$(1-2xt+t^2)\sum_{n=0}^\infty P_n'(x)t^n-t\sum_{n=0}^\infty P_n(x)t^n=0$$
which leads to
$$P_{n+1}'(x)+P_{n-1}'(x)=2xP_n'(x)+P_n(x).\ \ \ \ \ \mbox{(6)}$$
Add 2 times $\frac{d}{dx}(5)$ to $2n+1$ times (6). Then we get
$$(2n+1)P_n=P_{n+1}'(x)-P_{n-1}'(x).\ \ \ \ \ \mbox{(7)}$$
$\frac{1}{2}[(6)+(7)]$ results
$$P_{n+1}'(x)=(n+1)P_n(x)+xP_n'(x).\ \ \ \ \ \mbox{(8)}$$
$\frac{1}{2}[(6)-(7)]$ results
$$P_{n-1}'(x)=-nP_n(x)+xP_n'(x).\ \ \ \ \ \mbox{(9)}$$
Replace $n$ by $n-1$ in (7) and add the result to $x$ times (9):
$$(1-x^2)P_n'(x)=nP_{n-1}(x)-nxP_n(x).\ \ \ \ \ \mbox{(10)}$$
Differentiate (10) with respect to $x$ and add the result to $n$ times (9):
$$(1-x^2)P_n^{\prime\prime}(x)-2xP_n'(x)+n(n+1)P_n(x)=0.\ \ \ \ \ \mbox{(11)}$$
The linear second-order differential equation (11) is called Legendre’s differential equation and as seen $P_n(x)$ satisfies (11). This is why $P_n(x)$ is called a Legendre polynomial.

In physics (11) is often expressed in terms of differentiation with respect to $\theta$. Let $x=\cos\theta$. Then by the chain rule,
\begin{align*}
\frac{dP_n(\cos\theta)}{d\theta}&=-\sin\theta\frac{dP_n(x)}{dx},\ \ \ \ \ \mbox{(12)}\\ \frac{d^2P_n(\cos\theta)}{d\theta^2}&=-x\frac{dP_n(x)}{dx}+(1-x^2)\frac{d^2P_n(x)}{dx^2}.\ \ \ \ \ \mbox{(13)}
\end{align*}
Using (12) and (13), Legendre’s differential equation (11) can be written as
$$\frac{1}{\sin\theta}\frac{d}{d\theta}\left[\sin\theta\frac{dP_n(\cos\theta)}{d\theta}\right]+n(n+1)P_n(\cos\theta)=0.$$

Tensors I

Tensors may be considered as a generalization of vectors and covectors. They are extremely important quantities for studying differential geometry and physics.

Let $M^n$ be an $n$-dimensional differentiable manifold. For each $x\in M^n$, let $E_x=T_xM^n$, i.e. the tangent space to $M^n$ at $x$. We denote the canonical basis of $E$ by $\partial=\left(\frac{\partial}{\partial x^1},\cdots,\frac{\partial}{\partial x^n}\right)$ and its dual basis by $\sigma=dx=(dx^1,\cdots,dx^n)$, where $x^1,\cdots,x^n$ are local coordinates. The canonical basis $\frac{\partial}{\partial x^1},\cdots,\frac{\partial}{\partial x^1}$ also simply denoted by $\partial_1,\cdots,\partial_n$.

Covariant Tensors

Definition. A covariant tensor of rank $r$ is a multilinear real-valued function
$$Q:E\times E\times\cdots\times E\longrightarrow\mathbb{R}$$
of $r$-tuples of vectors. A covariant tensor of rank $r$ is also called a tensor of type $(0,r)$ or shortly $(0,r)$-tensor. Note that the values of $Q$ must be independent of the basis in which the components of the vectors are expressed. A covariant vector (also called covector or a 1-form) is a covariant tensor of rank 1. An important of example of covariant tensor of rank 2 is the metric tensor $G$:
$$G(v,w)=\langle v,w\rangle=\sum_{i,j}g_{ij}v^iw^j.$$

In componenents, by multilinearity
\begin{align*}
Q(v_1\cdots,v_r)&=Q\left(\sum_{i_1}v_1^{i_1}\partial_{i_1},\cdots,\sum_{i_r}v_r^{i_r}\partial_{i_r}\right)\\
&=\sum_{i_1,\cdots,i_r}v_1^{i_1}\cdots v_r^{i_r}Q(\partial_{i_1},\cdots,\partial_{i_r}).
\end{align*}
Denote $Q(\partial_{i_1},\cdots,\partial_{i_r})$ by $Q_{i_1,\cdots,i_r}$. Then
$$Q(v_1\cdots,v_r)=\sum_{i_1,\cdots,i_r}Q_{i_1,\cdots,i_r}v_1^{i_1}\cdots v_r^{i_r}.\ \ \ \ \ \mbox{(1)}$$
Using the Einstein’s convention, (1) can be shortly written as
$$Q(v_1\cdots,v_r)=Q_{i_1,\cdots,i_r}v_1^{i_1}\cdots v_r^{i_r}.$$
The set of all covariant tensors of rank $r$ forms a vector space over $\mathbb{R}$. The number of components in such a tensor is $n^r$. The vector space of all covariant $r$-th rank tensors is denoted by
$$E^\ast\otimes E^\ast\otimes\cdots\otimes E^\ast=\otimes^r E^\ast.$$

If $\alpha,\beta\in E^\ast$, i.e. covectors, we can form the 2nd rank covariant tensor, the tensor product $\alpha\otimes\beta$ of $\alpha$ and $\beta$: Define $\alpha\otimes\beta: E\times E\longrightarrow\mathbb{R}$ by
$$\alpha\otimes\beta(v,w)=\alpha(v)\beta(w).$$
If we write $\alpha=a_idx^i$ and $\beta=b_jdx^j$, then
$$(\alpha\otimes\beta)_{ij}=\alpha\otimes\beta(\partial_i,\partial_j)=\alpha(\partial_i)\beta(\partial_j)=a_ib_j.$$

Contravariant Tensors

A contravariant vector, i.e. an element of $E$ can be considered as a linear functional $v: E^\ast\longrightarrow\mathbb{R}$ defined by
$$v(\alpha)=\alpha(v)=a_iv^i,\ \alpha=a_idx^i\in E^\ast.$$

Definition. A contravariant tensor of rank $s$ is a multilinear real-valued function $T$ on $s$-tuples of covectors
$$T:E^\ast\times E^\ast\times\cdots\times E^\ast\longrightarrow\mathbb{R}.$$ A contravariant tensor of rank $s$ is also called a tensor of type $(s,0)$ or shortly $(s,0)$-tensor.
For 1-forms $\alpha_1,\cdots,\alpha_s$
$$T(\alpha_1,\cdots,\alpha_s)=a_{1_{i_1}}\cdots a_{s_{i_s}}T^{i_1\cdots i_s}$$
where
$$T^{i_1\cdots i_s}:=T(dx^{i_1},\cdots,dx^{i_s}).$$
The space of all contravariant tensors of rank $s$ is denoted by
$$E\otimes E\otimes\cdots\otimes E:=\otimes^s E.$$
Contravariant vectors are contravariant tensors of rank 1. An example of a contravariant tensor of rank 2 is the inverse of the metric tensor $G^{-1}=(g^{ij})$:
$$G^{-1}(\alpha,\beta)=g^{ij}a_ib_j.$$

Given a pair $v,w$ of contravariant vectors, we can form the tensor product $v\otimes w$ in the same manner as we did for covariant vectors. It is the 2nd rank contravariant tensor with components $(v\otimes w)^{ij}=v^jw^j$. The metric tensor $G$ and its inverse $G^{-1}$ may be written as
$$G=g_{ij}dx^i\otimes dx^j\ \mbox{and}\ G^{-1}=g^{ij}\partial_i\otimes\partial_j.$$

Mixed Tensors

Definition. A mixed tensor, $r$ times covariant and $s$ times contravariant, is a real multilinear function $W$
$$W: E^\ast\times E^\ast\times\cdots\times E^\ast\times E\times E\times\cdots\times E\longrightarrow\mathbb{R}$$
on $s$-tuples of covectors and $r$-tuples of vectors. It is also called a tensor of type $(s,r)$ or simply $(s,r)$-tensor. By multilinearity
$$W(\alpha_1,\cdots,\alpha_s, v_1,\cdots, v_r)=a_{1_{i_1}}\cdots a_{s_{i_s}}W^{i_1\cdots i_s}{}_{j_1\cdots j_r}v_1^{j_1}\cdots v_r^{j_r}$$
where
$$W^{i_1\cdots i_s}{}_{j_1\cdots j_r}:=W(dx^{i_1},\cdots,dx^{i_s},\partial_{j_1},\cdots,\partial_{j_r}).$$

A 2nd rank mixed tensor may arise from a linear operator $A: E\longrightarrow E$. Define $W_A: E^\ast\times E\longrightarrow\mathbb{R}$ by $W_A(\alpha,v)=\alpha(Av)$. Let $A=(A^i{}_j)$ be the matrix associated with $A$, i.e. $A(\partial_j)=\partial_i A^i{}_j$. Let us calculate the component of $W_A$:
$$W_A^i{}_j=W_A(dx^i,\partial_j)=dx^i(A(\partial_j))=dx^i(\partial_kA^k{}_j)=\delta^i_kA^k{}_j=A^i{}_j.$$
So the matrix of the mixed tensor $W_A$ is just the matrix associated with $A$. Conversely, given a mixed tensotr $W$, once convariant and once contravariant, we can define a linear transformation $A$ such that $W(\alpha,v)=\alpha(A,v)$. We do not distinguish between a linear transformation $A$ and its associated mixed tensor $W_A$. In components, $W(\alpha,v)$ is written as
$$W(\alpha,v)=a_iA^i{}_jv^j=aAv.$$

The tensor product $w\otimes\beta$ of a vector and a covector is the mixed tensor defined by
$$(w\otimes\beta)(\alpha,v)=\alpha(w)\beta(v).$$ The associated transformation is can be written as
$$A=A^i{}_j\partial_i\otimes dx^j=\partial_i\otimes A^i{}_jdx^j.$$

For math undergraduates, different ways of writing indices (raising, lowering, and mixed) in tensor notations can be very confusing. Main reason is that in standard math courses such as linear algebra or elementary differential geometry (classical differential geometry of curves and surfaces in $\mathbb{E}^3$) the matrix of a linear transformation is usually written as $A_{ij}$. Physics undergraduates don’t usually get a chance to learn tensors in undergraduate physics courses. In order to study more advanced differential geometry or physics such as theory of special and general relativity, and field theory one must be able to distinguish three different ways of writing matrices $A_{ij}$, $A^{ij}$, and $A^i{}_j$. To summarize, $A_{ij}$ and $A^{ij}$ are bilinear forms on $E$ and $E^\ast$, respectively that are defined by
$$A_{ij}v^iv^j\ \mbox{and}\ A^{ij}a_ib_j\ (\mbox{respectively}).$$ $A^i{}_j$ is the matrix of a linear transformation $A: E\longrightarrow E$.

Let $(E,\langle\ ,\ \rangle)$ be an inner product space. Given a linear transformation $A: E\longrightarrow E$ (i.e. a mixed tensor), one can associate a bilinear covariant bilinear form $A’$ by
$$A'(v,w):=\langle v,Aw\rangle=v^ig_{ij}A^j{}_k w^k.$$ So we see that the matrix of $A’$ is
$$A’_{ik}=g_{ij}A^j{}_k.$$ The process can be said as “we lower the index $j$, making it a $k$, by mans of the metric tensor $g_{ij}$.” In tensor analysis one uses the same letter, i.e. instead of $A’$, one writes
$$A_{ik}:=g_{ij}A^j{}_k.$$ This is clearly a covariant tensor. In general, the components of the associated covariant tensor $A_{ik}$ differ from those of the mixed tensor $A^i{}_j$. But if the basis is orthonormal, i.e. $g_{ij}=\delta^i_j$ then they coincide. That is the reason why we simply write $A_{ij}$ without making any distiction in linear algebra or in elementary differential geometry.

Similarly, one may associate to the linear transformation $A$ a contravariant bilinear form
$$\bar A(\alpha,\beta)=a_iA^i{}_jg^{jk}b_k$$ whose matrix components can be written as
$$A^{ik}=A^i{}_jg^{jk}.$$

Note that the metric tensor $g_{ij}$ represents a linear map from $E$ to $E^\ast$, sending the vector with components $v^j$ into the covector with components $g_{ij}v^j$. In quantum mechanics, the covector $g_{ij}v^j$ is denoted by $\langle v|$ and called a bra vector, while the vector $v^j$ is denoted by $|v\rangle$ and called a ket vector. Usually the inner product on $E$
$$\langle\ ,\ \rangle:E\times E\longrightarrow\mathbb{R};\ \langle v,w\rangle=g_{ij}v^iw^j$$ is considered as a covariant tensor of rank 2. But in quantum mechanics $\langle v,w\rangle$ is not considered as a covariant tensor $g_{ij}$ of rank 2 acting on a pair of vectors $(v,w)$, rather it is regarded as the braket $\langle v|w\rangle$, a bra vector $\langle v|$ acting on a ket vector $|w\rangle$.

Helmholtz Equation

Helmholtz equation
$$\nabla^2\psi+k^2\psi=0\ \ \ \ \ \mbox{(1)}$$
is extremely important in physics. Solving many physically important partial differential equations such as heat equation, wave equation (Klein-Gordon equation), Maxwell’s equations, and Schrödinger equation, etc. often require solving Helmholtz equation (1).

In this notes, we discuss how to solve Helmholtz equation using separation of variables in rectangular, cylindrical, and spherical coordinate systems. The solutions we discuss here will be used when you solve boundary value problems associated with Helmholtz equation.

Helmholtz Equation in Rectangular Coordinates

Assume that $\psi(x,y,z)=X(x)Y(y)Z(z)$. Then the equation (1) becomes
$$YZ\frac{d^2X}{dx^2}+XZ\frac{d^2Y}{dy^2}+XY\frac{d^2Z}{dz^2}+k^2XYZ=0.\ \ \ \ \ \mbox{(2)}$$
Dividing (2) by $XYZ$, we obtain
$$\frac{1}{X}\frac{d^2X}{dx^2}+\frac{1}{Y}\frac{d^2Y}{dy^2}+\frac{1}{Z}\frac{d^2Z}{dz^2}+k^2=0.\ \ \ \ \mbox{(3)}$$
Let us write (3) as
$$\frac{1}{X}\frac{d^2X}{dx^2}=-\frac{1}{Y}\frac{d^2Y}{dy^2}-\frac{1}{Z}\frac{d^2Z}{dz^2}-k^2.\ \ \ \ \ \mbox{(4)}$$
Now we have a paradox. The LHS of (4) depends only on the $x$-variable while the RHS of (4) depends on $y$ and $z$-variables. One way to to avoid this paradox is to assume that the LHS and the RHS of (4) is a constant, say $-l^2$. If you are wondering why we choose a negative constant, the reason comes from physics. For a physical reason, we need an oscillating solution which can be obtained by choosing a negative separation constant. Often boundary conditions for Helmholtz equation lead to a trivial solution for a positive separation constant. Continuing a similar process, we separate Helmholtz equation into three ordinary differential equations:
\begin{align*}
\frac{1}{X}\frac{d^2 X}{dx^2}&=-l^2,\\
\frac{1}{Y}\frac{d^2Y}{dy^2}&=-m^2,\\
\frac{1}{Z}\frac{d^2Z}{dz^2}&=-n^2,
\end{align*}
where $k^2=l^2+m^2+n^2$.

Each mode is given by
$$\psi_{lmn}(x,y,z)=X_l(x)Y_m(y)Z_n(z)$$ and the most general solution is given by the linear combination of the modes
$$\psi(x,y,z)=\sum_{i,m,n}a_{lmn}\psi_{lmn}(x,y,z).$$

Helmholtz Equation in Cylindrical Coordinates

In cylindrical coordinate system $(\rho,\varphi,z)$, Helmholtz equation (1) is written as
$$\frac{1}{\rho}\frac{\partial}{\partial\rho}\left(\rho\frac{\partial\psi}{\partial\rho}\right)+\frac{1}{\rho^2}\frac{\partial^2\psi}{\partial\varphi^2}+\frac{\partial^2\psi}{\partial z^2}+k^2\psi=0.\ \ \ \ \ \mbox{(5)}$$

We assume that $\psi(\rho,\varphi,z)=P(\rho)\Phi(\varphi)Z(z)$. Then (5) can be written as
$$\frac{\Phi Z}{\rho}\frac{\partial}{\partial\rho}\left(\rho\frac{\partial\psi}{\partial\rho}\right)+\frac{PZ}{\rho^2}\frac{\partial^2\psi}{\partial\varphi^2}+P\Phi\frac{\partial^2\psi}{\partial z^2}+k^2=0.\ \ \ \ \ \mbox{(6)}$$
As we have done in rectangular coordinate system, by introducing the separation constants we can separate (6) into three ordinary differential equations
\begin{align*}
\frac{d^2Z}{dz^2}=l^2z,\\
\frac{d^2\Phi}{d\phi^2}=-m^2\Phi,\\
\rho\frac{d}{d\rho}\left(\rho\frac{dP}{d\rho}\right)+(n^2\rho^2-m^2)P=0,\ \ \ \ \ \mbox{(7)}
\end{align*}
where $n^2=k^2+l^2$. The last equation (7) is Bessel’s differential equation.

The general solution of Helmholtz equation in cylindrical coordinates is given by
$$\psi(\rho,\varphi,z)=\sum_{m,n}a_{mn}P_{mn}(\rho)\Phi_m(\varphi)Z_n(z).$$

Helmholtz Equation in Spherical Coordinates

In spherical coordinates $(r,\theta,\varphi)$, Helmholtz equation (1) is written as
$$\frac{1}{r^2\sin\theta}\left[\sin\theta\frac{\partial}{\partial r}\left(r^2\frac{\partial\psi}{\partial r}\right)+\frac{\partial}{\partial\theta}\left(\sin\theta\frac{\partial\psi}{\partial\theta}\right)+\frac{1}{\sin\theta}\frac{\partial^2\psi}{\partial\varphi^2}\right]=-k^2\psi.\ \ \ \ \ \mbox{(8)}$$
Assume that $\psi(r,\theta,\varphi)=R(r)\Theta(\theta)\phi(\varphi)$. Then (8) can be written as
$$\frac{1}{Rr^2}\frac{d}{dr}\left(r^2\frac{dR}{dr}\right)+\frac{1}{\Theta r^2\sin\theta}\frac{d}{d\theta}\left(\sin\theta\frac{d\Theta}{d\theta}\right)+\frac{1}{\Phi r^2\sin^2\theta}\frac{d^2\Phi^2}{d\varphi^2}=-k^2.\ \ \ \ \ \mbox{(9)}$$
By introducing separation constants, (9) is separated into three ordinary differential equations
\begin{align*}
\frac{1}{\Phi}\frac{d^2\Phi}{d\varphi^2}=-m^2,\\
\frac{1}{\sin\theta}\frac{d}{d\theta}\left(\sin\theta\frac{d\Theta}{d\theta}\right)+\left(Q-\frac{m^2}{\sin^2\theta}\right)\Theta=0,\ \ \ \ \ \mbox{(10)}\\
\frac{1}{r^2}\frac{d}{dr}\left(r^2\frac{dR}{dr}\right)+\left(k^2-\frac{Q}{r^2}\right)R=0.\ \ \ \ \ \mbox{(11)}
\end{align*}
The second equation (10) is the associated Legendre equation with $Q=l(l+1)$. The third equation (11) is spherical Bessel equation with $k^2>0$.

The general solution of Helmholtz equation (8) is then given by
$$\psi(r,\theta,\varphi)=\sum_{Q,m}R_Q(r)\Theta_{Qm}(\theta)\Phi_m(\varphi).$$

The restriction that $k^2$ be a constant is unnecessary. For instance the separation process will still be possible for $k^2=f(r)$. If $k^2=f(r)$, (11) is the associated Laguerre equation. The associated Laguerre equation is appeared in the hydrogen atom problem in quantum mechanics.

Connection Forms

Let $E_1, E_2, E_3$ be an arbitrary frame field on $\mathbb{E}^3$. At each $v\in T_p\mathbb{E}^3$, $\nabla_v E_i\in T_p\mathbb{E}^3$, $i=1,2,3$. So, there exists uniquely 1-forms $\omega_{ij}:T_p\mathbb{E}^3\longrightarrow\mathbb{R}$, $i,j=1,2,3$ such that
\begin{align*}
\nabla_vE_1&=\omega_{11}(v)E_1(p)+\omega_{12}(v)E_2(p)+\omega_{13}(v)E_3(p),\\
\nabla_vE_2&=\omega_{21}(v)E_1(p)+\omega_{22}(v)E_2(p)+\omega_{23}(v)E_3(p),\\
\nabla_vE_3&=\omega_{31}(v)E_1(p)+\omega_{32}(v)E_2(p)+\omega_{33}(v)E_3(p)
\end{align*}
for each $v\in T_p\mathbb{E}^3$. These equations are called the connection equations of the frame field $E_1$, $E_2$, $E_3$. One can clearly see that $\omega_{ij}$ is determined by
$$\omega_{ij}(v)=\nabla_v E_i\cdot E_j(p).$$ The 1-forms $\omega_{ij}$ are called the connection forms of the frame field $E_1,E_2,E_3$. Often the matrix $\omega=(\omega_{ij})$ is called the connection 1-form of the frame field $E_1,E_2,E_3$. The linearity of $\omega_{ij}$ is due to the linearity of the covariant derivative $\nabla E_i$.

Proposition. The matrix $\omega$ is a skew symmetric matrix, i.e. $\omega+{}^t\omega=0$.

Proof. Since $E_i\cdot E_j=0$, the directional derivative $v[E_i\cdot E_j]=0$. On the other hand, by Leibniz rule,
\begin{align*}
v[E_i\cdot E_j]&=\nabla_vE_i\cdot E_j(p)+E_i(p)\cdot \nabla_vE_j\\
&=\omega_{ij}(v)+\omega_{ji}(v).
\end{align*}
Hence,
\begin{equation}\label{eq:skewsymm}\omega_{ij}+\omega_{ji}=0.\end{equation}

If $i=j$ in \eqref{eq:skewsymm}, we get $\omega_{ii}=0$. So, the connection 1-form $\omega$ is written as
$$\omega=\begin{pmatrix}
0 & \omega_{12} & \omega_{13}\\
-\omega_{12} & 0 &\omega_{23}\\
-\omega_{13} & -\omega_{23} & 0
\end{pmatrix}.$$

Remark. The set of all $3\times 3$ skew symmetric matrices is denoted by $\mathfrak{o}(3)$. It is the Lie algebra of the orthogonal group $\mathrm{O}(3)$. The orthogonal group $\mathrm{O}(3)$ is the set of all $3\times 3$ orthogonal matrices and it is a Lie group. Recall that a square matrix $A$ is orthogonal if and only if $A\cdot{}^tA=I$, i.e. $A^{-1}={}^tA$.

The connection equations of the frame field $E_1$, $E_2$, $E_3$
\begin{equation}\label{eq:connecteqns}\nabla_VE_i=\sum_i\omega_{ij}(V)E_j,\ i=1,2,3\end{equation}
where $V$ is a vector field on $\mathbb{E}^3$ become
$$\begin{array}{ccccccc}
\nabla_VE_1&=&&&\omega_{12}(V)E_2&+&\omega_{13}(V)E_3,\\
\nabla_VE_2&=&-\omega_{12}(V)E_1& & &+&\omega_{23}(V)E_3,\\
\nabla_VE_3&=&-\omega_{13}(V)E_1&-&\omega_{23}(V)E_2.
\end{array}
$$
The connections equations are in fact a generalization of the Frenet-Serret formulas.

Let $Y$ be a vector field defined on a region containing a curve $\alpha(t)$. Then $Y_\alpha(t):=Y(\alpha(t))$ defined a vector field on the curve $\alpha(t)$. Then one can easily see that
$$\nabla_{\dot\alpha(t)}Y=\frac{d}{dt}Y_\alpha(t).$$
Let $\alpha(t)$ be a curve with unit speed. Let $E_1=T$, $E_2=N$, $E_3=B$. Then
\begin{align*}
\omega_{12}&=\nabla_{\dot\alpha_(t)}E_1\cdot E_2=\dot T\cdot N=(\kappa N)\cdot N=\kappa,\\
\omega_{13}&=\nabla_{\dot\alpha_(t)}E_1\cdot E_3=\dot T\cdot B=0,\\
\omega_{23}&=\nabla_{\dot\alpha_(t)}E_2\cdot E_3=\dot N\cdot B=(-\kappa T+\tau B)=\tau.
\end{align*}
The connection equations \eqref{eq:connecteqns} are then nothing but the Frenet-Serret formulas
$$\begin{array}{ccccccc}
\dot T&=&&&\kappa N&&\\
\dot N&=&-\kappa T& & &+&\tau B\\
\dot B&=&&-&\tau N.
\end{array}
$$

The frame $E_1,E_2,E_3$ can be written in terms of the natural frame $U_1,U_2,U_3$ as
\begin{align*}
E_1&=a_{11}U_1+a_{12}U_2+a_{13}U_3,\\
E_2&=a_{21}U_1+a_{22}U_2+a_{23}U_3,\\
E_3&=a_{31}U_1+a_{32}U_2+a_{33}U_3.
\end{align*}
Each real-valued function $a_{ij}:\mathbb{E}^3\longrightarrow\mathbb{R}$ is uniquely determined by $a_{ij}=E_i\cdot U_j$. The matrix $A=(a_{ij})$ is called the attitude matrix (also called rotation matrix or orientation matrix) of the frame field $E_1,E_2,E_3$. One can clearly see that the attitude matrix $A$ is an orthogonal matrix. In the above remark, I mentioned that the set of all $3\times $ skew symmetric matrices is the Lie algebra $\mathfrak{o}(3)$. The Lie algebra $\mathfrak{g}$ of a Lie group $G$ is defined to be the tangent space $T_e G$ to $G$ at the identity element $e$. (A Lie group is a differentiable manifold, so it make sense to talk about tangent spaces to $G$.)

Let us define a curve $\gamma: \mathbb{R}\longrightarrow\mathrm{O}(3)$ by
$$\gamma(t)=A(t)\cdot{}^tA(0).$$
Then $\gamma(0)=I$.
Hence $\dot{\gamma}(0)=\frac{dA(t)}{dt}|_{t=0}\cdot{}^tA(0)$ is a tangent vector to $\mathrm{O}(3)$ at the identity matrix $I$. That is, $\dot{\gamma}(0)\in\mathfrak{o}(3)$. Hence one can easily expect that the following theorem holds.

Theorem. If $A=(a_{ij})$ is the attitude matrix and $\omega=(\omega_{ij})$ the connection 1-form of a frame field $E_1, E_2, E_3$, then
$$\omega=dA\cdot{}^tA$$
or equivalently
$$\omega_{ij}=\sum_k da_{ik} \cdot a_{jk}\ \mbox{for}\ i,j=1,2,3.$$

Proof. For each $v\in T_p\mathbb{E}^3$,
$$\omega_{ij}(v)=\nabla_vE_i\cdot E_j(p).$$
In terms of the natural field $U_i$, $i=1,2,3$,
$$E_i=\sum_ka_{ik}U_k,\ i=1,2,3.$$
So,
\begin{align*}
\nabla_vE_i&=\sum_k v[a_{ik}]U_k(p)\\
&=\sum_k da_{ik} U_k(p).
\end{align*}
Hence,
$$\omega_{ij}=\sum_k da_{ik}a_{jk},$$
i.e.
$$\omega=dA\cdot{}^tA.$$

Remark. In general, if $G$ is a Lie group then its Lie algebra $\mathfrak{g}$ is given by the set of differential $1$-forms
$$\mathfrak{g}=\{g^{-1}dg:\ g\in G\}=\{(dg^{-1})g:\ g\in G\}.$$

Example. Let us compute the connection forms of the cylindrical frame field. The attitude matrix is
$$A=\begin{pmatrix}
\cos\theta & \sin\theta & 0\\
-\sin\theta & \cos\theta & 0\\
0 & 0 & 1
\end{pmatrix}.$$ Thus
$$dA=\begin{pmatrix}
-\sin\theta d\theta & \cos\theta d\theta & 0\\
-\cos\theta d\theta & -\sin\theta d\theta & 0\\
0 & 0 & 0
\end{pmatrix}.$$
Hence,
\begin{align*}
\omega&=dA\cdot{}^tA\\
&=\begin{pmatrix}
-\sin\theta d\theta & \cos\theta d\theta & 0\\
-\cos\theta d\theta & -\sin\theta d\theta & 0\\
0 & 0 & 0
\end{pmatrix}\begin{pmatrix}
\cos\theta & -\sin\theta & 0\\
\sin\theta & \cos\theta & 0\\
0 & 0 & 1\end{pmatrix}\\
&=\begin{pmatrix}
0 & d\theta & 0\\
-d\theta & 0 & 0\\
0 & 0 & 0
\end{pmatrix}.
\end{align*}
The connection equations of the cylindrical frame field are then
\begin{align*}
\nabla_VE_1&=d\theta(V)E_2=V[\theta]E_2,\\
\nabla_VE_2&=-d\theta(V)E_1=-V[\theta]E_1,\\
\nabla_VE_3&=0
\end{align*}
for all vector fields $V$. As expected the vector field $E_3$ is parallel.

Frame Fields

In Euclidean 3-space $\mathbb{E}^3$, we have naturally defined frame $U_1(p)$, $U_2(p)$, $U_3(p)$ for each $p\in\mathbb{E}^3$, where $U_1=(1,0,0)$, $U_2(0,1,0)$, $U_3=(0,0,1)$. The frame $U_1$, $U_2$, $U_3$ (as vector fields) is called the natural frame. As a generalization of the natural frame, we can define

Definition. Vector fields $E_1$, $E_2$, $E_3$ on $\mathbb{E}^3$ constitute a frame field on $\mathbb{E}^3$ provided
$$E_i\cdot E_j=\delta_{ij},\ i,j=1,2,3$$
where $\delta_{ij}$ is the Kronecker’s delta.

There are two important examples of frame fields: the cylindrical frame field and the spherical frame field.

Example. [The Cylindrical Frame Field]

Let $(r,\theta,z)$ be the usual cylindrical coordinates on $\mathbb{E}^3$.

Fig. 1 The Cylindrical Frame

We find a unit vector field in the direction in which each coordinate increases. For $r$, this is
$$E_1=\cos\theta U_1+\sin\theta U_2.$$
For $\theta$, we find
$$E_2=-\sin\theta U_1+\cos\theta U_2.$$ Finally for $z$, it is clearly
$$E_3=U_3.$$

Example. [The spherical Frame Field]

Let $(\rho,\theta,\varphi)$ be the usual spherical coordinates.

Fig. 2 The Spherical Frame

One can find the spherical frame $F_1$, $F_2$, $F_3$ using the cylindrical frame $E_1$, $E_2$, $E_3$. Clearly
$$F_2=E_2=-\sin\theta U_1+\cos\theta U_2.$$

Fig 3. The Spherical Frame

As one can see in the Figure 3, $F_1$ and $F_3$ are obtained as
\begin{align*}
F_1&=\cos\varphi E_1+\sin\varphi E_3\\
&=\cos\varphi(\cos\theta U_1+\sin\theta U_2)+\sin\varphi U_3,\\
F_3&=-\sin\varphi E_1+\cos\varphi E_3\\
&=-\sin\varphi(\cos\theta U_1+\sin\theta U_2)+\cos\varphi U_3.
\end{align*}
Hence,
\begin{align*}
F_1&=\cos\varphi\cos\theta U_1+\cos\varphi\sin\theta U_2+\sin\varphi U_3,\\
F_2&=-\sin\theta U_1+\cos\theta U_3,\\
F_3&=-\sin\varphi\cos\theta U_1-\sin\varphi\sin\theta U_2+\cos\varphi U_3.
\end{align*}