Finished writing a draft article? Are you ready to request review of it by an experienced editor for possible inclusion in Wikipedia? Submit your draft for review!
3.1. Spherical Harmonics
In order to be able to represent a function on a sphere in a rotation invariant manner, we utilize the mathematical notion of spherical harmonics to describe the way that rotations act
on a spherical function. The theory of spherical harmonics says that any smooth enough spherical function
f
(
θ
,
ϕ
)
{\displaystyle {\mathfrak {f}}(\theta ,\phi )}
can be decomposed as the sum of its harmonics:
f
(
θ
,
ϕ
)
=
∑
l
=
0
∞
∑
m
=
−
l
m
=
+
l
f
l
m
Y
l
m
(
θ
,
ϕ
)
{\displaystyle {\mathfrak {f}}(\theta ,\phi )={\sum \limits _{l=0}^{\infty }}{\sum \limits _{m=-l}^{m=+l}}f_{l}^{m}Y_{l}^{m}(\theta ,\phi )}
1
where degree
l
{\displaystyle l}
and order
m
{\displaystyle m}
and
Y
l
m
(
θ
,
ϕ
)
=
N
e
i
m
ϕ
P
l
m
(
c
o
s
θ
)
{\displaystyle \mathrm {Y} _{l}^{m}(\theta ,\phi )=\mathrm {N} e^{im\phi }\mathrm {P} _{l}^{m}(cos\theta )}
2
Normalization factor for trigonometric functions
s
i
n
/
c
o
s
{\displaystyle sin/cos}
does not depend on index
m
{\displaystyle m}
and is:
N
s
i
n
/
c
o
s
=
π
2
{\displaystyle ~~~~~{\mathcal {N}}_{sin/cos}={\sqrt {\frac {\pi }{2}}}}
Thus to normalize a trigonometric function the factor will be the inverse of this:
2
π
c
o
s
(
m
x
)
{\displaystyle ~~~~~{\sqrt {\frac {2}{\pi }}}cos(mx)}
for instance[1]
Normalization factor
N
{\displaystyle \mathrm {N} }
in formula [2] is defined below and
e
i
m
ϕ
=
c
o
s
(
m
ϕ
)
+
i
s
i
n
(
m
ϕ
)
{\displaystyle e^{im\phi }=cos(m\phi )+isin(m\phi )}
3
and
f
ℓ
m
=
∫
0
2
π
∫
0
π
f
(
θ
,
ϕ
)
Y
ℓ
m
(
θ
,
ϕ
)
s
i
n
θ
d
θ
d
ϕ
{\displaystyle f_{\ell }^{m}=\int _{0}^{2\pi }\int _{0}^{\pi }{\mathfrak {f}}(\theta ,\phi )\mathrm {Y} _{\ell }^{m}(\theta ,\phi )sin\theta ~d\theta ~d\phi }
4
Fourier transform component:
f
m
(
θ
)
=
∫
0
2
π
f
(
θ
,
ϕ
)
e
i
m
ϕ
d
ϕ
{\displaystyle f_{m}(\theta )=\int _{0}^{2\pi }{\mathfrak {f}}(\theta ,\phi )e^{im\phi }~d\phi }
5
Legendre transform:
f
ℓ
m
=
∫
0
π
f
m
(
θ
)
P
ℓ
m
(
c
o
s
θ
)
s
i
n
θ
d
θ
⇒
∫
−
1
1
f
m
(
a
r
c
c
o
s
(
c
o
s
θ
)
)
P
ℓ
m
(
c
o
s
θ
)
d
cos
θ
{\displaystyle f_{\ell }^{m}=\int _{0}^{\pi }{\mathfrak {f}}_{m}(\theta )P_{\ell }^{m}(cos\theta )sin\theta ~d\theta ~~~~\Rightarrow ~~~\int _{~-1}^{1}{\mathfrak {f}}_{m}(arccos(cos\theta ))P_{\ell }^{m}(cos\theta )~d\cos \theta }
6
and discrete form of Gauss-Legendre transform :
f
l
m
=
∑
j
=
1
N
0
f
m
(
θ
j
)
P
l
m
(
c
o
s
θ
j
)
w
j
{\displaystyle f_{l}^{m}=\sum _{j=1}^{N_{0}}{{\mathfrak {f}}_{m}(\theta _{j})\mathrm {P} _{l}^{m}(cos\theta _{j})w_{j}}}
7
Angles
θ
j
{\displaystyle \theta _{j}}
and
w
j
{\displaystyle w_{j}}
in formula [7] above are abscissas and weights for Gauss-Legendre Integration given elsewhere, e.g in Ref {5}
∙
{\displaystyle \bullet }
ALTERNATIVE EXPRESSION OF COEFFICIENTS :
f
l
m
=
∫
0
2
π
d
ϕ
c
o
s
(
m
ϕ
)
∫
0
π
d
θ
s
i
n
(
θ
)
F
(
θ
,
ϕ
)
P
l
m
(
c
o
s
θ
)
{\displaystyle f_{l}^{m}=\int \limits _{0}^{2\pi }d\phi ~cos(m\phi )\int \limits _{0}^{\pi }d\theta ~sin(\theta )F(\theta ,\phi )P_{l}^{m}(cos\theta )}
+
i
∫
0
2
π
d
ϕ
s
i
n
(
m
ϕ
)
∫
0
π
d
θ
s
i
n
(
θ
)
F
(
θ
,
ϕ
)
P
l
m
(
c
o
s
θ
)
{\displaystyle ~~~+~~~i\int \limits _{0}^{2\pi }d\phi ~sin(m\phi )\int \limits _{0}^{\pi }d\theta ~sin(\theta )F(\theta ,\phi )P_{l}^{m}(cos\theta )}
8
Assuming
Q
l
m
(
ϕ
)
=
∫
0
π
d
θ
s
i
n
(
θ
)
F
(
θ
,
ϕ
)
P
l
m
(
c
o
s
θ
)
{\displaystyle Q_{l}^{m}(\phi )=\int \limits _{0}^{\pi }d\theta ~sin(\theta )F(\theta ,\phi )P_{l}^{m}(cos\theta )}
9
we can rewrite the expression (8) as
f
l
m
=
∫
0
2
π
d
ϕ
c
o
s
(
m
ϕ
)
Q
l
m
(
ϕ
)
+
i
∫
0
2
π
d
ϕ
s
i
n
(
m
ϕ
)
Q
l
m
(
ϕ
)
{\displaystyle f_{l}^{m}=\int \limits _{0}^{2\pi }d\phi ~cos(m\phi )Q_{l}^{m}(\phi )+i\int \limits _{0}^{2\pi }d\phi ~sin(m\phi )Q_{l}^{m}(\phi )}
10
F
n
(
x
)
=
a
0
+
∑
k
=
1
k
=
n
(
a
k
c
o
s
(
k
x
)
+
b
k
s
i
n
(
k
x
)
)
{\displaystyle F_{n}(x)=a_{0}+\sum _{k=1}^{k=n}(a_{k}cos(kx)+b_{k}sin(kx))}
10.1
{
a
0
=
1
2
π
∫
−
π
π
F
n
(
x
)
d
x
a
k
=
1
π
∫
−
π
π
F
n
(
x
)
c
o
s
(
k
x
)
d
x
b
k
=
1
π
∫
−
π
π
F
n
(
x
)
s
i
n
(
k
x
)
d
x
{\displaystyle {\begin{cases}a_{0}={\frac {1}{2\pi }}\int \limits _{-\pi }^{\pi }F_{n}(x)dx\\a_{k}={\frac {1}{\pi }}\int \limits _{-\pi }^{\pi }F_{n}(x)cos(kx)dx\\b_{k}={\frac {1}{\pi }}\int \limits _{-\pi }^{\pi }F_{n}(x)sin(kx)dx\end{cases}}}
10.2
∙
{\displaystyle \bullet }
DISCRETE FOURIER TRANSFORM
Forward Transform:
X
(
n
)
=
1
N
∑
k
=
0
N
−
1
x
(
k
)
exp
−
j
k
2
π
n
/
N
f
o
r
n
=
0
,
.
.
.
.
N
−
1
{\displaystyle X(n)={\frac {1}{N}}\sum _{k=0}^{N-1}x(k)\exp ^{-jk2\pi n/N}~~~for~~~n=0,....N-1}
11
Inverse Transform:
x
(
n
)
=
∑
k
=
0
N
−
1
X
(
k
)
exp
+
j
k
2
π
n
/
N
f
o
r
n
=
0
,
.
.
.
N
−
1
{\displaystyle x(n)=\sum _{k=0}^{N-1}X(k)\exp ^{+jk2\pi n/N}~~~for~~~n=0,...N-1}
12
or assuming that we have calculated coefficients
f
m
(
θ
)
=
a
m
c
o
s
(
m
ϕ
)
+
i
b
m
s
i
n
(
m
ϕ
)
{\displaystyle f_{m}(\theta )=a_{m}cos(m\phi )+ib_{m}sin(m\phi )}
in [5], the function
s
(
ϕ
)
{\displaystyle s(\phi )}
can be restored as:
s
(
ϕ
)
=
a
0
2
+
∑
m
=
0
∞
[
a
m
c
o
s
(
m
ϕ
)
+
b
m
s
i
n
(
m
ϕ
)
]
{\displaystyle s(\phi )={\frac {a_{0}}{2}}+\sum _{m=0}^{\infty }[a_{m}cos(m\phi )+b_{m}sin(m\phi )]}
[2]
where
a
m
{\displaystyle a_{m}}
and
b
m
{\displaystyle b_{m}}
are real and imaginary components correspondingly to the Fourier transform of the periodic function
s
(
x
)
{\displaystyle s(x)}
.
∙
{\displaystyle \bullet }
WAVELENGTH AND OTHERS Ref {8}
Wavelength of
Y
l
m
{\displaystyle Y_{l}^{m}}
in meridional direction
⇛
λ
(
l
)
=
2
π
l
+
1
2
{\displaystyle \Rrightarrow \lambda (l)={\frac {2\pi }{l+{\frac {1}{2}}}}~~~~}
Does not depend on
m
{\displaystyle m}
It is possible to show that to resolve an object with a certain angular diameter on the retina the system should have Spherical Harmonics whose half of the wavelength in the meridional direction (ALP) and parallel direction (Trigonometric functions) be roughly equal to the angular diameter of the object. The above formula shows that for a visual recognition device with maximum acuity to match the maximum human resolution of 1.0 arc min[3] should have
l
{\displaystyle l}
= 21,600. This amount of index
l
{\displaystyle l}
will give us the whole period. We need to match the half-period to the the angular size of the outside object. That will give us
l
{\displaystyle l}
= 10,800. Since this small object resolution might be considered at the end of the capacity of the system, we may divide this number by at least 5. This will give us the final value of
l
{\displaystyle l}
= 2,160 . Computing Associated Legendre Polynomials with such high degrees is possible with the existing normalized recurrence formulas. With the distance from the North Pole of 2-sphere large, the approximations with trigonometric functions
s
i
n
{\displaystyle sin}
and
c
o
s
{\displaystyle cos}
will work perfectly.
{\displaystyle ~}
There are
2
l
+
1
{\displaystyle 2l+1}
linearly independent eigenfunctions per
l
:
∇
1
2
Y
l
m
=
−
l
(
l
+
1
)
Y
l
m
{\displaystyle l:~~~~\nabla _{1}^{2}Y_{l}^{m}=-l(l+1)Y_{l}^{m}}
R
e
Y
l
m
{\displaystyle Re~Y_{l}^{m}}
vanishes on
2
m
{\displaystyle 2m}
meridians and
l
−
m
{\displaystyle l-m}
parallels;
I
m
Y
l
m
{\displaystyle Im~Y_{l}^{m}}
is the same but rotated around axis
Z
{\displaystyle {\mathcal {Z}}~~}
Those are the roots of
P
l
m
{\displaystyle P_{l}^{m}}
and
c
o
s
m
ϕ
{\displaystyle cosm\phi }
and
s
i
n
m
ϕ
{\displaystyle sinm\phi }
.
Also:
Y
l
−
m
=
(
−
1
)
m
(
Y
l
m
)
∗
{\displaystyle Y_{l}^{-m}=(-1)^{m}(Y_{l}^{m})^{*}}
∙
{\displaystyle \bullet }
PERIODICITY OF TRIGONOMETRIC FUNCTIONS
T
(
c
o
s
k
ϕ
)
≡
T
(
s
i
n
k
ϕ
)
=
2
π
k
{\displaystyle T(cos~k\phi )\equiv T(sin~k\phi )={\frac {2\pi }{k}}}
12.1
∙
{\displaystyle \bullet }
INTERVAL CHANGE
An integral over [a, b] must be changed into an integral over [−1, 1] before applying the Gaussian quadrature rule. This change of interval can be done in the following way:
∫
a
b
f
(
x
)
d
x
=
b
−
a
2
∫
−
1
1
f
(
b
−
a
2
x
+
b
+
a
2
)
d
x
{\displaystyle \int \limits _{a}^{b}{\mathfrak {f}}(x)~dx={\frac {b-a}{2}}\int \limits _{-1}^{1}{\mathfrak {f}}\left({\frac {b-a}{2}}x+{\frac {b+a}{2}}\right)~dx}
13
Applying the Gaussian quadrature rule then results in the following approximation:
∫
a
b
f
(
x
)
d
x
≈
b
−
a
2
∑
i
=
1
n
w
i
f
(
b
−
a
2
x
i
+
a
+
b
2
)
{\displaystyle \int _{a}^{b}f(x)\,dx\approx {\frac {b-a}{2}}\sum _{i=1}^{n}w_{i}f\left({\frac {b-a}{2}}x_{i}+{\frac {a+b}{2}}\right)}
14
I use this formula to integrate along the meridians.
x
i
{\displaystyle x_{i}}
and
w
i
{\displaystyle w_{i}}
are abscissas and weights given in Ref {5}.
SUBSPACES AND ROTATIONS Ref {7}
The key property of this decomposition is that if we restrict to some frequency
l
{\displaystyle {\mathfrak {l}}}
, and define the subspace of functions:
V
l
=
Span
{
Y
l
−
l
,
Y
l
−
l
+
1
,
.
.
.
.
,
Y
l
l
−
1
,
Y
l
l
}
{\displaystyle V_{l}={\text{Span}}\{Y_{l}^{-l},Y_{l}^{-l+1},....,Y_{l}^{l-1},Y_{l}^{l}\}}
15
then:
V
l
{\displaystyle V_{l}}
is a Representation For the Rotation Group : For any function
f
{\displaystyle {\mathfrak {f}}}
∈
V
l
{\displaystyle {\in }V_{l}}
and any rotation R, we have R(
f
{\displaystyle {\mathfrak {f}}}
)
∈
V
l
{\displaystyle {\in }V_{l}}
This can also be expressed in the following manner: if
π
l
{\displaystyle \pi _{l}}
is the projection onto the subspace
V
l
{\displaystyle V_{l}}
then
π
l
{\displaystyle \pi _{l}}
commutes with rotations:
π
l
(
R
(
f
)
)
=
R
(
π
l
(
f
)
)
{\displaystyle \pi _{l}(R({\mathfrak {f}}))=R(\pi _{l}({\mathfrak {f}}))}
16
V
l
{\displaystyle V_{l}}
is Irreducible
V
l
{\displaystyle V_{l}}
cannot be further decomposed as a direct sum
V
l
{\displaystyle V_{l}}
=
V
l
i
{\displaystyle V{_{l}^{i}}}
⊕
V
l
j
{\displaystyle V{_{l}^{j}}}
where
V
l
i
{\displaystyle V{_{l}^{i}}}
and
V
l
j
{\displaystyle V{_{l}^{j}}}
are also (nontrivial) representation of rotation group.
The first property presents a way for decomposing spherical functions into rotation
in variant components, while the second property guarantees that, in a linear sense, this decomposition is optimal
3.2 Rotation Invariant Descriptors
Using the properties of spherical harmonics and the observation that rotation of the spherical harmonics does not change its
L
2
{\displaystyle L_{2}}
-norm we represents the energies of the spherical function f (θ,φ) as:
S
H
(
f
)
=
{
∥
f
0
(
θ
,
ϕ
)
∥
,
∥
f
1
(
θ
,
ϕ
)
∥
,
.
.
.
.
∥
f
l
(
θ
,
ϕ
)
∥
}
{\displaystyle \mathrm {SH} ({\mathfrak {f}})=\{{\parallel f_{0}(\theta ,\phi )\parallel ,\parallel f_{1}(\theta ,\phi )\parallel ,....\parallel f_{l}(\theta ,\phi )\parallel }\}}
17
where
f
l
{\displaystyle {\mathfrak {f}}_{l}}
are frequency components of
f
{\displaystyle {\mathfrak {f}}}
:
f
l
(
θ
,
ϕ
)
≡
π
l
(
f
)
=
∑
m
=
−
l
m
=
+
l
a
l
m
Y
l
m
(
θ
,
ϕ
)
{\displaystyle {\mathfrak {f}}_{l}(\theta ,\phi )\equiv \pi _{l}({\mathfrak {f}})=\sum _{m=-l}^{m=+l}a_{l}^{m}Y_{l}^{m}(\theta ,\phi )~~~~}
18
Parseval's theorem for Spherical Harmonics expansion gives Ref {8}:
∥
f
∥=
∑
l
=
0
∞
[
∑
m
=
−
l
l
|
c
l
m
|
2
]
{\displaystyle \parallel f\parallel =\sum _{l=0}^{\infty }{\Biggl [}\sum _{m=-l}^{l}\left|c_{l}^{m}\right|^{2}{\Biggr ]}}
The term in square brackets gives a power spectrum of
f
{\displaystyle f}
as a function of reciprocal
wavelength or wavenumber (
l
{\displaystyle l}
is sometimes call the spherical wavenumber).
This representation has the property that it is independent of the orientation of the spherical function and therefore constitute a computable invariant . To see this we let R be any rotation and we have:
S
H
(
R
(
f
)
)
=
{
∥
π
0
(
R
(
f
)
)
∥
,
∥
π
1
(
R
(
f
)
)
∥
,
.
.
.
.
}
{\displaystyle \mathrm {SH} (\mathrm {R} ({\mathfrak {f}}))=\{{\parallel \pi _{0}(\mathrm {R} (f))\parallel ,\parallel \pi _{1}(\mathrm {R} (f))\parallel ,....}\}}
19
=
{
∥
R
π
0
(
f
)
∥
,
∥
R
π
1
(
f
)
∥
,
.
.
.
.
}
{\displaystyle \{{\parallel \mathrm {R} \pi _{0}(f)\parallel ,\parallel \mathrm {R} \pi _{1}(f)\parallel ,....}\}}
=
{
∥
π
0
(
f
)
∥
,
∥
π
1
(
f
)
∥
,
.
.
.
.
}
{\displaystyle \{{\parallel \pi _{0}(f)\parallel ,\parallel \pi _{1}(f)\parallel ,....}\}}
=
S
H
(
f
)
{\displaystyle SH({\mathfrak {f}})}
The following is from the Wikipedia article on Spherical Harmonics (with my comments as well):
While computing invariants it may be necessary to take into account the contribution of expansion coefficients with negative m index). This contribution is not linear and cannot simply be discounted. On the other hand you may consider dropping some subset of indices m across the whole range of
−
l
<
m
<
+
l
{\displaystyle -l<m<+l}
, for instance you can drop even or odd m' s or to drop two or three in a row and then use the next one. The only rule must apply: it has to be uniform for negative and positive m' s.
P
ℓ
−
m
(
x
)
=
(
−
1
)
m
(
ℓ
−
m
)
!
(
ℓ
+
m
)
!
P
ℓ
m
(
x
)
{\displaystyle P{_{\ell }^{-m}}(x)=(-1)^{m}{\frac {({\ell }-m)!}{({\ell }+m)!}}P{_{\ell }^{m}}(x)}
20
You can use Stirling approximation to compute large factorials or you can reduce the fraction by noticing that the fraction with factorials will be equal to
(
l
−
m
)
!
(
l
+
m
)
!
=
1
(
l
−
m
+
1
)
(
l
−
m
+
2
)
.
.
.
(
l
+
m
)
{\displaystyle {\frac {(l-m)!}{(l+m)!}}={\frac {1}{(l-m+1)(l-m+2)...(l+m)}}}
21
POWER SPECTRUM IN SIGNAL PROCESSING
The total power of a function
f
{\displaystyle {\mathfrak {f}}}
is defined in the signal processing literature as the integral of the function squared, divided by the area of its domain. Using the orthonormality properties of the real unit-power spherical harmonic functions, it is straightforward to verify that the total power of a function defined on the unit sphere is related to its spectral coefficients by a generalization of Parseval's theorem:
1
4
π
∫
Ω
∥
f
(
Ω
)
∥
2
d
Ω
=
∑
l
=
0
∞
S
f
f
{\displaystyle {\frac {1}{4\pi }}\int _{\Omega }\parallel {\mathfrak {f}}(\Omega )\parallel ^{2}{\mathit {d}}\Omega =\sum \limits _{l=0}^{\infty }S_{ff}}
22
where
S
f
f
(
l
)
=
1
2
l
+
1
∑
m
=
−
l
l
∥
f
l
m
∥
2
{\displaystyle S_{ff}(l)={\frac {1}{2l+1}}\sum \limits _{m=-l}^{l}\parallel f_{lm}\parallel ^{2}}
23
is defined as the angular power spectrum. In a similar manner, one can define the cross-power of two functions as
1
4
π
∫
Ω
f
(
Ω
)
g
∗
(
Ω
)
d
Ω
=
∑
l
=
0
∞
S
f
g
(
l
)
{\displaystyle {\frac {1}{4\pi }}\int _{\Omega }{\mathfrak {f}}(\Omega ){\mathfrak {g^{\ast }}}(\Omega ){\mathit {d}}\Omega =\sum \limits _{l=0}^{\infty }S_{fg}(l)}
24
where
S
f
g
(
l
)
=
1
2
l
+
1
∑
m
=
−
l
l
f
l
m
g
l
m
∗
{\displaystyle S_{fg}(l)={\frac {1}{2l+1}}\sum \limits _{m=-l}^{l}{\mathfrak {f}}_{lm}{\mathfrak {g}}_{lm}^{\ast }}
25
As one can see the previous paragraph is directly related to our two perspectives. Those "total powers of a function" split in ribbons in the vector space with the same degree
l
{\displaystyle l}
are in fact the invariants we must use.
NORMALIZATION (LEGENDRE POLYNOMIALS FIRST):
P
^
l
(
x
)
=
2
l
+
1
2
P
l
(
x
)
{\displaystyle {\hat {P}}_{l}(x)={\sqrt {\frac {2l+1}{2}}}P_{l}(x)}
26
NORMALIZATION (ASSOCIATED LEGENDRE POLYNOMIALS):
I have a few questions concerning orthonormality of Associated Legendre Polynomials (ALP). I want to stress the word orthonormality as opposed to simply orthogonality. The reason for that is computational. It is a well known fact that when ALP with large indices
l
{\displaystyle l}
&
m
{\displaystyle m}
are computed the functional values grow in magnitude to the point that the exponents overflow. Double precision is required and in some cases even quadruple precision is needed. The normalization diminishes the absolute values of the functions considerably but not universally. I want to make sure that I understand normalization correctly. Wikipedia article on ALP gives two formulas.
∫
−
1
1
P
k
m
(
x
)
P
l
m
(
x
)
d
x
=
2
(
l
+
m
)
!
(
2
l
+
1
)
(
l
−
m
)
!
δ
k
,
l
{\displaystyle \int _{-1}^{1}P_{k}^{m}(x)P_{l}^{m}(x)dx={\frac {2(l+m)!}{(2l+1)(l-m)!}}\delta _{k,l}}
27
Thus the normalization factor here will be:
N
l
m
=
(
2
l
+
1
)
(
l
−
m
)
!
2
(
l
+
m
)
!
{\displaystyle N_{l}^{m}={\sqrt {\frac {(2l+1)(l-m)!}{2(l+m)!}}}}
28
Where δk , ℓ is the Kronecker delta .
I call it normalization in respect to
l
{\displaystyle l}
For my task it is more important to normalize in respect to
m
{\displaystyle m}
. It is given by this formula:
∫
−
1
1
P
l
m
(
x
)
P
l
n
(
x
)
(
1
−
x
2
)
d
x
=
(
l
+
m
)
!
m
(
l
−
m
)
!
(
m
=
n
≠
0
)
{\displaystyle \int _{-1}^{1}{\frac {P_{l}^{m}(x)P_{l}^{n}(x)}{(1-x^{2})}}dx={\frac {(l+m)!}{m(l-m)!}}\,\,\,(m=n\neq 0)}
29
The normalization factor for each subspace with a given
l
{\displaystyle l}
but differing
m
{\displaystyle m}
should be this:
N
l
m
=
m
(
l
−
m
)
!
(
l
+
m
)
!
{\displaystyle N_{l}^{m}={\sqrt {\frac {m(l-m)!}{(l+m)!}}}}
30
NORMALIZATION IN ACOUSTICS:
Y
^
l
m
(
θ
,
ϕ
)
=
(
2
l
+
1
)
(
l
−
m
)
!
4
π
(
l
+
m
)
!
P
l
m
(
c
o
s
θ
)
e
i
m
ϕ
{\displaystyle \mathrm {\hat {Y}} _{l}^{m}(\theta ,\phi )={\sqrt {\frac {(2l+1)(l-m)!}{4\pi (l+m)!}}}\mathrm {P} _{l}^{m}(cos\theta )e^{im\phi }}
31
NORMALIZATION IN QUANTUM MECHANICS:
Y
^
l
m
(
θ
,
ϕ
)
=
(
−
1
)
m
(
2
l
+
1
)
(
l
−
m
)
!
4
π
(
l
+
m
)
!
P
l
m
(
c
o
s
θ
)
e
i
m
ϕ
{\displaystyle \mathrm {\hat {Y}} _{l}^{m}(\theta ,\phi )=(-1)^{m}{\sqrt {\frac {(2l+1)(l-m)!}{4\pi (l+m)!}}}\mathrm {P} _{l}^{m}(cos\theta )e^{im\phi }}
31.1
which are orthonormal:
∫
θ
=
0
π
∫
ϕ
=
0
2
π
Y
^
l
m
Y
^
l
′
m
′
d
Ω
=
δ
l
l
′
δ
m
m
′
{\displaystyle \int _{\theta =0}^{\pi }\int _{\phi =0}^{2\pi }{\hat {\mathrm {Y} }}_{l}^{m}{\hat {\mathrm {Y} }}_{l^{\prime }}^{m^{\prime }}d\Omega =\delta _{ll^{\prime }}\delta _{mm^{\prime }}}
32
The
π
{\displaystyle \pi }
in the formula [31] signifies normlalization for trigonometric
e
i
m
ϕ
{\displaystyle e^{im\phi }}
part
∙
{\displaystyle \bullet }
NORMALIZATION PER keisan.casio CALCULATOR [4]
∫
−
1
1
P
n
m
(
x
)
P
n
′
m
(
x
)
d
x
=
2
2
n
+
1
(
n
+
m
)
!
(
n
−
m
)
!
δ
n
n
′
{\displaystyle \int \limits _{-1}^{1}P_{n}^{m}(x)P_{n^{\prime }}^{m}(x)dx={\frac {2}{2n+1}}{\frac {(n+m)!}{(n-m)!}}\delta _{nn^{\prime }}}
33
∫
−
1
1
P
n
m
(
x
)
P
n
m
′
(
x
)
d
x
1
−
x
2
=
(
n
+
m
)
!
m
(
n
−
m
)
!
δ
m
m
′
{\displaystyle \int \limits _{-1}^{1}P_{n}^{m}(x)P_{n}^{m^{\prime }}(x){\frac {dx}{1-x^{2}}}={\frac {(n+m)!}{m(n-m)!}}\delta _{mm^{\prime }}}
34
NORMALIZED ASSOCIATED LEGENDRE POLYNOMIALS WITH NEGATIVE M
P
l
−
m
(
x
)
=
(
−
1
)
m
(
l
−
m
)
!
(
l
+
m
)
!
P
l
m
(
x
)
{\displaystyle P_{l}^{-m}(x)=(-1)^{m}{\frac {(l-m)!}{(l+m)!}}P_{l}^{m}(x)}
35
Multiplying both sides by normalization coefficients:
N
l
m
=
(
2
l
+
1
)
(
l
−
m
)
!
2
(
l
+
m
)
!
;
N
l
−
m
=
(
2
l
+
1
)
(
l
+
m
)
!
2
(
l
−
m
)
!
{\displaystyle N_{l}^{m}={\sqrt {\frac {(2l+1)(l-m)!}{2(l+m)!}}};~~~~N_{l}^{-m}={\sqrt {\frac {(2l+1)(l+m)!}{2(l-m)!}}}}
36
we get:
P
^
l
−
m
=
(
−
1
)
m
P
^
l
m
{\displaystyle {\hat {P}}_{l}^{-m}=(-1)^{m}{\hat {P}}_{l}^{m}}
37
P
l
l
(
x
)
=
(
−
1
)
l
(
2
l
−
1
)
!
!
(
1
−
x
2
)
l
/
2
{\displaystyle P_{l}^{l}(x)=(-1)^{l}(2l-1)!!(1-x^{2})^{l/2}}
38
P
m
+
1
m
(
x
)
=
x
(
2
m
+
1
)
P
m
m
(
x
)
{\displaystyle P_{m+1}^{m}(x)=x(2m+1)P_{m}^{m}(x)}
39
|||****************************************************|||
P
l
+
1
l
+
1
(
x
)
=
−
(
2
l
+
1
)
1
−
x
2
P
l
l
(
x
)
{\displaystyle P_{l+1}^{l+1}(x)=-(2l+1){\sqrt {1-x^{2}}}P_{l}^{l}(x)}
40
Taking into account that 0! = 1 the normalization factors in both
P
l
l
(
x
)
{\displaystyle P_{l}^{l}(x)}
and
P
l
+
1
l
+
1
(
x
)
{\displaystyle P_{l+1}^{l+1}(x)}
should be
N
l
l
=
2
l
+
1
2
(
2
l
)
!
{\displaystyle ~~~~~~~N_{l}^{l}={\sqrt {\frac {2l+1}{2(2l)!}}}}
and
N
l
+
1
l
+
1
=
2
l
+
3
2
(
2
l
+
2
)
!
{\displaystyle ~~~~~~~~N_{l+1}^{l+1}={\sqrt {\frac {2l+3}{2(2l+2)!}}}}
41
Multiplying both sides of the equation [40] we get:
P
^
l
+
1
l
+
1
(
x
)
=
−
(
1
−
x
2
)
(
2
l
+
3
)
2
l
+
2
P
^
l
l
(
x
)
{\displaystyle {\hat {P}}_{l+1}^{l+1}(x)=-{\sqrt {\frac {(1-x^{2})(2l+3)}{2l+2}}}{\hat {P}}_{l}^{~l}(x)}
42
where polynomials are normalized.
|||******************************************************|||
The next formula ([43]) is easily derived from [40] by saying
n
=
l
+
1
{\displaystyle n=l+1}
:
P
l
l
(
x
)
=
−
(
2
l
−
1
)
1
−
x
2
P
l
−
1
l
−
1
(
x
)
{\displaystyle P_{l}^{l}(x)=-(2l-1){\sqrt {1-x^{2}}}P_{l-1}^{l-1}(x)}
43
Likewise multiplying the expression [40] by it's appropriate normalization coefficients
N
l
l
{\displaystyle ~N_{l}^{l}~}
[38] and:
N
l
−
1
l
−
1
=
2
l
−
1
2
(
2
l
−
2
)
!
{\displaystyle N_{l-1}^{l-1}={\sqrt {\frac {2l-1}{2(2l-2)!}}}}
44
we get:
P
^
l
l
(
x
)
=
−
(
2
l
+
1
)
(
1
−
x
2
)
2
l
P
^
l
−
1
l
−
1
(
x
)
{\displaystyle {\hat {P}}_{l}^{l}(x)=-{\sqrt {\frac {(2l+1)(1-x^{2})}{2l}}}{\hat {P}}_{l-1}^{l-1}(x)}
45
[45] is implemented as highOrder_ALP_LeqM_Norm . Matches Belousov's values.
|||******************************************************|||
P
n
(
x
)
=
∑
m
=
0
M
(
−
1
)
m
(
n
!
(
2
n
)
!
)
(
2
n
−
2
m
)
!
m
!
(
n
−
m
)
!
(
n
−
2
m
)
!
x
n
−
2
m
{\displaystyle P_{n}(x)=\sum _{m=0}^{M}(-1)^{m}{\Biggl (}{\frac {n!}{(2n)!}}{\Biggl )}{\frac {(2n-2m)!}{m!(n-m)!(n-2m)!}}x^{n-2m}}
46
where
M
=
n
2
{\displaystyle M={\frac {n}{2}}}
or
M
=
(
n
−
1
)
2
{\displaystyle M={\frac {(n-1)}{2}}}
47
depending on
n
{\displaystyle n}
being even or odd
|||******************************************************|||
MOVING UP ALONG INCREASING
l
{\displaystyle l}
with
m
=
0
{\displaystyle m=0}
(non-associated Legendre polynomials)
P
l
(
x
)
=
(
2
l
−
1
)
x
P
l
−
1
(
x
)
−
(
l
−
1
)
P
l
−
2
(
x
)
l
{\displaystyle P_{l}(x)={\frac {(2l-1)xP_{l-1}(x)-(l-1)P_{l-2}(x)}{l}}}
48
To normalize [48] we need to multiply both sides with three normalization coefficients:
N
l
=
2
l
+
1
2
;
N
l
−
1
=
2
l
−
1
2
;
N
l
−
2
=
2
l
−
3
2
{\displaystyle N_{l}={\sqrt {\frac {2l+1}{2}}};~~~~N_{l-1}={\sqrt {\frac {2l-1}{2}}};~~~~N_{l-2}={\sqrt {\frac {2l-3}{2}}}}
49
The result is <verified 11/26/16>:
P
^
l
(
x
)
=
x
(
4
l
2
−
1
)
(
2
l
−
3
)
P
^
l
−
1
(
x
)
−
(
l
−
1
)
2
l
+
1
P
^
l
−
2
(
x
)
l
2
l
−
3
{\displaystyle {\hat {P}}_{l}(x)={\frac {x{\sqrt {(4l^{2}-1)(2l-3)}}{\hat {P}}_{l-1}(x)-(l-1){\sqrt {2l+1}}{\hat {P}}_{l-2}(x)}{l{\sqrt {2l-3}}}}}
50
|||******************************************************|||
MOVING ALONG INCREASING INDEXES
m
{\displaystyle m}
TO THE RIGHT (INCREASING INDEX
m
{\displaystyle m}
AND CONSTANT INDEX
l
{\displaystyle l}
)
Take a Wikipedia formula (second in the column) [5]
2
m
x
P
l
m
(
x
)
=
−
1
−
x
2
[
P
l
m
+
1
(
x
)
+
(
l
+
m
)
(
l
−
m
+
1
)
P
l
m
−
1
(
x
)
]
{\displaystyle 2mxP_{l}^{m}(x)=-{\sqrt {1-x^{2}}}{\biggr [}P_{l}^{m+1}(x)+(l+m)(l-m+1)P_{l}^{m-1}(x){\biggr ]}}
51
is modified by saying
n
=
m
+
1
{\displaystyle n=m+1}
(rechecked 11/20/16):
The result is (Moving along indices M to the right, in the direction of increasing index M):
P
l
m
(
x
)
=
−
[
2
(
m
−
1
)
x
P
l
m
−
1
(
x
)
1
−
x
2
+
(
l
+
m
−
1
)
(
l
−
m
+
2
)
P
l
m
−
2
(
x
)
]
{\displaystyle P_{l}^{m}(x)=-{\Biggr [}{\frac {2(m-1)xP_{l}^{m-1}(x)}{\sqrt {1-x^{2}}}}+(l+m-1)(l-m+2)P_{l}^{m-2}(x){\Biggr ]}}
52
Formula [52] checked again on 12/09/17
Multiplying both sides of the equation [52] by normalization factors
N
l
m
=
(
2
l
+
1
)
(
l
−
m
)
!
2
(
l
+
m
)
!
;
N
l
m
−
1
=
(
2
l
+
1
)
(
l
−
m
+
1
)
!
2
(
l
+
m
−
1
)
!
;
N
l
m
−
2
=
(
2
l
+
1
)
(
l
−
m
+
2
)
!
2
(
l
+
m
−
2
)
!
{\displaystyle N_{l}^{m}={\sqrt {\frac {(2l+1)(l-m)!}{2(l+m)!}}};~~~~N_{l}^{m-1}={\sqrt {\frac {(2l+1)(l-m+1)!}{2(l+m-1)!}}};~~~~N_{l}^{m-2}={\sqrt {\frac {(2l+1)(l-m+2)!}{2(l+m-2)!}}}}
53
and simplifying we get:
P
^
l
m
(
x
)
=
−
2
(
m
−
1
)
(
1
−
x
2
)
1
(
l
+
m
)
(
l
−
m
+
1
)
x
P
^
l
m
−
1
(
x
)
−
(
l
+
m
−
1
)
(
l
−
m
+
2
)
(
l
+
m
)
(
l
−
m
+
1
)
P
^
l
m
−
2
(
x
)
{\displaystyle {\hat {P}}_{l}^{m}(x)=-{\frac {2(m-1)}{\sqrt {(1-x^{2})}}}{\sqrt {\frac {1}{(l+m)(l-m+1)}}}x{\hat {P}}_{l}^{m-1}(x)~-~{\sqrt {\frac {(l+m-1)(l-m+2)}{(l+m)(l-m+1)}}}{\hat {P}}_{l}^{m-2}(x)}
54
or simplifying again:
P
^
l
m
(
x
)
=
−
1
(
l
+
m
)
(
l
−
m
+
1
)
{
2
(
m
−
1
)
x
P
^
l
m
−
1
(
x
)
1
−
x
2
+
(
l
+
m
−
1
)
(
l
−
m
+
2
)
P
^
l
m
−
2
(
x
)
}
{\displaystyle {\hat {P}}_{l}^{~m}(x)=-{\sqrt {\frac {1}{(l+m)(l-m+1)}}}~~{\Biggl \{}{\frac {2(m-1)x{\hat {P}}_{l}^{~m-1}(x)}{\sqrt {1-x^{2}}}}+{\sqrt {(l+m-1)(l-m+2)}}{\hat {P}}_{l}^{~m-2}(x){\Biggr \}}}
55
where
P
^
{\displaystyle {\hat {P}}}
is a normalized Associated Legendre Polynomial (normalized in respect to
l
{\displaystyle l}
)
NORMALIZATION OF EXPRESSION [52] IN RESPECT TO
m
{\displaystyle m}
:
N
l
m
=
m
(
l
−
m
)
!
(
l
+
m
)
!
(
1
−
x
2
)
;
N
l
m
−
1
=
(
m
−
1
)
(
l
−
m
+
1
)
!
(
l
+
m
−
1
)
!
(
1
−
x
2
)
;
N
l
m
−
2
=
(
m
−
2
)
(
l
−
m
+
2
)
!
(
l
+
m
−
2
)
!
(
1
−
x
2
)
{\displaystyle N_{l}^{m}={\sqrt {\frac {m(l-m)!}{(l+m)!(1-x^{2})}}};~~~~N_{l}^{m-1}={\sqrt {\frac {(m-1)(l-m+1)!}{(l+m-1)!(1-x^{2})}}};~~~~N_{l}^{m-2}={\sqrt {\frac {(m-2)(l-m+2)!}{(l+m-2)!(1-x^{2})}}}}
56
P
^
l
m
(
x
)
=
−
m
(
m
−
2
)
(
l
+
m
)
(
l
−
m
+
1
)
[
2
x
(
m
−
1
)
(
m
−
2
)
1
−
x
2
P
^
l
m
−
1
(
x
)
+
(
l
+
m
−
1
)
(
l
−
m
+
2
)
P
^
l
m
−
2
(
x
)
]
{\displaystyle {\hat {P}}_{l}^{m}(x)=-{\sqrt {\frac {m}{(m-2)(l+m)(l-m+1)}}}{\biggl [}2x{\sqrt {\frac {(m-1)(m-2)}{1-x^{2}}}}{\hat {P}}_{l}^{m-1}(x)+{\sqrt {(l+m-1)(l-m+2)}}{\hat {P}}_{l}^{m-2}(x){\biggr ]}}
57
where
P
^
l
m
(
x
)
{\displaystyle {\hat {P}}_{l}^{m}(x)}
is an Associated Legendre Polynomial degree
l
{\displaystyle l}
and order
m
{\displaystyle m}
normalized in respect to
m
{\displaystyle m}
|||******************************************************|||
MOVING ALONG INDEXES
m
{\displaystyle m}
TO THE LEFT (IN THE DIRECTION OF DECREASING INDEXES
m
{\displaystyle m}
) <rechecked 11/20/16>:
Again taking as a source the Wikipedia formula (second formula from the top of the column)
2
m
x
P
l
m
(
x
)
=
−
1
−
x
2
[
P
l
m
+
1
(
x
)
+
(
l
+
m
)
(
l
−
m
+
1
)
P
l
m
−
1
(
x
)
]
{\displaystyle 2mxP_{l}^{m}(x)=-{\sqrt {1-x^{2}}}{\biggr [}P_{l}^{m+1}(x)+(l+m)(l-m+1)P_{l}^{m-1}(x){\biggr ]}}
51
We substitute
n
=
m
−
1
;
m
=
n
+
1
;
m
+
1
=
n
+
2
{\displaystyle n=m-1;~~m=n+1;~~m+1=n+2}
and after a simple transformation we get:
P
l
m
(
x
)
=
−
1
(
l
+
m
+
1
)
(
l
−
m
)
[
2
(
m
+
1
)
x
P
l
m
+
1
(
x
)
1
−
x
2
+
P
l
m
+
2
(
x
)
]
{\displaystyle P_{l}^{m}(x)=-{\frac {1}{(l+m+1)(l-m)}}{\biggr [}{\frac {2(m+1)xP_{l}^{m+1}(x)}{\sqrt {1-x^{2}}}}+P_{l}^{m+2}(x){\biggr ]}}
58
{\displaystyle ~~~~~}
[58] is verified on 12/10/2017
To normalize we multiply all three terms sequentially by normalization factors:
N
l
m
=
(
2
l
+
1
)
(
l
−
m
)
!
2
(
l
+
m
)
!
;
N
l
m
+
1
=
(
2
l
+
1
)
(
l
−
m
−
1
)
!
2
(
l
+
m
+
1
)
!
;
N
l
m
+
2
=
(
2
l
+
1
)
(
l
−
m
−
2
)
!
2
(
l
+
m
+
2
)
!
{\displaystyle N_{l}^{m}={\sqrt {\frac {(2l+1)(l-m)!}{2(l+m)!}}};~~~~N_{l}^{m+1}={\sqrt {\frac {(2l+1)(l-m-1)!}{2(l+m+1)!}}};~~~~N_{l}^{m+2}={\sqrt {\frac {(2l+1)(l-m-2)!}{2(l+m+2)!}}}}
59
As a result we have <verified 11/20/16, and again 11/24/16>:
P
^
l
m
(
x
)
=
−
1
(
l
+
m
+
1
)
(
l
−
m
)
[
2
(
m
+
1
)
x
P
^
l
m
+
1
(
x
)
1
−
x
2
+
(
l
−
m
−
1
)
(
l
+
m
+
2
)
P
^
l
m
+
2
(
x
)
]
{\displaystyle {\hat {P}}_{l}^{m}(x)=-{\frac {1}{\sqrt {(l+m+1)(l-m)}}}{\biggr [}{\frac {2(m+1)x{\hat {P}}_{l}^{m+1}(x)}{\sqrt {1-x^{2}}}}~~{\color {red}+}~~{\sqrt {(l-m-1)(l+m+2)}}{\hat {P}}_{l}^{m+2}(x){\biggr ]}}
60
FORMULA 60 IS INCORRECT
The following formula taken from Ref {3}
u
=
s
i
n
θ
;
t
=
c
o
s
θ
{\displaystyle ~~~~~~u=sin\theta ;~~~~t=cos\theta }
P
^
l
m
(
θ
)
=
1
j
{
g
l
m
t
u
P
^
l
m
−
1
(
θ
)
−
h
l
m
P
^
l
m
−
2
(
θ
)
}
{\displaystyle {\hat {P}}_{l}^{~m}(\theta )={\frac {1}{\sqrt {j}}}{\Biggl \{}g_{l}^{m}{\frac {t}{u}}{\hat {P}}_{l}^{~m-1}(\theta )-h_{l}^{m}{\hat {P}}_{l}^{~m-2}(\theta ){\Biggl \}}}
18 - Clenshaw; 62 here
j
=
2
{\displaystyle ~~~~~~j=2}
for
m
=
0
{\displaystyle m=0}
and
j
=
1
{\displaystyle j=1}
for
m
>
0
{\displaystyle m>0~~~~}
using
g
l
m
=
2
(
m
+
1
)
(
l
−
m
)
(
l
+
m
+
1
)
{\displaystyle ~~~~~~g_{l}^{m}={\frac {2(m+1)}{\sqrt {(l-m)(l+m+1)}}}~~~~~~~~~~~~~~}
and
h
l
m
=
(
l
+
m
+
2
)
(
l
−
m
−
1
)
(
l
−
m
)
(
l
+
m
+
1
)
{\displaystyle ~~~~~~h_{l}^{m}={\sqrt {\frac {(l+m+2)(l-m-1)}{(l-m)(l+m+1)}}}~~~~~~}
we get:
P
^
l
m
(
c
o
s
θ
)
=
1
j
(
l
−
m
)
(
l
+
m
+
1
)
{
2
(
m
+
1
)
c
o
s
θ
s
i
n
θ
P
^
l
m
+
1
(
c
o
s
θ
)
−
(
l
−
m
−
1
)
(
l
+
m
+
2
)
P
^
l
m
+
2
(
c
o
s
θ
)
}
{\displaystyle {\hat {P}}_{l}^{~m}(cos\theta )={\frac {1}{\sqrt {j(l-m)(l+m+1)}}}{\Biggl \{}{\frac {2(m+1)cos\theta }{sin\theta }}{\hat {P}}_{l}^{~m+1}(cos\theta )~~{\color {red}-}~~{\sqrt {(l-m-1)(l+m+2)}}{\hat {P}}_{l}^{~m+2}(cos\theta ){\Biggl \}}}
62
FORMULA 62 IS CORRECT
OBVIOUSLY THERE IS DIFFERENCE IN SIGNS BETWEEN MY DERIVATION AND CLENSHAW'S
|||******************************************************|||
Taking the first Wikipedia recurrence formula (also formula [76] here):
(
l
−
m
+
1
)
P
l
+
1
m
(
x
)
=
x
(
2
l
+
1
)
P
l
m
(
x
)
−
(
l
+
m
)
P
l
−
1
m
(
x
)
{\displaystyle (l-m+1)P_{l+1}^{m}(x)=x(2l+1)P_{l}^{m}(x)-(l+m)P_{l-1}^{m}(x)}
63
saying
n
=
l
+
1
{\displaystyle n=l+1}
and substituting we get:
(
l
−
m
)
P
l
m
(
x
)
=
x
(
2
l
−
1
)
P
l
−
1
m
(
x
)
−
(
l
+
m
−
1
)
P
l
−
2
m
(
x
)
{\displaystyle (l-m)P_{l}^{m}(x)=x(2l-1)P_{l-1}^{m}(x)-(l+m-1)P_{l-2}^{m}(x)}
64
Recurrence formula (B.8 ) [6]
P
l
m
(
x
)
=
x
(
2
l
−
1
)
l
−
m
P
l
−
1
m
(
x
)
−
l
+
m
−
1
l
−
m
P
l
−
2
m
(
x
)
{\displaystyle P_{l}^{m}(x)={\frac {x(2l-1)}{l-m}}P_{l-1}^{m}(x)-{\frac {l+m-1}{l-m}}P_{l-2}^{m}(x)}
65
The factors to normalize the recurrence [52] are [49], first formula above and:
N
l
−
1
m
=
(
2
l
−
1
)
(
l
−
m
−
1
)
!
2
(
l
+
m
−
1
)
!
;
N
l
−
2
m
=
(
2
l
−
3
)
(
l
−
m
−
2
)
!
2
(
l
+
m
−
2
)
!
{\displaystyle N_{l-1}^{m}={\sqrt {\frac {(2l-1)(l-m-1)!}{2(l+m-1)!}}};~~~~N_{l-2}^{m}={\sqrt {\frac {(2l-3)(l-m-2)!}{2(l+m-2)!}}}}
66
Applying them to equation [52] we get:
P
^
l
m
(
x
)
=
x
(
4
l
2
−
1
)
(
l
−
m
)
P
^
l
−
1
m
(
x
)
−
(
l
+
m
−
1
)
(
2
l
+
1
)
(
l
−
m
−
1
)
(
l
2
−
m
2
)
(
2
l
−
3
)
P
^
l
−
2
m
(
x
)
{\displaystyle {\hat {P}}_{l}^{m}(x)=x{\sqrt {(4l^{2}-1)(l-m)}}{\hat {P}}_{l-1}^{m}(x)-{\sqrt {\frac {(l+m-1)(2l+1)(l-m-1)}{(l^{2}-m^{2})(2l-3)}}}{\hat {P}}_{l-2}^{m}(x)}
67
|||******************************************************|||
Also recurrence formulas (Wikipedia: Associated Legendre Polynomials; 7th formula from the top of the column):
1
−
x
2
P
l
m
+
1
(
x
)
=
(
l
−
m
)
x
P
l
m
(
x
)
−
(
l
+
m
)
P
l
−
1
m
(
x
)
{\displaystyle {\sqrt {1-x^{2}}}P_{l}^{m+1}(x)=(l-m)xP_{l}^{m}(x)~-~(l+m)P_{l-1}^{m}(x)}
68
Assuming
m
=
0
{\displaystyle m=0}
in formula [55], the value of
P
l
1
{\displaystyle P_{l}^{1}}
might be easily calculated
P
l
1
(
x
)
=
l
x
P
l
(
x
)
−
l
P
l
−
1
(
x
)
1
−
x
2
{\displaystyle P_{l}^{1}(x)={\frac {l~x~P_{l}(x)~-~l~P_{l-1}(x)}{\sqrt {1-x^{2}}}}}
69
To get normalized polynomials three factors are needed:
N
l
1
=
(
2
l
+
1
)
2
l
(
l
+
1
)
;
N
l
=
2
l
+
1
2
;
N
l
−
1
=
2
l
−
1
2
{\displaystyle N_{l}^{1}={\sqrt {\frac {(2l+1)}{2l(l+1)}}};~~~~~N_{l}={\sqrt {\frac {2l+1}{2}}};~~~~~N_{l-1}={\sqrt {\frac {2l-1}{2}}}}
70
Applying them consecutively we eventually get:
P
^
l
1
(
x
)
=
l
2
l
−
1
x
P
^
l
(
x
)
−
2
l
+
1
P
^
l
−
1
(
x
)
(
2
l
−
1
)
(
l
+
1
)
(
1
−
x
2
)
{\displaystyle {\hat {\mathsf {P}}}_{l}^{~1}(x)={\sqrt {l}}~{\frac {{\sqrt {2l-1}}x{\hat {\mathsf {P}}}_{l}(x)-{\sqrt {2l+1}}{\hat {\mathsf {P}}}_{l-1}(x)}{\sqrt {(2l-1)(l+1)(1-x^{2})}}}}
71
Which connects normalized Legendre polynomials we need to apply formula [54] to move along the horizontal row of indexes M from left to right.
|||******************************************************|||
Formula
P
l
+
1
l
(
x
)
=
x
(
2
l
+
1
)
P
l
l
(
x
)
{\displaystyle P_{l+1}^{l}(x)=x(2l+1)P_{l}^{l}(x)}
72
is normalized with sequential multiplication by two normalizing factors derived from [28]:
N
l
l
=
2
l
+
1
2
(
2
l
)
!
;
N
l
+
1
l
=
2
l
+
3
2
(
2
l
+
1
)
!
{\displaystyle N_{l}^{l}={\sqrt {\frac {2l+1}{2(2l)!}}};~~~~N_{l+1}^{l}={\sqrt {\frac {2l+3}{2(2l+1)!}}}}
73
The result is:
P
^
l
+
1
l
(
x
)
=
2
l
+
3
x
P
^
l
l
(
x
)
{\displaystyle {\hat {P}}_{l+1}^{~l}(x)={\sqrt {2l+3}}~x{\hat {P}}_{l}^{~l}(x)}
74
or:
P
^
l
l
−
1
(
x
)
=
2
l
+
1
x
P
^
l
−
1
l
−
1
(
x
)
{\displaystyle {\hat {P}}_{l}^{~l-1}(x)={\sqrt {2l+1}}~x{\hat {P}}_{l-1}^{~l-1}(x)}
75
|||******************************************************|||
Original Wikipedia formula (the first formula in the column):
(
l
−
m
+
1
)
P
l
+
1
m
(
x
)
=
(
2
l
+
1
)
x
P
l
m
(
x
)
−
(
l
+
m
)
P
l
−
1
m
(
x
)
{\displaystyle (l-m+1)P_{l+1}^{m}(x)=(2l+1)xP_{l}^{m}(x)-(l+m)P_{l-1}^{m}(x)}
76
assuming
n
=
l
+
1
{\displaystyle n=l+1}
P
l
m
(
x
)
=
1
l
−
m
{
(
2
l
−
1
)
x
P
l
−
1
m
(
x
)
−
(
l
+
m
−
1
)
P
l
−
2
m
(
x
)
}
{\displaystyle P_{l}^{m}(x)={\frac {1}{l-m}}{\Biggl \{}(2l-1)xP_{l-1}^{m}(x)-(l+m-1)P_{l-2}^{m}(x){\Biggl \}}}
77
Multiplying both sides of [76] sequentially by normalization factors:
N
l
m
=
(
2
l
+
1
)
(
l
−
m
)
!
2
(
l
+
m
)
!
;
N
l
−
1
m
=
(
2
l
−
1
)
(
l
−
m
−
1
)
!
2
(
l
+
m
−
1
)
!
;
N
l
−
2
m
=
(
2
l
−
3
)
(
l
−
m
−
2
)
!
2
(
l
+
m
−
2
)
!
{\displaystyle ~~~~~~N_{l}^{m}={\sqrt {\frac {(2l+1)(l-m)!}{2(l+m)!}}};~~~~N_{l-1}^{m}={\sqrt {\frac {(2l-1)(l-m-1)!}{2(l+m-1)!}}};~~~~N_{l-2}^{m}={\sqrt {\frac {(2l-3)(l-m-2)!}{2(l+m-2)!}}}}
we get:
P
^
l
m
(
x
)
=
4
l
2
−
1
l
2
−
m
2
x
P
^
l
−
1
m
(
x
)
−
(
l
+
m
−
1
)
(
l
−
m
−
1
)
(
2
l
+
1
)
(
l
2
−
m
2
)
(
2
l
−
3
)
P
^
l
−
2
m
(
x
)
{\displaystyle {\hat {P}}_{l}^{~m}(x)={\sqrt {\frac {4l^{2}-1}{l^{2}-m^{2}}}}x{\hat {P}}_{l-1}^{~m}(x)-{\sqrt {\frac {(l+m-1)(l-m-1)(2l+1)}{(l^{2}-m^{2})(2l-3)}}}{\hat {P}}_{l-2}^{~m}(x)}
78
Ref {3} again:
P
^
l
m
(
θ
)
=
c
o
s
θ
a
l
m
P
^
l
−
1
m
(
θ
)
−
b
l
m
P
^
l
−
2
m
(
θ
)
{\displaystyle {\hat {P}}_{l}^{~m}(\theta )=cos\theta ~a_{l}^{m}{\hat {P}}_{l-1}^{~m}(\theta )-b_{l}^{m}{\hat {P}}_{l-2}^{~m}(\theta )}
11 - Clenshaw; 78 here
Substituting:
a
l
m
=
(
2
l
−
1
)
(
2
l
+
1
)
(
l
−
m
)
(
l
+
m
)
{\displaystyle a_{l}^{m}={\sqrt {\frac {(2l-1)(2l+1)}{(l-m)(l+m)}}}~~~~~~~~}
and
b
l
m
=
(
2
l
+
1
)
(
l
+
m
−
1
)
(
l
−
m
+
1
)
(
l
−
m
)
(
l
+
m
)
(
2
l
+
3
)
{\displaystyle b_{l}^{m}={\sqrt {\frac {(2l+1)(l+m-1)(l-m+1)}{(l-m)(l+m)(2l+3)}}}}
P
^
l
m
(
θ
)
=
2
l
+
1
l
2
−
m
2
{
2
l
−
1
c
o
s
θ
P
^
l
−
1
m
(
θ
)
−
(
l
+
m
−
1
)
(
l
−
m
−
1
)
2
l
−
3
P
^
l
−
2
m
(
θ
)
}
{\displaystyle {\hat {P}}_{l}^{~m}(\theta )={\sqrt {\frac {2l+1}{l^{2}-m^{2}}}}{\Biggl \{}{\sqrt {2l-1}}cos\theta {\hat {P}}_{l-1}^{~m}(\theta )-{\sqrt {\frac {(l+m-1)(l-m-1)}{2l-3}}}{\hat {P}}_{l-2}^{~m}(\theta ){\Biggl \}}}
79
|||******************************************************|||
Belousov's formula ([17]):
P
^
l
m
(
c
o
s
θ
)
=
(
2
l
+
1
)
(
l
+
m
−
1
)
(
l
+
m
−
3
)
(
2
l
−
3
)
(
l
+
m
)
(
l
+
m
−
2
)
P
^
l
−
2
m
−
2
(
c
o
s
θ
)
−
(
2
l
+
1
)
(
l
+
m
−
1
)
(
l
−
m
+
1
)
(
2
l
−
1
)
(
l
+
m
)
(
l
+
m
−
2
)
c
o
s
θ
P
^
l
−
1
m
−
2
(
c
o
s
θ
)
{\displaystyle {\hat {P}}_{l}^{~m}(cos\theta )={\sqrt {\frac {(2l+1)(l+m-1)(l+m-3)}{(2l-3)(l+m)(l+m-2)}}}{\hat {P}}_{l-2}^{~m-2}(cos\theta )-{\sqrt {\frac {(2l+1)(l+m-1)(l-m+1)}{(2l-1)(l+m)(l+m-2)}}}cos\theta {\hat {P}}_{l-1}^{~m-2}(cos\theta )}
+
(
2
l
+
1
)
(
l
−
m
)
(
2
l
−
1
)
(
l
+
m
)
c
o
s
θ
P
^
l
−
1
m
(
c
o
s
θ
)
{\displaystyle ~~~~~~~~~~~~~~+{\sqrt {\frac {(2l+1)(l-m)}{(2l-1)(l+m)}}}cos\theta {\hat {P}}_{l-1}^{~m}(cos\theta )}
80
|||******************************************************|||
Efficient Spherical Harmonics Transform aimed at pseudo-spectral numerical simulations by Nathanael Schaeffer.
P
^
ℓ
m
(
x
)
=
4
ℓ
2
−
1
ℓ
2
−
m
2
x
P
^
ℓ
−
1
m
(
x
)
−
(
2
ℓ
+
1
)
[
(
ℓ
−
1
)
2
−
m
2
]
(
2
ℓ
−
3
)
(
ℓ
2
−
m
2
)
P
^
ℓ
−
2
m
(
x
)
{\displaystyle {\hat {P}}_{\ell }^{~m}(x)={\sqrt {\frac {4{\ell }^{2}-1}{{\ell }^{2}-m^{2}}}}x{\hat {P}}_{\ell -1}^{~m}(x)-{\sqrt {\frac {(2\ell +1)\left[(\ell -1)^{2}-m^{2}\right]}{(2\ell -3)(\ell ^{2}-m^{2})}}}{\hat {P}}_{\ell -2}^{~m}(x)}
80.1
or:
P
^
ℓ
m
(
x
)
=
2
ℓ
+
1
ℓ
2
−
m
2
[
2
ℓ
−
1
x
P
^
ℓ
−
1
m
(
x
)
−
(
ℓ
−
1
)
2
−
m
2
2
ℓ
−
3
P
^
ℓ
−
2
m
]
{\displaystyle {\hat {P}}_{\ell }^{~m}(x)={\sqrt {\frac {2{\ell }+1}{{\ell }^{2}-m^{2}}}}{\Biggl [}{\sqrt {2\ell -1}}x{\hat {P}}_{\ell -1}^{~m}(x)-{\sqrt {\frac {(\ell -1)^{2}-m^{2}}{2\ell -3}}}{\hat {P}}_{\ell -2}^{~m}{\Biggr ]}}
80.2
with:
a
m
m
=
1
4
π
∏
k
=
1
|
m
|
2
k
+
1
2
k
{\displaystyle a_{m}^{m}={\sqrt {{\frac {1}{4\pi }}\prod _{k=1}^{|m|}{\frac {2k+1}{2k}}}}}
80.3
|||******************************************************|||
Taking this Wikipedia formula as a basis to compute the first derivative of ALP's:
(
x
2
−
1
)
d
d
x
P
ℓ
m
(
x
)
=
1
−
x
2
P
ℓ
m
+
1
(
x
)
+
m
x
P
ℓ
m
(
x
)
{\displaystyle (x^{2}-1){\frac {d}{dx}}{P_{\ell }^{m}}(x)={\sqrt {1-x^{2}}}P_{\ell }^{m+1}(x)+mxP_{\ell }^{m}(x)}
81
Multiplying sequentially by two normalization factors [59 - first] and [59 - second] we get
d
d
x
P
^
ℓ
m
(
x
)
=
−
[
(
l
−
m
)
(
l
+
m
+
1
)
1
−
x
2
P
^
ℓ
m
+
1
(
x
)
+
m
x
P
^
ℓ
m
(
x
)
1
−
x
2
]
{\displaystyle {\frac {d}{dx}}{{\hat {P}}_{\ell }^{~m}}(x)=-{\Biggl [}{\sqrt {\frac {(l-m)(l+m+1)}{1-x^{2}}}}{\hat {P}}_{\ell }^{~m+1}(x)+mx{\frac {{\hat {P}}_{\ell }^{~m}(x)}{1-x^{2}}}{\Biggl ]}}
82
|||******************************************************|||
max
|
P
n
m
(
x
)
|
≤
1
2
(
n
+
m
)
!
(
n
−
m
)
!
{\displaystyle \max {\left\vert P_{n}^{m}(x)\right\vert }\leq {1 \over {\sqrt {2}}}{\sqrt {\frac {(n+m)!}{(n-m)!}}}}
83
After normalization (formula [28]):
max
|
P
^
n
m
(
x
)
|
≤
2
l
+
1
2
{\displaystyle ~~~~~~\max {\left\vert {\hat {P}}_{n}^{m}(x)\right\vert }\leq {\sqrt {\frac {2l+1}{2}}}}
Contribution by Quondum in response to my post in Math Section under the heading "DETERMINANT:"
If you want to describe an arc from
X
1
{\displaystyle \mathbf {X_{1}} }
and
X
2
{\displaystyle \mathbf {X_{2}} }
can't you just say that:
A
3
=
s
X
1
+
(
1
−
s
)
X
2
{\displaystyle \mathbf {A_{3}} =s\,\mathbf {X_{1}} +(1-s)\,\mathbf {X_{2}} }
and
X
3
=
A
3
‖
A
3
‖
R
{\displaystyle \mathbf {X_{3}} ={\mathbf {A_{3}} \over \lVert \mathbf {A_{3}} \rVert }R}
84
where s is an arbitrary new parameter that runs from 0 to 1 and R is the radius of the sphere. Then in a cartesian representation
A
3
(
s
)
{\displaystyle \mathbf {A_{3}} (s)}
describes a secant In through the sphere, and the re scaling projects that path to the surface, hence defining an arc. It will break down if the starting points are exact antipodes, but that case if pretty ill-defined anyway.
This can be extended to the case of a rectangle defined by
X
1
,
X
2
,
X
3
,
X
4
{\displaystyle \mathbf {X_{1}} ,\mathbf {X_{2}} ,\mathbf {X_{3}} ,\mathbf {X_{4}} }
by introducing a second parameter t :
A
5
=
t
(
s
X
1
+
(
1
−
s
)
X
2
)
+
(
1
−
t
)
(
s
X
3
+
(
1
−
s
)
X
4
)
{\displaystyle \mathbf {A_{5}} =t(s\,\mathbf {X_{1}} +(1-s)\,\mathbf {X_{2}} )+(1-t)(s\,\mathbf {X_{3}} +(1-s)\,\mathbf {X_{4}} )}
and
X
5
=
A
5
‖
A
5
‖
R
{\displaystyle \mathbf {X_{5}} ={\mathbf {A_{5}} \over \lVert \mathbf {A_{5}} \rVert }R}
85
Assuming that the natural edges of the rectangle are
X
1
{\displaystyle \mathbf {X_{1}} }
to
X
2
{\displaystyle \mathbf {X_{2}} }
,
X
2
{\displaystyle \mathbf {X_{2}} }
to
X
4
{\displaystyle \mathbf {X_{4}} }
,
X
4
{\displaystyle \mathbf {X_{4}} }
to
X
3
{\displaystyle \mathbf {X_{3}} }
, and
X
3
{\displaystyle \mathbf {X_{3}} }
to
X
1
{\displaystyle \mathbf {X_{1}} }
.
It is worth noting that a uniform sampling of s and t , will not uniformly sample the surface of the sphere (especially if the points are far apart), but it is a good starting point. Dragons flight (talk ) 19:29, 3 December 2014 (UTC)
Take the four vectors to the corners of the rectangle as X 1 , X 2 , X 3 , X 4 (in say anticlockwise order).
Find the four vectors representing each edge of the rectangle using the cross product: A 12 = X 1 × X 2 , A 23 = X 2 × X 3 , A 34 = X 3 × X 4 , A 41 = X 4 × X 1 .
Now find the four dot products that I was referring to: d 12 = X 5 ⋅ A 12 , d 23 = X 5 ⋅ A 23 , etc.
When all four are positive (or is it all negative?), X 5 is inside the rectangle.
INDIVIDUAL ROTATION MATRICES IN 3-D SPACE: [8]
Each rotation is performed in counterclockwise manner, e.g. rotation
R
(
θ
z
)
{\displaystyle R(\theta _{z})}
is performed with the positive direction of axis Z looking at the observer. The coordinates of each point in xy plane are represented by a column vector. The plane therefore rotates in counter-clockwise direction.
Right hand rotation around axis X via angle
θ
x
{\displaystyle \theta _{x}}
:
R
(
θ
x
)
=
[
1
0
0
0
c
o
s
(
θ
x
)
−
s
i
n
(
θ
x
)
0
s
i
n
(
θ
x
)
c
o
s
(
θ
x
)
]
{\displaystyle R(\theta _{x})~~=~~{\begin{bmatrix}1&0&0\\0&cos(\theta _{x})&-sin(\theta _{x})\\0&sin(\theta _{x})&cos(\theta _{x})\end{bmatrix}}}
86
Right hand rotation around axis Y via angle
θ
y
{\displaystyle \theta _{y}}
R
(
θ
y
)
=
[
c
o
s
(
θ
y
)
0
s
i
n
(
θ
y
)
0
1
0
−
s
i
n
(
θ
y
)
0
c
o
s
(
θ
y
)
]
{\displaystyle R(\theta _{y})~~=~~{\begin{bmatrix}cos(\theta _{y})&0&sin(\theta _{y})\\0&1&0\\-sin(\theta _{y})&0&cos(\theta _{y})\end{bmatrix}}}
87
Right hand rotation around axis Z via angle
θ
z
{\displaystyle \theta _{z}}
R
(
θ
z
)
=
[
c
o
s
(
θ
z
)
−
s
i
n
(
θ
z
)
0
s
i
n
(
θ
z
)
c
o
s
(
θ
z
)
0
0
0
1
]
{\displaystyle R(\theta _{z})~~=~~{\begin{bmatrix}cos(\theta _{z})&-sin(\theta _{z})&0\\sin(\theta _{z})&cos(\theta _{z})&0\\0&0&1\end{bmatrix}}}
88
My sequence of rotations is defined as:
R
=
R
(
θ
z
)
R
(
θ
y
)
R
(
θ
x
)
{\displaystyle R=R(\theta _{z})R(\theta _{y})R(\theta _{x})}
89
where
R
(
θ
x
)
{\displaystyle R(\theta _{x})}
is performed first
[
c
o
s
(
θ
y
)
0
s
i
n
(
θ
y
)
c
o
s
(
θ
x
)
c
o
s
(
θ
x
)
−
s
i
n
(
θ
x
)
c
o
s
(
θ
y
)
−
c
o
s
(
θ
x
)
s
i
n
(
θ
y
)
s
i
n
(
θ
x
)
c
o
s
(
θ
x
)
c
o
s
(
θ
y
)
]
[
c
o
s
(
θ
z
)
−
s
i
n
(
θ
z
)
0
s
i
n
(
θ
z
)
c
o
s
(
θ
z
)
0
0
0
1
]
=
{\displaystyle {\begin{bmatrix}cos(\theta _{y})&0&sin(\theta _{y})\\cos(\theta _{x})&cos(\theta _{x})&-sin(\theta _{x})cos(\theta _{y})\\-cos(\theta _{x})sin(\theta _{y})&sin(\theta _{x})&cos(\theta _{x})cos(\theta _{y})\end{bmatrix}}{\begin{bmatrix}cos(\theta _{z})&-sin(\theta _{z})&0\\sin(\theta _{z})&cos(\theta _{z})&0\\0&0&1\end{bmatrix}}=}
[
c
o
s
(
θ
y
)
c
o
s
(
θ
z
)
−
c
o
s
(
θ
y
)
s
i
n
(
θ
z
)
s
i
n
(
θ
y
)
c
o
s
(
θ
x
)
c
o
s
(
θ
z
)
+
c
o
s
(
θ
x
)
s
i
n
(
θ
z
)
−
c
o
s
(
θ
x
)
s
i
n
(
θ
z
)
+
c
o
s
(
θ
x
)
c
o
s
(
θ
z
)
−
s
i
n
(
θ
x
)
c
o
s
(
θ
y
)
−
c
o
s
(
θ
x
)
s
i
n
(
θ
y
)
c
o
s
(
θ
z
)
+
s
i
n
(
θ
x
)
s
i
n
(
θ
z
)
c
o
s
(
θ
x
)
s
i
n
(
θ
y
)
s
i
n
(
θ
z
)
+
s
i
n
(
θ
x
)
c
o
s
(
θ
z
)
c
o
s
(
θ
x
)
c
o
s
(
θ
y
)
]
{\displaystyle {\begin{bmatrix}cos(\theta _{y})cos(\theta _{z})&-cos(\theta _{y})sin(\theta _{z})&sin(\theta _{y})\\cos(\theta _{x})cos(\theta _{z})+cos(\theta _{x})sin(\theta _{z})&-cos(\theta _{x})sin(\theta _{z})+cos(\theta _{x})cos(\theta _{z})&-sin(\theta _{x})cos(\theta _{y})\\-cos(\theta _{x})sin(\theta _{y})cos(\theta _{z})+sin(\theta _{x})sin(\theta _{z})&cos(\theta _{x})sin(\theta _{y})sin(\theta _{z})+sin(\theta _{x})cos(\theta _{z})&cos(\theta _{x})cos(\theta _{y})\end{bmatrix}}}
{1} Solomon L'vovich Belousov , Tables of Normalized Associated Legendre Polynomials Pergamon Press 1962.
<
l
<=
56
;
m
<=
36
>
{\displaystyle <l<=56;m<=36>}
{2} Dmitrii Alexandrovich Varshalovich , Anatolii Nikolaevich Moskalev , V.K Khersonskii Quantum Theory of Angular Momentum , 1988 World Scientific
{3} S. A. Holmes W. E. Featherstone . A unified approach to the Clenshaw summation and the recursive computation of very high degree and order normalised associated Legendre functions . Journal of Geodesy, May 2002, Volume 76, Issue 5, pp 279–299 [9]
{4} Nathanael Schaeffer Efficient spherical harmonic transforms aimed at pseudospectral numerical simulations STerre, Universit ́e de Grenoble 1, CNRS, F-38041 Grenoble, France [10]
{5} Pavel Holoborodko , Numerical integration . [11] ,
as archived October 13, 2016;
{6} Fourier Series: Basic Results [12]
{7} Michael Kazhdan , Thomas Funkhouser , and Szymon Rusinkiewicz Rotation Invariant Spherical Harmonic Representation of 3D Shape Descriptors Eurographics Symposium on Geometry Processing (2003) L. Kobbelt, P. Schröder, H. Hoppe (Editors) [13]
{8} Spherical Harmonics [14]