%
% 302
%
\chapter{Legendre Functions}

\Section{15}{1}{Definition of Legendre polynomials.}

Consider the expression (1 -2 /i -|-/? )~ S when \'izh-h' \ < l, it
can be expanded in a series of ascending powers of ' .zh - Ii-. If, in
addition, I 2zh \ + \ h <l, these powers can be multiplied out and the
resulting series rearranged in any manner \hardsubsectionref{2}{5}{2}) since the expansion
of [1 - | 2zh \ + \ h\ \ ]]~ in powers of \ 2zh\ + \ h\' then
converges absolutely. In particular, if we rearrange in powers of h,
we get

(1 - 2zh + /r) -i = P, (z) + hP, (z) + h -P, (z) + ¥Ps z)+..., where

P, z) l, P, z) = z, P, z) = l Sz -n P, z) = l(5z -Szl

p (z) = I S5z' - Wz' + 3), P, (z) = I QSz' - 70z' + 1 5z), and
generally

 n z) - 2,, \,, 1 2 (2n - 1) 2.4. (2n - 1) (2n - 3) ' ' " j

,to 2".r!(7? -r)!(n-2r)!

r = 1 1

where ??i = ** 2 " - 1)' whichever is an integer.

If a, 6 and S be positive constants, ft being so small that 2ah + h' l
-8, the expansion of (1 - 2zh + /i ) ~ converges uniformly with
respect to z and k when j 2 j a, | A | 6.

The expressions TODO.    > which are clearly all
polynomials in z, are known as Legendre jwlynomials*, Pn z) being
called the Legendre polynomial of degree n.

It will appear later ( 15"2) that these polynomials are particular
cases of a more extensive class of functions known as Legendre
functions.

Example 1. By giving z special values in the expression (1 - izh + K )
" =-', shew that

* other names are Legendre coefficients and Zonal Harmonies. They were
iutrodueed into analysis in 1784 by Legendre, Memoires par divers
saians, x. (1785).

%
% 303
%

Example 2. From the expansion (1 - 2A cos + A ') '' = ( + \ he + Ji-e
' +..\

+ :

shew that

P (cos 6) = l-3---( -l) k cos '/i + J",!f'". 2 cos ( -2)5 " 2.4...
(2w) [ 2.(2?i - 1) '

1.3.(2n)(2?i-2),,, l 2 .4.(2.-l)(2 -3) ("- ) + -|- Deduce that, if 5
be a real angle,

!/> (cos5)|< 2. 4. ..2m r + 2.(2 -l)- + 2. 4Tl>3iy(2 rr3)- + -j

so that I P,, (cos 5) I 1. \addexamplecitation{Legendre.}

Example 3. Shew that, when z= -\,

TODO
(Ckre, 1905. )

\Subsection{15}{1}{1}{Rodrig lies' * formula for the Legendre polynomials.}

It is evident that, when n is an integer,

(In fin ( 71 ., t 1

  / w 'i! (2n-2r)!,.=0 r!(n-r)! (n-2r)! '

where w =;j ?i or (n - 1), the coefficients of negative powers of z
vanishing.

From the general formuhi for P,; (z) it follows at once that

this result is known as Rodrigues' formula.

Example. Shew that P (2) = has n real roots, all lying between + 1.

\Subsection{15}{1}{2}{Schldfii'sf integral for Pn(z). 4, X 1}

From the result of § loll combined with \hardsubsectionref{5}{2}{2},' it follows at once
that

where C is a contour which encircles the point z once
counter-clockwise; this result is called Schldfiis integral formula
for the Legendre polynomials.

* Corresp. sur VEcole poly technique, iii. (1814-1816), pp. 361-385. t
Schlafli, Ueber die zwei Heine'schen Kngelfunctionen (Bern, 1881).

%
% 304
%

\Subsection{15}{1}{3}{Legendres differential equation.}

We shall now prove that the function u = P ( ) is a solution of the
differential equation

, . d-u du,

which is called Legendre's differential equation for functions of
degree >l

For, substituting Schlafli's integral in the left-hand side, we have,
by \hardsubsectionref{5}{2}{2},

  ""~~dz ~ dV " " + 1) n ( )

, I (n + 1) r | ( - 1)"+ ),,

  2'7ri.2 ']cdt\ \ {t-zy'+-'] '

and this integral is zero, since ( - - 1)'*+ t - z)~"-~- resumes its
original value after describing C when n is an integer. The L gendre
polynomial therefore satisfies the differential equation.

The result just obtained can be written in the form

d\ [,,,, dPn z)\ dz

|(1 - z") 1 + n (n + 1) P. ( ) = 0.

It will be observed that Legendre's equation is a particular case of
Riemann's equation, defined by the scheme

-1 oc 1

71 + 1 z.

-n J

Example 1. Shew that the equation satisfied by "r is defined by the
scheme

P< -r 7i + r+l -r z. ( -n+r J

Example 2. If z = t], shew that Legendre's differential equation takes
the form

Shew that this is a hypergeometric equation.

Example 3. Deduce Schlafli's integral for the Legendre functions, as a
limiting case of the general hypergeometric integral of \hardsectionref{14}{6}. .

[Since Legendre's eqiiation is given by the scheme

P< 71+1 2>, I -71 J

the integral suggested is

%
% 305
%

= 1, f -l) t-z)-''- dt,

taken round a contour C such that the integrand resumes its initial
value after describing it; and this gives Schlafli's integral.]

\Subsection{15}{1}{4}{The integral properties of the Legendre polynomials.}
We shall now shew that*

[' P.n z)Pn z)dz

.' -1

=

2

2n+l

(m :jfe n), m = n).

dJ u

Let [u].r denote -r; then, if r- n, [ z- - 1)",. is divisible by z -
1)""'';

and so, if / < n, [ z - 1)" vanishes when z=\ and when 2 = - 1.

Now, of the two numbers m, n, let m be that one which is equal to or
greater than the other.

Then, integrating by parts continually,

j' z"--i)%,, z -iy%dz

 ( -ir .\, ( --i) l

-f (z -lru- -lru dz -1 J -1

= (-)'" r (z- -i)"' (z -ir],,,,dz,

.' -1 since z" - l)'" t\ i, K ' - l)'" 7 -2.  vanish at both
limits.

Now, when m > n, [(2- - !)", -;- = 0, since differential coefficients
of (2- - 1)" of order higher than 2 vanish; and so, luhen ni is
greater than n, it follows from Rodrigues' formula that '

/:

P (z)Pn z)dz = 0.

/:

When ni = n, we have, by the transformation just obtained,

= (2n) if (1 - z-Y dz

= 2.(2w)! I (l-2-)"fZ Jo

y

= 2.(2n)! sin-"+' dcW Jo

= 2 . (2w)

, 2.4...(2n)

3.5...(2w+l)' These two results were given by Legendre in 1784 and
1789.

W. M. A.

20

%
% 306
%

where cos 6 has been written for z in the integral; hence, by
Rodrigues' formula,

r (P / M- 2.(2n)! (2".7i!) 2

J \ I n V 2* . n !)2 (2w + 1) ! 2/? + 1 "

We have therefore obtained both the required results.

It follows that, in the language of Chapter xi, the functions (?i +
|)2 P (3) are normal orthogonal functions for the interval ( - 1, 1).

Example 1. Shew that, if x> 0,

[ (cosh2.? -j)-4p (2)c s = 25(n + i)-ie-(2" + i)=:.

Example 2. If /= I P, z) P (z) dz, then .'

\addexamplecitation{Clare, 1908.}

(i) /-l/(2/i + l) (m=w),

(ii) 7=0 m - n even),

Y - '*'* + " ?2. ' i '

(iii) 7= . .. - '-~, -;,,-,' ' ., (?i = 2i/ + I, m = 2u.).

\ ' 2'" + "-i(%-?)0 (" + "i + l) (" !) (m

\addexamplecitation{Clare, 1902.}
\Section{15}{2}{Legendre functions.}

Hitherto we have supposed that the degree n of P z is a positive
integer; in fact, P ( ) has not been defined except when n is a
positive integer. We shall now see how P,j z) can be defined for
values of n which are not necessarily integers.

An analogy can be drawn from the theory of the Gamma-function. The
expression z ! as ordinarily defined (viz. as 2 (2 - 1 ) (2 - 2) ... 2
. 1 ) has a meaning only for positive integral values of z; but when
the Gamma-function has been introduced, z ! can be defined to be r (2
+ I), and so a function z ! will exist for values of z which are not
integers.

Referring to \hardsectionref{1}{5}"13, we see that the differential equation

is satisfied by the expression

''~27rijc 2-(t-zr+ ' ''

even when n is not a positive integer, provided that C is a contour
such that (t2\ i)n4-i \ -n-2 resumes its original value after
describing C.

Suppose then that n is no longer taken to be a positive integer.

The function (f - 1)"+' ( - 2 )~"~ has three singularities, namely the
points t = l, t = - 1, t = z; and it is clear that after describing a
circuit round the point = 1 counter-clockwise, the function resumes
its original value multiplied by e Trtfre-i-i) . while after
describing a/<5ircuit round the point t = z counter-clockwise, the
function resumes its original value multiplied by

%
% 307
%

  >nii-n-:>) \ jf therefore C be a contour enclosing the points t=l
and t = z, but not enclosing the point = -1, then the function ( -
1)"+ ( - 2 )-'*" will resume its original value after t has described
the contour C. Hence, Legendre's differential equation for functions
of degree n,

/I,x' * du,

is satisfied by the expression

(1+, +) t -l)

"=2 -/.

  '2-'' t - zf ' *'

for all values of n; the many- valued functions will be specified
precisely by taking A on the real axis on the right of the point t=l
(and on the right of 2 if 5 be real), and by taking arg ( - 1) = arg(
4- 1) = and \ \ Yg t - z \ < 'Tr dX A.

''This expression will be denoted by F ( 2 ). ( nd will be termed the
Legeiidre function of degree n of the first kind.

We have thus defined a function P z), the definition being valid
whether n is an integer or not.

The function Pn z) thus defined is not a one-valued function of z;
for we might take two contours as shewn in the figure, and the
integrals along them would not be the same;

to make the contour integral unique, make a cut in the t plane from -
1 to - oo along the real axis; this involves making a similar cut in
the z plane, for if the cut were not made, then, as z varied
continuously across the negative part of the real axis, the contour
would not vary continuously.

It follows, by \hardsubsectionref{5}{3}{1}, that P z) is analytic throughout the cut plane.

\Subsection{15}{2}{1}{The Recurrence Formulae.}

We proceed to establish a group of formulae (which are really
particular cases of the relations between contiguous Riemann
P-functions which were shewn to exist in \hardsectionref{14}{7}) connecting Legendre
functions of different degrees.

If G be the contour of \hardsectionref{15}{2}, we have*

F M- JL\ [ ( '- y dt P'(z)-''- ( - dt

 n z) - 2, . j (TZTp-i ' ' " > - 2"+'7ri j c t - z)--'-'

WewriteP ' z)for-P (2).

20-2

%
% 308
%

Now - (t"--iy' ' 2(7i + l)t(t -l) \ (n + l) t -iy'+'

and so, integrating,

Therefore

2-+1 iri Jc t- zY '2 +- 7ri J c (t - zY ' 2 + Tri j t-zY+'

Consequently

i>,,w-.i'., .)= .jj;:-i 'rf* (A).

Differentiating*, we get

P'n+, (Z) - zP'n (Z) - Pn (Z) = nP, (z),

' ndso P'n,(z) - zP'n(z) = (n + 1) P,, 2) (I).

This is the first of the required formulae. Next, expanding the
equation

we find that

c t-zY Jc (t-zY J ( t-ZY '

Writing ( --1)4-1 for t- and (t - z) + z for t in this equation, we
get

 i c t-zY ]c (t-zY Jc t-zY-''

Using (A), Ave have at once

(n + 1) P +, (z) - zPn (z)] + 7iP \, (z) - nzP (z) = 0. That is to
say

(n + 1) P, i (z) - 2>i + 1) zPn (z) + nP \, U) = (II),

a relation f connecting three Legendre functions of consecutive
degrees. This is the second of the required formulae.

We can deduce the remaining formulae from (T) and (II) thus :
Differentiating (II), we have n + 1) [P' +, (z) - zP'n z)\ - n [zP\ z)
- P' \, ( )i - 2n + 1) P z) = 0. Using (I) to eliminate P'n+i (z),
and then dividing hyl n, we get

zP'n z)-P'n\, z) = nP,, z) (III).

* The process of differentiating under the sign of integration is
readily justified by \hardsectionref{4}{2}. t This relation was given in substance by
Lagrange in a memoir on Probability, Misc. Taurinemia, v. (1770-1773),
pp. 167-232.

X If n = 0, we have TODO, and the result (III) is
true but trivial.

/.

%
% 309
%

Adding (I) and (III) we get

P'n+A2)-P'n- z)==(2n+l)P,,(z) (IV).

Lastly, writing n -1 for n in (I) and eliminating P' \ i (z) between
the equation so obtained and (III), we have

(2-'-l)P'n z) = nzP, z)-nFn-,(z) (V).

The formulae (I) - (V) are called the recurrence formidae.

The above proof holds whether n is an integer or not, i.e. it is
applicable to the general Legendre functions. Another proof which,
however, only applies to the case when n is a positive integer (i.e.
is only applicable to the Legendre polynomials) is as follows :

Write V= l-2hz + h -)- .

Then, equating coefficients* of powei's of h in the expansions on each
side of the equation

 l-2hz + h )~ = z-h) V,

we have nP z)- 2n- ) zP \ i z) + n- ) P \ o z) = 0,

which is the formula (II).

Similarly, equating coeflficients* of powers of h in the expansions on
each side of the equation

 Th=' '- Tz

we have z ' -?- ' - " ',- i "' = nP (z\

dz

dP i ) dPr,\ y z)

dz

which is the formula (III). The others can be deduced from these.

Example 1. Shew that, for all values of,

\addexamplecitation{Hargreaves.}

jSz Pn'+P'n l)- PnPn l] = n + -i)P\ \,- 2n+ ) P .

Example 2.

If

M

hew that

dM x) dx

3f x) =

.( "( ' " " h Lo'

= nM \ i x) and / M x)dx = 0. \addexamplecitation{Trinity, 1900.}

Example 3. Prove that if m and n are integers such that m, both being
even

or both odd,

/ I dP (z) dP iz),,,

\ J -1 ~ - dz = m m + l). \addexamplecitation{Clare, 1898.}

Example 4. Prove that, if m, n are integers and m n,

P d P (z) d- P z) ( n-l)n n+ ) 7i- 2), .,

x n-(-) +m .

\addexamplecitation{Math. Trip. 1897.} * The reader is recommended to justify these
processes.

V

%
% 310
%

15'211. The expression of any polynomial as a series of Legendre
polynomials.

Let fn z) be a polynomial of degree n \ n z.

Then it is always possible to choose a,,, a-, ... so that

/ z) = aoPo z) + iPi (5) + . . . + anPn z),

for, on equating coefficients of z'\ z"-~', ... on each side, we
obtain equations which determine a, a \ i, ... uniquely in turn, in
terms of the coefficients of powers of z in fn (z).

To determine (/q, cti,  >i in the most simple manner, multiply the
identity by Pr z), and integrate. Then, by \hardsubsectionref{15}{1}{4},

when r = 0, 1, 2, ... n; when r > n, the integral on the left
vanishes.

Example 1. Given r" = aoPo (2) + < i A (2) + -.. +,ii'n (2), to
determine ao ii  ' 'n-

(Legendre, Exercices de Calc. Int. li. p. 352 )

[Equate coefficients of s" on both sides; this gives

""" i r

Let In,m= I ~"'Pm ) d, SO that, by the result just given,

\ 2 "> + i(m!)

Now when n - ru is odd, 7,, is the integral of an odd function with
limits ± 1, and so vanishes; and 7, also vanishes when 71- in is
negative and even.

To evaluate /,, when n - m is a positive even integer, we have from
Legendre's equation

m m + 1) f z Pra z)dz=-( 2" \ (1 - z ) P, ' z) dz

= J znii-z )P i,) +nj' z- z )P,: z)dz

  n\ \ -- z )P, z) -nj'j, n- ) z-- - n + ) z")P, z)dz,

on integrating by parts twice; and so

m m + 1 ) 7,, = n (/ + 1 ) /,, -n 7i-l) / \ 2., Therefore

T \ n n-l)

n n- ) ... (m + l) j

 n - m) n-'2-m) ... 2. ( + ? + !)( + ? - 1) ... (27H + 3) by carrying
on the process of reduction.

%
% 311
%

Consequently !,,= -, - - - - - - .

and so,h = 0, when n - m is odd or negative,

(2m + l)2"'n\ \ {ln + m)l ' . . . -,

 m=~ri - TTT - . .i\, When n - m is even and positive.!

Example 2. Express cos 7id as a series of Legendre polynomials of cos
6 when n is an integer.

Example 3. Evaluate the integrals

j' zP, z)P, z)dz, j[ z'Pn(z)Pn liz)dz.

\addexamplecitation{St John's, 1899.}
Example 4. Shew that

j[ l- z ) P ' (z) ' dz= . \addexamplecitation{Trinity, 1894.}

Example 5. Shew that

n

nP (cos 6) 2 cos reP,,\,. (cos d).
\addexamplecitation{St John's, 1898.}

r = l

Example 6. If,. = / ( 1 - 22) /' (s) rfs, where m < /<, shew that

(?i-wi)(2 + 2m + l)M = 2n-' -i- \addexamplecitation{Trinity, 1895.}

\Subsection{15}{2}{2}{Murphy's expression* of Pn z) as a hypergeometric function.}

Since \hardsubsectionref{15}{1}{3}) Legendre's equation is a particular case of Riemann's
equation, it is to be expected that a formula can be obtained giving
Pn(z) in terms of hypergeometric functions. To determine this formula,
take the integral of \hardsectionref{15}{2} for the Legendre function and suppose that
1 1 - | < 2; to fix the contour C, let B be any constant such that <
5 < 1, and suppose that z is such that 1 1 - | 2 (1 - S); and then
take C to be the circle f*

\ l-t\ = 2-8. 1-z

Since

1-t

convergent series :|:

2-28 - - < 1, we may expand (t - z)~' ~ into the uniformly

(*-.)- -.=o-i)- i+( + i)£5j+*'i±iiii >(;;y+...|.

Substituting this result in Schlafli's integral, and integrating
term-by- term \hardsectionref{4}{7}), we get

p . . \ .2 ( z - ly (n + l)(n + 2) ...(n + r) r< +' +' (t' - 1)"

dt

 t-iy

rio 2-. r\ y [dr

* Electricity (1833). Murphy's result was obtained only for the
Legendre polynomials.

t This circle contains the points t = l, t = z.

X The series terminates if n be a negative integer.

l'('+ >"

%
% 312
%

by \hardsubsectionref{5}{2}{2}. Since arg (t+l) = when = 1, we get

= 2"-'- n (n-1)... (n -r + 1),

t=i

and so, when \ 1 - z \ 2 (1 - B) < 2, we have

p ., (n + l)(n + 2)... n + r).(-n)(l-n)...(r-l-n) (i i V"

   ",.=0 (H) V2 - 2 j

= F( n + l,-n; 1; - ).

This is the required expression; it supplies a reason \hardsubsectionref{14}{5}{3}) why
the cut from - 1 to - 00 could not be avoided in \hardsectionref{15}{2}.

Corollary. From this result, it is obvious that, for all values of n.

Note. When n is a positive integer, the result gives the Legendre
polynomial as a polynomial in 1 - s with simple coeificients.

Exam/pie 1. Shew that, if m be a positive integer,

f --'P.n.. \ \ r(2m + +2) /Trinitv 1907)

Example 2. Shew that the Legendre polynomial Pn (cos 6) is equal to
(-) F(?i + l, -n; \; cos 16), and to cos'' hS F - n, - n; 1; tan ).
\addexamplecitation{Murphy.}

\Subsection{15}{2}{3}{Laplace's integrals* for P z).}

We shall next shew that, for all values of n and for certain values of
z, the Legendre function Pn z) can be represented by the integral
(called Laplace's first integral)

- f "( + ( ' - 1)* cos < " d .

(A) Proof applicable only to the Legendre polynomials. When n is a
positive integer, we have, by \hardsubsectionref{15}{1}{2},

where G is any contour which encircles the point z counter-clockwise.
Take G to be the circle with centre z and radius | 2 - 1 | *, so that,
on G, t ~ z - z- - 1 ) e**, where may be taken to increase from - tt
to tt.

* Mecanique Celeste, Livre xi. Ch. 2. For the contour employed in this
section, and for some others introduced later in the chapter, we are
indebted to Mr J. Hodgkinaon.

%
% 313
%

Making the substitution, we have, for nil values of z,

= ir- f" + ( --l)*cos<f) c?<f>

Ztt J \

1 f" ' 1

= - [z + iz"- 1)5 COS 4)Y '

since the integrand is an even function of < . The choice of the
branch of the two- valued function z - 1)- is obviously a matter of
indifference.

(B) Proof applicable to the Legendre functions, where n is
um-estricted.

Make the same substitution as in (A) in Schlafli's integral defining
Pn z); it is, however, necessary in addition to verify that i = 1 is
inside the contour and = - 1 outside it, and it is also necessary that
we should specify the branch of [z + z" - 1) cos ", which is now a
many- valued function of < .

The conditions that t = \, t = -\ should be inside and outside G re-
spectively are that the distances of z from these points should be
less and greater than \ z -l\ \ . These conditions are both satisfied
if | 2: - 1 1 < | + 1 1, which gives R z) > 0, and so (giving arg z
its principal value) we must have

|arg |< TT.

Therefore P z) = [" [z + ( - l)i cos (j>Y ( <l>>

Ztt J \,r

where the value of arg 2 -I- ( ' - 1)2 cos <f) is specified by the
fact that it [being equal to arg(i'- - 1) - arg( - z)] is numerically
less than tt when t is on the real axis and on the right of z (see §
15 "2).

Now as (f) increases from -n to tt, 2 + z' -1) cos describes a
straight line in the

Argand diagram going from z- z'- 1)2 to z + z - l)~ and back again;
and since this line

does not pass through the origin*, arg [2 + (s"- - l)'- cos0 does not
change by so much as 77 on the range of integration.

Now suppose that the branch of z + z - l)'-* cos ( |" which has to be
taken is such that

it reduces to z" e'""-'" (where / is an integer) when ( = 7r.

Jnkni - Then P,. z) = -- z + (z - 1 )* cos < " d4>,

2.TT J -TT

where now that branch of the many-valued function is taken which is
equal to s" when

Now make 2- -l b ' a path which avoids the zeros of Pn z) ', since Pn
z) and the integral are analytic functions of z when | arg 2 | <hr, k
does not change as z describes the path. And so we get (r' ''' = 1.

* It only does so if is a pure imaginary; and such values of z have
been excluded.

%
% 314
%

Therefore, when | arg 2 | < - tt and n is unrestricted,

 n( ) = j[ [Z + Z' - If COS <1>Y d<f>,

where arg [z + (z- - 1)- cos cp] is to be taken equal to arg z when
(f> = tt. This expression for Pn (z), Avhich may, again, obviously be
written

- r [z + z- - 1)* cos </)]" d<p,

TT J

is known as Laplace's first integral for P ( ).

Corollary. From \hardsubsectionref{15}{2}{2} corollary, it is evident that, when | arg 2 |
<i7r,

dcj)

 cos "+i'

a result, due to Jacobi, Journal fiir Math. xxvi. (1843), pp. 81-87,
known as Laplace's second integral for P (z).

Example 1. Obtain Laplace's first integral by considering

2 A" j z + z-- ) cos ( " c?,

,1 = 1) J

and using \hardsubsectionref{6}{2}{1} example 1.

Example 2. Shew, by direct differentiation, that Laplace's integral is
a solution of Legendre's equation.

Example 3. If s < 1, | A | < 1 and

(l-2/icos(9 + A2)- = 2 bncosnd, 11=0

shew that = - T- jo (TT TO P? -"- " *-)

Example 4. When 2>1, deduce Laplace's second integral from his first
integral by the substitution

 S- (22 -1)5 cos IZ + Z - l)*COS( = l.

Example 5. By expanding in powers of cos<, shew that for a certain
range of values of z,

- I" z + (z'--l)hcoscl)]"d(t) = z F -hi,i,-in; 1; I-2-2). 7  - -

Example 6. Shew that Legendre's equation is defined by the scheme

r 00 1

p -hi i + hi M,

[ +hi -hi J

where 2 = (1 + " ).

15 -231. The Mehler-Dirichlet integral* for P (2).

Another expression for the Legendre function as a definite integral
may be obtained in the following way :

* Dirichlet, Journal fur Math. xvii. (1837), p. 35; Mehler, Math. Ann.
v. (1872), p. 141.

%
% 315
%

For all values of /*, we have, by the preceding theorem,

Pn z) = - 1 Z + COS (i> (22 - 1) dcp. TT J

In this integral, replace the variable by a new variable k, defined by
the equation

A = 2 + (s2 - 1 )Ti COS (j),

and we get . P (3) = - / h"- l-2kz + ffi) ' dh;

the path of integration is a straight line, arg /i is determined by
the fact that k = z when = |7r, and l--2hz + h' )~ = - i z- - l) sin
(f).

Now let z = cos d; then

Pn (cos 6) ' \ A" (1 - ihz + /i2) - hdh.

Now 6 being restricted .so that - tt <6 <\ it when n is not a positive
integer) the path of integration may be deformed* into that arc of the
circle |A| = 1 which passes through A = 1, and joins the points A =
e~* A = e'*, since the integrand is analytic throughout the region
between this arc and its chord t.

Writing h=e we get

1 [e J t+i) *

P (cos )= -d<i>,

  .' - (2cos</)--2cos )*

and so Pn (cos 6) = - ' i >

 .'0 2(cos0-cos )P

it is easy to see that the positive value of the square root is to be
taken.

This is known as Mehler's simplified form of Dirichlefs integral. The
result is valid for all values of n.

2 /"" \ (cos 6) = - \ = "'- "- -!

Example 1. Prove that, when a is a positive integer,

2 /"" sin( + )0o?(/) 2(cos -cos</>)

(Write 7r-6 for 6 and tt - for ( in the result just obtained.)

Exa'mple 2. Prove that

1 / A"

P (cos ) = -,-  - T 5

27ri./ (A2\ 2Acos + l)4

the integral being taken along a closed path which encircles the two
points h=e, and a suitable meaning being assigned to the radical.

* If e be complex and R (cos ) > the deformation of the contour
presents slightly greater difficulties. The reader will easily modify
the analysis given to cover this case.

+ The integrand is not analytic at the ends of the arc but behaves
like (ft-e*' )~ near them; but if the region be indented (§ 6-'23) at
e*' and the radii of the indentations be made to tend to zero, we see
that the deformation is legitimate.

%
% 316
%

Hence (or otherwise) prove that, if 6 lie between Jtt and Itt,

,, 4 2.4...2 ico\&(n6 + d>) 1 cosM + 3( )\

P (cos ) = - ?r-T 77. - TT r H 1 -

77 3.5...(27i + l) 2gij yj 2(2?i + 3) (2 sin )

J 12.32 cos(% + 5( ) |-,

2.4.(2n + 3)(2?i+5) ( smO) I

' +

where < denotes \ d - jtt.

Shew also that the first few terms of the series give an approximate
value of P (cos 6) for all values of 6 between and n- which are not
nearly equal to either or it. And explain how this theorem may be used
to approximate to the roots of the equation P (cos ) = 0.

(See Heine, Kugelfunktionen, i. p. 178; Darboux, Comptes Rendus,
Lxxxii. (1876), pp. 365, 404.)

\Section{15}{3}{Legendre functions of tite second kind.}

We have hitherto considered only one solution of Legendre's equation,
namely P ( ). We proceed to find a second solution.

We have seen \hardsectionref{15}{2}) that Legendre's equation is satisfied by

j f -ir t-zy

dt,

taken round any contour such that the integrand returns to its initial
value after describing it. Let D be a figure-of-eight contour formed
in the following way : let z be not a real number between + 1; draw
an ellipse in the i-plane with the points + 1 as foci, the ellipse
being so small that the point = 2 is outside. Let A be the end of the
major axis of the ellipse on the right of = 1.

Let the contour D start from A and describe the circuits (1 -, - 1
+), returning to A (cf.\hardsubsectionref{12}{4}{3}), and lying wholly inside the ellipse.

Let 1 arg zl ir and let | arg (z - t) - > arg as - > on the contour.
Let arg(i + l) = arg(i-l) = at A.

Then a solution of Legendre's equation valid in the plane (cut along
the

real axis from 1 to - 00 ) is

1 r it' - 1)"

if n is not an integer.

When i (? -I- 1) > 0, we may deform the path of integration as in §
12-43, and get

(where arg(l - = arg(l -|- ) = 0); this will be taken as the
definition of Qn (z) when n is a positive integer or zero. When n is a
negative integer (= - m - 1) Legendre's differential equation for
functions of degree n is identical with that for functions of degree
m, and accordingly we shall take the two fundamental solutions to be
P. (z), Q,n z).

Qn (z) is called the Legendre function of degree n of the second kind.

%
% 317
%

\Subsection{15}{3}{1}{Expansion of Qn (z) as a power-series.}

We now proceed to express the Legendre function of the second kind as
a power-series in z~' .

We have, when the real part of n + 1 is positive,

1 r

Suppose that \ z\ > 1. Then the integrand can be expanded in a series
uniformly convergent with regard to t, so that

- n- 1

dt

dt

where r = 2, the integrals arising from odd values of / vanishing.
Writing t- = u, we get without difficulty, from \hardsectionref{12}{4}'1,

The proof given above applies only when the real part of (n + 1) is
positive (see \hardsectionref{4}{5}); but a similar process can be applied to the
integral

Qn Z) = -. . \ l (f- - 1) Z - t)- dt,

4i sin UTT J D the coefficients being evaluated by writing 1 t- - 1)"
f dt in the form

J JD /(1-) / (-! + )

Jo Jo

and then, writing f- = u and using \hardsubsectionref{12}{4}{3}, the same result is
reached, so that the formula

TT r(/i + l) 1 /1,11,, . 3 1

is true for unrestricted values of n (negative integer values
excepted) and for all values* of z, such that [ 2: | > 1, j arg z\ <
tt.

Example 1. Shew that, when n is a positive integer,

* When n is a positive integer it is unnecessary to restrict the value
of arg z.

%
% 318
%

[It is easily verified that Legendre's equation can be derived from
the equation

by diflferentiating n times and writmg =

Two independent solutions of this equation are found to be I

(32-1)" and (s2-l) /' (i;2-l)- -irft;.

It follows that |(2- - 1) j (v - 1) --1 dv

is a solution of Legendre's equation. As this expression, when
expanded in ascending powers of z~i, commences with a term in 2- -i,
it must be a constant multiple* of Q (z); and on comparing the
coetficient of -''-i in this expression with the coefficient of s~"~'
in the expansion of Q (2), as found above, we obtain the required
result.]

Example 2. Shew that, when n is a positive integer, the Legendre
function of the second kind can be expressed by the formula

Example 3. Shew that, when % is a positive integer,

t=0 t .[11- I) . J z

[This result can be obtained by applying the general integration
-theorem

to the preceding result.]

\Subsection{15}{3}{2}{The recurrence- formulae for Qn )-}

The functions P (2) and Q, z) have been defined by means of integrals
of precisely the same form, namely

[ t--iy' t-z)-''- dt,

taken round different contours.

It follows that the general proof of the recurrence-formulae for P z),
given in \hardsubsectionref{15}{2}{1}, is equally applicable to the function Qn (z); and
hence that the Legendre function of the second kind satisfies the
recurrence-formulae

(w -H 1) \$ + 1 (2) - (2 + 1 ) zQn z) + n Qn-l (z) = 0,

zQ'n z)-Q'n-l ) = nQ z), Q'n l z)-Qn~l )== 2ri+1)Q,, Z),

 z' -l)Q'n (2) = nzQ (2) - n\$ \ i (2). Example 1. Shew that

\$o(2) = 41ogj4|> i( ) = S logJ -l,

and deduce that Q> (2) = '2 (2) log - h,

* P (2) contains positive powers of z when n is an integer.

%
% 319
%

Example 2. Shew by the recurrence-formulae that, when n is a positive
integer*,

 1/ - i

where / \ i (z) consists of the positive (and zero) powers of z in the
expansion of

z+1 hPn (s) log in descending powers of z.

2-1

[This example shews the nature of the singulai'ities of Q ( ) at ± 1,
when n is an integer, which make the cut from - 1 to +1 necessary. For
the connexion of the result with the theory of continued fractions,
see Gauss, Werke, in. pp. 165-206, and Frobenius, Journal fur Math.
Lxxiii. (1871), p. 16.]

15 33. The Laplacian integral f for Legendre functions of the second
kind. It will now be proved that, when R n+ 1)> 0,

Qn ( ) = f " [2 + (2' - 1)* cosh 6>;- -i de, Jo

where arg \ z + z- - 1)* cosh 6] has its principal value when 6 = 0,
if n be not an integer.

First suppose that z>. In the integral of § lo*3, viz.

write TODO

so that the range (- 1, 1) of real values of t corresponds to the
range (- oo, oo ) of real values of 6. It then follows (as in \hardsubsectionref{15}{2}{3}
A) by straightforward substitution that

, Q z) = \ \ [z z - - 1 ) cosh (9 -"- (

= z + z"-- ) cos\ ie]-''-'de,

Jo

since the integrand is an even function of 0.

To prove the result for values of z not comprised in the range of real
values greater than 1, we observe that the branch points of the
integrand, qua function of z, are at the

points ±1 and at points where z + z -l) cosh vanishes; the latter are
the points at which z= ± coth d.

Hence Q (z) and I z+ z - 1)- cosh B -''- d\$ are botli analytic + at
all points of the Jo plane when cut along the line joining the points
z= ± I.

* If -1<3<1, it is apparent from these formulae that Q z + Oi) - Q
(z-Oi)= - 7riP (z). It is convenient to define Qn(z) for such values
of z to be J(? ( + Oi) + JQ (0-Oi). The reader will observe that this
function satisfies Legendre's equation for real values of z. t This
formula was first given by Heine; see his Kugelfunktionen, p. 147.
:J: It is easy to shew that the integral has a unique derivate in the
cut plane.

%
% 320
%

By the theory of analytic continuation the equation proved for
positive vahies of z - 1

persists for all values of z in the cut plane, provided that arg z+(z
- l) cosh is given a suitable value, namely that one which reduces to
zero when 2 - 1 is positive.

The integrand is one-valued in the cut plane [and so is Qn )] when n
is a positive

integer; but Arg z + z - l)2cosh increases by 27r as arg 2 does so,
and therefore if n be not a positive integer, a further cut has to be
made from 2= - 1 to z= - oc .

These cuts give the necessary limitations on the value of 2; and the
cut when n is not

an integer ensures that arg z + (2 - 1 ) = 2 arg z + 1 ) + (2 - 1)-)
has its principal value.

Example 1. Obtain this result for complex values of z by taking the
path of integration to be a certain circular arc before making the
substitution

 \ / (2 + 1) -(2-1) / (2+1)* + (2-1) '

where 6 is real.

Example 2. Shew that, if 2 > 1 and coth a = z,

Qn (2) = I 2 - (2- - 1)* cosh u "- du, where arg z - z -\ )5 cosh u] =
0. \addexamplecitation{Trinity, 1893.}

\Subsection{15}{3}{4}{Neumann's* formula for Qn )i when n is an integer.}

When n is a positive integer, and 2 is not a real number between 1 and
-1, the function Qn (2) is expressed in terms of the Legendre function
of the first kind by the relation

which we shall now establish.

When I 2 i > 1 we can expand the integi-and in the uniformly
conve|'gent series

wj=0 2

Consequently

 y \ i -y TO=o J -1

The integrals for which m - n is odd or negative vanish \hardsubsubsectionref{15}{2}{1}{1});
and so

  J -\ z - y m=o J -I

 1 I \ .,\, \, 2- n + 27n) \ (n + m) '. 2,=o' ni\ \ {2n + 2m+l)l

<0n ( !N2

(2ri + l)! 2 i + o, .,?i-t-i, + .,,*;

by \hardsubsectionref{15}{3}{1}. The theorem is thus established for the case in which
|2|>1. Since each side of the equation

represents an analytic function, even when | 2 | is not greater than
unity, provided that 2 is not a real number between - 1 and 4- 1, it
follows that, with this exception, the result is- true \hardsectionref{5}{5}) for all
values of 2.

* F. Neumann, Journal fur Mdth. xxxvn. (1818), p. 24.

%
% 321
%

The reader should notice that Neumann's formula apparently expresses
Qn z) as a one- valued function of z, whereas it is known to be many-
valued \hardsubsectionref{15}{3}{2} example 2). The reason for the apparent discrepancy is
that Neumann's formula has been established when the z plane is cut
from - 1 to +\, and Q z) is one-valued in the cut plane.

Example 1. Shew that, when - 1 \$ i2 (2) 1, | § (z) j | 7(2) |-'; and
that for other values of 2, | Q (2) | does not exceed the larger of |
2- 1 |~i, | 2-I- 1 |~'.

Example 2. Shew that, when n is a positive integer, Qn z) is the
coefficient of h" in the expansion of (1 - 2A2 -|- fi') ~ ai-c cosh \
- \ .

[For, when | A j is sufficiently small,

= (1 - 2A2+A2) - i arc cosh 1- --, ! .

This result has been investigated by Heine, Kugelfunktionen, I. p.
134, and Laurent, Journal de Math. (3), I. p. 373.]

\Section{15}{4}{Heine's* development of TODO t - z)~ as a series of
  Legendre polynomials in z.}

We shall now obtain an expansion which will serve as the basis of a
general class of expansions involving Legendre polynomials.

The reader will readily prove by induction from the
recurrence-formulae (2m + 1) tq, (0 - ("i + 1) Q,+i t) - mQ,,\, (t)
= 0,

 2m + [) zP, z) - m + 1) P,+i z) - ml\ \, z) = 0, that

-- = I (2m + 1 ) P,, Z) Qrn (t) 4- " I [Pn, z) Q (t) ~ P (z) Q . (t)
.

Using Laplace's integrals, we have

Pn Az)Qn t)-Pn z)Qn+x t)

\ \ p r [z- iz- - l) C0S</)j

TT j J 1 -I- (t- -if- COsh ?< "+'

X [2 + ( - - 1 )- COS ( - \ t- (t- - ] )- cosh |~ ] d(f>du.

I z + z -lfcos(p

r*row consider | j-

] t + t -l) coshu

Let cosh a, cosh a be the semi-major axes of the ellipses with foci +
1 which pass through z and t respectively. Let be the eccentric angle
of z; then

2 - cosh (a + 10), I 2 + (2 - 1)' COS 1 = 1 cosh (a -f- id) ± sinh a +
id) cos (f) |

= cosh- a - sin 9 + (cosh a - cos B) cos'- ± 4 sinh a cosh a cos < 2 .
This is a maximum for real values of < when cos 0= + 1; and hence

I 2 ± (2 - 1)2 cos |2 2 cosh2 a -I + 2 cosh a (cosh a - l) =exp (2a).
Similarly \ t + (t - 1)2 cosh u \ exp a.

* Journal fur Math. XLir. (1851), p. 72. W. M. A. 21

%
% 322
%

Therefore

I P +i (z) Qn (t) - Pa 2) Qn+i (t) 1 TT-i exp n (a - a) T f * Vd<f>du,

J J

2 + (2- - Ip cos<f>

rhere \ V\ =

+ \ + ( --l) cosh u]

t + f-l) coshu

Therefore j Pn+i (z) Qn (0 ~ Pn ( ) Qn+i (0 j - > 0, as ?i -> 00,
provided a < a. And further, if t varies, a remaining constant, it is
easy to see that

the upper bound of I I Vd<j)du is independent of t, and so

Jo Jo

Pn+ z)Qn(t)-Pn )Qn+ (t)

tends to zero uniformly with regard to t.

Hence if the point z is in the interior of the ellipse which passes
through the point t and has the points ± 1 for its foci, then the
expansion

r =l 2n + ) Pn z)Qn t) t - z =o

is valid; and if the a variable point on an ellipse with foci ± 1 such
that z is a fixed point inside it, the expansion converges uniformly
with regard to t.

\Subsection{15}{4}{1}{Neumanns* expansion of an arbitrary f motion in
  a series of Legendre polynomials.}

We proceed now to discuss the expansion of a function in a series of
Legendre polynomials. The expansion is of special interest, as it
stands next in simplicity to Taylor's series, among expansions in
series of poljnaomials.

Let f 2) be any function which is analj tic inside and on an ellipse
C, whose foci are the points z ±. We shall shew that

f 2) = a,Po (z) + ttiA z) + aoPo 2) + ttaPa 2)+..., where a,,, Oj, a,
... are independent of 2, this expansion being valid for all points z
in the interior of the ellipse C.

Let t be any point on the circumference of the ellipse.

Then, since S (2n+ l)Pn(z) Qn(t) converges uniformly with regard to t,

w=0

/( > = 2 - l/t- f - 2 - !. .L<2" + 1> " < > " (') ' "> "

X

= % anPn(z), w=0

2n + 1 f where a = . I f(t) Qn (t) dt.

* K. Neumann, Ueher die Entwickeluny einer Funktion nach den
Kugelfunktionen (Halle, 1862). See also Thomd, Journal fur Math. lxvi.
(1866), pp. 337-343. Neumann also gives an ex- pansion, in Legendre
functions of both kinds, valid in the annulus bounded by two ellipses.

%
% 323
%

00

This is the required expansion; since 2 2n + 1) Pn z) Qn(t) may be
proved*

to converge uniformly with regard to z when z lies in any domain C"
lying wholly inside C, the expansion converges uniformly throughout C.

Another form for a can therefore be obtained by integrating, as in §
15-211, so that

an = (' + 2) j /( (  A form of this equation which is frequently
useful is

"' Irli/V*''' " - "" ' " ' '

which is obtained by substituting for Pn ( ) from Rodrigues' formula
and integrating by parts.

The theorem Avhich bears the same relation to Neumann's expansion as
Fourier's theorem beai's to the expansion of \hardsubsectionref{9}{1}{1} is as follows :

Let fit) he defined 'ivhen - 1 1, and let the integral of \ -t-y f t)
exist and he ahsohitely convergent; also let

a = n- h) r f t)P t)dt.

Then 2a Pn a;) is convergent and has the su?n i f ic+0) + f jc - 0) at
any point x, for which - 1< ar < 1, if any condition of the type
stated at the end of § 9 "43 is satisfied.

For a proof, the reader is referred to memoirs by Hobsont and
Burkhardt J.

Example 1. Shey that, if p ( 1) be the radius of convergence of the
series 2c s", then 2c P (2) converges inside an ellipse whose
semi-axes are (p+p~'), \ (p - p" ).

Example 2. If z=( \ \ /[2 = 5'' ~ JJ fj ±l), where y>x>\,

prove that /" ' = (a: + 1 ) (y - 1 ))i i P (.*:) Q,, (y).

[Substitute Laplace's integrals on the right and integrate with regard
to ( .] Example 3. Shew that

2V-) '" lEI)[vi-!l = Jo' '>  *" < '-

(Frobenius, Journal fur Math. LXXiil. (1871), p. 1.)
\Section{15}{5}{Ferrers associated Legendre functions TODO}
 We shall now
introduce a more extended class of Legendre functions. If m be a
positive integer and - 1 < < 1, n being unrestricted §, the functions

P- (Z) = (1 - Zf - " "1, Q rn (,) (1 \,.)i d "Qn( )

* The proof is similar to the proof in \hardsectionref{15}{4} that that convergence is
uniform with regard to t.

t Proc. London Math. Soc. (2), vi. (1908), pp. 388-395; (2), vii.
(1909), pp. 24-39.

X Miinchener Sitzungsberichte, xxxix, (1909), No. 10.

§ See p. 317, footnote. Ferrers writes r ' z) for P "' (z).

21 2

%
% 324
%

will be called Ferrers' associated Legendre functions of degi-ee 71
and order on of the first and second kinds respectively.

It may be shewn that these functions satisfy a differential equation
analogous to Legendre's equation.

For, differentiate Legendre's equation

(1 \ 2) \ 2 +,, (n + 1 ) y = - dz- dz

111 times and write v for - - . We obtain the equation

(1 - ), - 2 ( + 1 ) + ('i - '>0 (' + i + 1) = 0.

Write lu = (1 - 2'-) '" '. and we get

ox d"W dw f /, 1 X m ]

(1 - ) d.-- - 2 s + r ( + 1) - 1 = 0-

This is the differential equation satisfied by P,,"* (z) and Qj'' (z).
From the definitions given above, several expressions for tlie
associated Legendre fiinctious may be obtained.

Thus, from Schlafli's formula we have

J n-ri i J A

where the contour does not enclose the point = - 1.

Further, when n is a positive integer, we have, by Rodrigues' formula,

p in (2) = i i i '-

Example. Shew that Legendre's associated equation is defined by the
scheme / oc 1

f) im n + 1 Ui l-u \addexamplecitation{Olbricht.}

[ - im - H - hn j

\Subsection{15}{5}{1}{The integral pro'perties of the associated Legendre functions.}
The generalisation of the theorem of \hardsubsectionref{15}{1}{4} is the following : When
n, r, m, are positive integers and n > m, r > m, then

.1 I (ri n),

Pn'''(z)Pr"H2)dz\, .,

J 1 2 (n+ m)\

2?i + 1 (n - m)l

To obtain the first result, multiply the differential equations for P
"(z),. Pr" z) by P/" (z), Pn" (z) respectively and subtract; this
gives

+ (n- r) (n + r + 1) P ( ) Pn'" 2) = 0.

dz

%
% 325
%

On integrating between the limits - 1, +1, the result follows when n
and r are unequal, since the expression in square brackets vanishes at
each limit.

To obtain the second result, we observe that

squaring and integrating, we get

P " + z) = l- z-f - - + mz (1 -z"-)- P, - z);

  '"( )r\ o-..z.,./.. "( )

j'j P,r (z)Ydz=j' (l- )|' ' HV27n P -( )

dz

.' - 1 1-2 -

on integrating the first two terms in the first line on the right by
parts. If now Ave use the differential equation for Pn " (z) to
simplify the first integral in the second line, we at once get

j P '"+ (z)\' dz = (n - m) (71 + m + 1) I [Pn'" i )]' dz. By repeated
applications of this result we get

1 P "* z)]- dz = (n - m +l)(n- m + 2) . . . ??

.' -1

X n + m) (n + vi-l)... (n + I) \ P (z)Y dz,

J -1

and so f |P.-(.);.\&= 2 <i±!!i |.

j -1 2?l + 1 n - 7/t):

\Section{15}{6}{Hohsons definition of the associated Legendre functions.}

So far it has been taken for granted that the function (1- 2 ) '"
which occurs in Ferrers' definition of the associated functions is
purely real; and since, in the more elementary physical applications
of Legendre functions, it usually happens that - 1<2 <1, no
complications arise. But as we wish to consider the associated
functions as functions of a complex variable, it is undesirable to
introduce an additional cut in the 2 -plane by giving arg(l - z) its
principal value.

Accoi'dingly, in futm e, when z is not a real number such that -\ < z<
1, we shall follow Hobson in defining the associated functions by the
equations

p- (.) = (.' - i)i ' ''"'j;; ), Q.r (.) = iz'- i)i * >,

where ni is a positive integer, n is unrestricted and arg z, arg ( +
1), arg ( - 1) have their principal values.

%
% 326
%

When 111 is unrestricted, P;i'" (s) is defined by Hobson to be

f(T3; )( ) (- ...+i;i- .;i-J );

and Barnes has given a definition of § '" z) from which the formula

O m ( sm( + m) 7f T(n+m + ) T \ ) ( -1) "' " > sinWTT 2 + ir(7i + f) n
+ m + l

may be obtained.

Throughout this work we shall take m to be a positive integer.

\Subsection{15}{6}{1}{Expression of Pn z) as an integral of Laplace s type.}

If we make the necessary modification in the Schlafli integral of §
15"5, in accordance with the definition of \hardsectionref{15}{6}, we have

p, . (,) = (n + !)(' + 2);.. ( + - 0 (,, \ 1 )J,,. |- --- (,, \ 1)..
(, \,)\ \ -. rf. Write i = + (2- - 1)2 e'*, as in \hardsubsectionref{15}{2}{3}; then

where a is the value of when Hs at, so that

I arg z- - 1)- + a j < TT.

Now, as in \hardsubsectionref{15}{2}{3}, the integrand is a one- valued periodic function
of the real variable with period 27r, and so

Since 2 + ( - 1) cos ]" is an even function of </>, we get, on
dividing the range of integration into the parts (- tt, 0) and (0,
tt),

PrJ z) = - ' I [z + z - yf cos j'* cos m< d<f).

TT Jo

The ranges of validity of this formula, which is due to Heine,
(according as n is or is not an integer) are precisely those of the
formula of § 15 "23.

Example. Shew that, if | arg z I < tt,

n n- I) ... n-m-

Pn"' ) = (-)"

' + !) f cosm(f)d(f)

Jo 3 + (32\ i)icos< + i'

where the many-valued functions are specified as in § 15 23.
\Section{15}{7}{The addition theorem for the Legendre polynomials*.}
Let z=xaf - x - 1)
(x' - Vp cosco, where x, x', a are unrestricted complex numbers.

* Legendre, Calc. Int. 11. pp. 262-269. An investigation of the
theorem based on physical reasoning will be given subsequently § 18
"4).

%
% 327
%

Then we shall shew that

Pn Z) = Pn X) Pn x') + 2 2 ( - ) ' "" PrT ( ) ?/" ( ') COS r.m.

m=i n + ni) \

First let R (of) > 0, so that +(- " ) <-OM< -9J j bounded function of
in the I af + x'' -l) cos(f> ! range < < < 27r. If M be its upper
bound and if j A j < i/""', then

i .r + ( .r2-l) cos( a,-0)

converges uniformly with regard to 0, and so \hardsectionref{4}{7})

i A' f '' + ( '-1) cos (0,-0 ) " p - A" :c + ( 2-l) cos(co-( ) "

 =0 j- r y + (y2\ l) COS0 + ' J -n n=i) .r' + (;ar:'2 - 1) COS 0 " + 1

\ /""

- -' y + (j7'2- l)i COH(f>-h x+ x--'l) COS <0-(f>)

Now, by a slight modification of example 1 of \hardsubsectionref{6}{2}{1}, it follows that

/"" d(f) \ 2v

J -n A + B COS ( + C sin ( (A-- B - C' ) ' where that value of the
radic;il is taken which makes

Therefore

r -

+ (.r'2 - l)i cos (f)-h x + x2 - 1) cos ( - (j))

2n

  a/ - hxf - of' \ 1 )i - A (a;2 - 1 )i cos a) 2 - [h ( 2 \ i )i in a,
2ji

27r (l-2> 0+A2)i '

and when h~ 0, tliis expression has to tend to 27r Po ( ') by j5
15-23. Expanding in powers of h and equating coefficients, we get

Now /' (2) is a polynomial of degree ti in cos, and can C(jnsequently
be expressed in

H

the form i.4o+ 2 J, cosjrtco, where the coefficients J,, Jj, ... A
are independent of w

to determine them, we use Fourier's rule ( 9"12), and we get

1 / " A,n = I Pn (s) cos ma d(o

'"' J -n

\ 1 I" r f"" .V + x -l P cos (<a - </>) " cos Wlm, . "], 2 r2J\ Li-T
a;' +(a;'2- 1)4 cos (/> + J

\ \ 1\ /"' r / " .r + (. 2 - 1)4 cos (o) - 0) cos 7W<0 -]

2 -''' i -T L j -T y + (a/2\ l)4cos< + i J

- J f " r [" + (.r2 - 1 )4 cos /- " cos m (0 + >// ),. 1,, 27r2J\
;,Li-T ' + (a;'2-l)4cos0 +i J

on changing the order of integration, writing £ij = + >//' and
changing the limits for >// from +7r - to ±ir.

%
% 328
%

/ " i .

Now I x + x - l) cos-yj/ " sinm-\ j/d-\ lr = 0, since the integrand is
an odd function;

and so, by \hardsubsectionref{15}{6}{1},

111 [ cos mcf) . P (x),

7r n + m)l J -,r' + (,f'2 - 1 ) 3 cos ( + 1

Therefore, when | arg / | < 7r,

P ( ) = P ( 0i*nG ') + 2 2 (-)'nL p ' (. ')P (. '')cosma>.

 t=i (% + m; !

But this is a mere algebraical identity in x, x and cos <o (since n is
a positive integer)

and so is true independently of the sign of R x').

The result stated has therefore been proved.

The corresponding theorem with Ferrers' definition is

TODO

15 "71. The addition theorem for the Legendre functions.

Let .r, x' be two constants, real or complex, whose arguments are
numerically less than 77; and let ( '±1), (*''±1) be given their
princiiJal values; let co be real and let

z=xx' - x' - 1)2 x'' ~ 1)2 cos W. . Then loe shall sheiv that, if |
arg s | < tt for all valves of the real variable co, and n he not a
positive integer,

P z) = P X) P X') +-2 2 ( - )- jT :; ) n'" ( ') / n'" ( ') COS mo,.

Let cosh a, cosh a' be the semi-major axes of the ellipses with foci
+1 passing through X, x' respectively. Let, jS' be the eccentric
angles of x, x' on these ellipses so that

Let a + i =, a' + i/3' = ', so that .*' = cosh, .r'=:Cosh '.

Now as G) passes through all real values, R (z) oscillates between

R (xx') ±R x -l)i (a''2 - 1 ) 2 = cosh (a ± a') cos (/3 ± '), so that
it is necessary that ±/3' he acute angles positive or negative. Now
take Schlafli's integral

and write

\ e e~"" sinh cosh |g' - cosh | sinh \ \ '] + cosh g cosh l ' -e""
sinh sinh g'

cosh ig'+e sinh ' The path of ?:, as increases from - tt to tt, may be
shewn to be a circle; and the reader will verify that

\ 2 e' * ~" cosh Jg + s inh g sinh igcoshjf - e'" cos h |g sinh if

 ~ - " id, " ' '

cosh ig' + e sinh ig' \ 2 i " " " siuh ig + cos h g cosh igco |g' - /
" sinh g sinh i|' cosh Jg' + e sinh |g'

\ e cosh g' -|- sinh g' e'" sinh g sinh ig' + e *" sinh g cosh ig' -
cosh g sinlij'

cosh ig' + e'* sinh ig'

%
% 329
%

Since* j cosh ' | > | sinh i|' |, the argument of the denominators
does not change when < increases by 27r; for similar reasons, the
arguments of the first and third numerators increase by 27r, and the
argument of the second does not change; therefore the circle contains
the points i = l, t = z, and not t= - 1, so it is a possible contour.

Making these substitutions it is readily found that

J\ p x + (x -l) cos a>-(t>) '' cos 0 " + 1

2n J - y + ( '2-l)i

,

and the rest of the work follows the course of \hardsectionref{15}{7} except that the
general form of Fourier's theorem has to be employed.

Example. Shew that, if n be a positive integer,

Qn ' + (x -l ) (.r'2 - l)i cos a,J = \$ (x) /> x') + -2 2 \$ '" (x) P
- ' x) cos m<o,

when (o is real, R (.* ') 0, and | x - 1) x+ l)\ < \ (x- 1) ( + 1) |.

(Heiiie, Kiigelfunktionen; K. Neumann, Leipziger Abh. 1886.)

\Section{15}{8}{TODO.}

A function connected with the associated Legeudre function Pn'" (z) is
the function n" (2), which for integral values of n is defined to be
the coefficient of /< in the expansion of (1 - 2kz + h )~'' in
ascending powers of /t.

It is easily seen that C,," (2) satisfies the dift'erential equation

c?2y (2i/ + l) 2 o?y n(H + 2v) \ rf "*" z -l dz z -\ y '

For all values of n and i it may l)e shewn that we can define a
function, satisfying this equation, by a contour integral of the form

  > jc t-zY "'''

where C is the contour of v; 1 ")"2; this corresponds to Schlafli's
integral. The reader will easily prove the following results :

(I) When n is an integer

C''(z)= -2Yv v + ) ... v+ n- ) a\, h--dl. \ i n+.-h.

"' n\ \ {2n + 2v- ) 2n + 2v-2)... n + 2vy ' dz ' ' '

since P (s) = C - (s), Rodrigues' formula is a particular case of this
result.

(II) When r is an integer,

c*" -',z\= L, p (,\

n-,' ' (2r-l)(2r-3)...3.1 dz " ''

whence C*" (z) = - ~ Pj (2).

n-r ' (2r-l)(2/--3)...3. 1 "

The last equation gives the connexion between the functions C (2) and
P/ (2).

* This follows from the fact that cos/3'>0.

t This function has been studied by Gegenbauer, Wiener
Sitzungsberichte, lxx. (1874), pp. 434- 443; Lxxv. (1877), pp.
891-896; xcvii. (1888), pp. 259-316; en. (1893), p. 942.

%
% 330
%

(III) Modifications of the recurrence-formulae for /* (2) are the
following :

   = 2 0" + (4 >i67(2) = ( -H-2,/)2C"' (2)-2,.(l-22)(7''-l(2).

REFERENCES.

A. M. Legendre, Calcul Integral, 11. (Paris, 1817).

H. E. Heine* Handbuch der Kugelfimktionen (Berlin, 1878).

N. M. Ferrers, Spherical Harmonics (1877).

I. Todhunter, Functions of Laplace, \Lame\ and Bessel (1875).

L. ScHLAFLi, Ueber die zwei Heine schen Kugelfunhtionen (Bern, 1881).

E. W. HoBSON, Phil. Trans, of the Royal Society, 187 a (1896), pp.
443-531.

E. W. Barnes, Quarterly Journal, xxxix. (1908), pp. 97-204.

R. Olbricht, Stiidien ueber die Kugel- und Cylinder funhtionen (Halle,
1887). [Nova Acta Acad. Leop. lii. (1888), pp. 1-48.]

N. Nielsen, Theorie des fonctions metaspheriques (Paris, 1911).

Miscellaneous Examples f.

1. Prove that when n is a positive integer,

\addexamplecitation{Math. Trip. 1898.}

yi dP

2. Prove that z z )

I \ i as

is zero unless rn - n= + 1, and determine its value in these cases.

dz

\addexamplecitation{Math. Trip. 1896.}

3. Shew (by induction or otherwise) that when n is a positive integer,

(27t + l) P 2( ), = l\ p 2\ 2,(P,2 + p,2+... + p2 \,) + 2(PlPo + P2A
+ + -l ) \addexamplecitation{Math. Trip. 1899.}

4. Shew that

zP,: (z) = nP z) + 2n - 3) P \ 2 (z) + 2n - 7) P \ 4 (2) + .  .

\addexamplecitation{Clare, 1906.}

5. Shew that

z'P " (z) = nin-l) Pn z)+ 2 (2n-4'/-+l) r 2n-2r + l)-2 P \ 2, z),
where p = hi or I (n-l). \addexamplecitation{Math. Trip. 1904.}

* Before studying the Legendre function P (z) in this treatise, the
reader should consult Hobson's memoir, as some of Heine's work is
incorrect.

t The functions involved in examples 1-30 are Legendre polynomials.

%
% 331
%

6. Shew that the Legendre polynomial satisfies the relation

 z -\ f = n n- ) n + ) n + 2) j dz A dz.

(Trin. Coll. Dublin.)

7. Shew that

Pap f \ n ! \ 7 - n n + ) \

j z + i -i( -(2 \ l)(2ri + l)(2 + 3)-

\addexamplecitation{Peterhouse, 1905.}

8. Shew that the values of ) a - z f P " (z) P ' z) dz are as follows
:

.' -1

(i) 8'rt (n + 1) when m - n is positive and even,

(ii) -2 ( 2\ i)(7i-2)/(2n + l) when ?/i=n,

(iii) for other values of m and n. \addexamplecitation{Peterhouse, 1907.}

9. Shew that

sin /' (sin;= I ( - )*", / ',, cos'- gP (cos ).

\addexamplecitation{Math. Trip. 1907.}

10. Shew, by evaluating / " P (cos 6) dd \hardsectionref{15}{1} example 2), and then
integrating by

/ I '" :,., a.3...(?i-2)] parts, that | /' (/x) arc sni /x . c/ x is
zero when n is even and is equal to tt < (nA-'W i

when n is odd. \addexamplecitation{Clare, 1903.}

11. If wi and be positive integer.s, and m n, shew by induction that

P, P, V lm-r r -r /2?t + 2 l - 4/-+ 1 \

,, 1.3.5...(2m-l)

where 1,,,= - r-

m !

(Adams, Proc. Royal Soc. xxvil.)

12. By expanding in ascending powers of u shew that

I -\ n ffn,

where 2( is to be replaced by (1-2 ) after the diflFerentiation has
been performed.

13. Shew that P (z) can be expressed as a constant multiple of a
determinant in which all elements parallel to the auxiliary diagonal
are equal (i.e. all elements are equal for which the sum of the
row-index and column-index is the same); the determinant containing n
rows, and its elements being

\ 1 1 11 1

3' 3 ' '5' 5 '""2 -l'*

(Heun, Gott. Nach. 1881.)

14. Shew that, if the path of integration passes above i=l,

dt. \addexamplecitation{Silva.}

p (,.1 [- zJl-J) 2Hl-z ) - " "rrt jo " (l-f2)" i

15. By writing cot ' = cot d - k cosec d and expanding sin ff in
powers of A by Taylor's theorem, shew that

P (cos 6) = - cosec" " ' 6 V i . \addexamplecitation{Math. Trip. 1893.}

' ft ! d (cot 6)

%
% 332
%

16. By considering S /i"P (0), shew that

(Glaisher, Proc. London Math. Soc. vi.)

17. The equation of a nearly spherical surfixce of revolution is

TODO, where a is
small; shew that if a be neglected the radius of curvature of the
meridian is

1 + a 2 n(4j +3)-(m + l)(8/H + 3) P2m + i(cos<9).

\addexamplecitation{Math. Trip. 1894.}

18. The equation of a nearly spherical surface of revolution is

r = a l+ePn i os 6), where e is small.

Shew that if e be neglected, its area is

47ra2 ji + 1,2 l . \addexamplecitation{Trinity, 1894.}

19. Shew that, if k is an integer and

(l-2As + /i2)- = 2 anPni ),

then

where x and ?/ are to be replaced by unity after the differentiations
have been performed.

(Routh, Proc. London Math. Soc. xxvi.) 20. Shew that

' J ' w "-1 ( ) - ' "-1 ( ) ('y> - ' - '

/

= - 1. \addexamplecitation{Catalan.}

21. Let x +9/' +z =r-, z = fir, the numbers involved being real, so
that -l</x<l. Shew that

/ \ n j.n + 1 gn. /J~>

A(m) =

  ! C2"

where r is to be treated as a function of the independent variables
a;,, z in performing the differentiations.

22. With the notation of the preceding example (of. p. 319, footnote
*), shew that

( +i)p (m)+/-A/(/x)= -,, a7>(,-3J-

23. Shew that, if | A | and | 2 | are sufficiently small,

1- 2

(1-2 2 + 2) =0

2 (2 + l)/i"P (2).

%
% 333
%

24. Prove that

\addexamplecitation{Math. Trip. 1894.}

25. If the arbitrary function /(.r) can be expanded in the series

X

f x)= 2 anPn x), n=0

converging uniformly in a domain which inchides the point .y = l,
sliew that the expansion of the integral of this function is

fmd.= -a,-\ a, V -; --- ) /..(...), \addexamplecitation{Bauer.}

26. Determine the coefficients in Neumann's expansion of e" in a
series of Legendre polynomials. \addexamplecitation{Bauer, Journal fur Math, lvi.}

27. Deduce from example 25 that

TT '- (1 .3. 5... (2n-l)) 2,,, ., arcsn.3-=- 2 ....g. .,, ] / . . (
")- A - (.)

\addexamplecitation{Catalan.}

28. Shew that

Qn z) = \ \ 0g( . P z)-\ Pa-x z) P,(Z) + \ P..., Z) P, Z)

+ \ Pn-z P-> z)+-- \ P. Pn-l z) .

\addexamplecitation{\Schlafli; Hermite.}

29. Shew that

Pn.ve also that y (i) = i />. W log J - \, (2),

= f ..( -.) (';r> Ci-X'-.-'-o ''<"--'A<s-'->>-t ( -i-7]

\

. //. \ 1 \ 1 \ 1\ ( -1)( -2)( / + l)(/i + 2)(n+ 3) / IV, * " 2 3/
122232 V 2 J "  "

where - = 1 + + + ... + - . \addexamplecitation{Math. Trip. 1898.}

2 3

30. Shew that the complete solution of Legendre's differential
equation is

the path of integration being the straight line which when produced
backwards passes through the point =0.

* The first of these expressions for / \ i(2) was given by
Christoffel, Journal fiir Math. lv. (1858).

%
% 334
%

31. Shew that s + (s2- 1) =2 A \$2m-a-i (2),

where

32. Shew that, when R )i+1)>0,

27r TO!r(m-a + l) '

[chap. XV

(SchlaBi.

Qn Z)= . -, dh,

and

33. Shew that

  %hz + h?f

 2r-(z--'-l)5 kn

dh

(l-2As + 2)5 r (? + 1 ) /" °° cosh mtt

where the real part of (/i + 1) is greater than m.

du,

\addexamplecitation{Hobson.}

34. Obtain the expansion of /* z) when | arg 2 | < tt as a series of
powers of I/2, when n is not an integer, nameh'

IT

T n + ) T \ y V 2 ' 2' 2 ''' zy

[This is most easily obtained by the method of i 14'51.]

35. Shew that the differential equation for the associated Legendre
function /V" (2) is defined by the schemes*

00

1

\

00 1

hn m -\ n 1 - I, P\ -\ n \ m ~

T y

(Olbricht. 36. Shew that the difi'erential equation for C,," £) is
defined by the scheme

 -1 X 1 \

\ - v n + 2v i- v s,- . -n J

37. Prove that, if

,, (2? + l)(2n + 3)... (27 + 2.-1) . 2\ iv

 ' n n -l) n -4) ... ?i - s-iy n + s) ' dz '

2(2 + l) 271 + 3 then i*,...- - P + 2; P -.

3(2n + 3) . 3J27i\ +5) (2v + 3) (271 + 5)

y3- + 3 2 \ ™+i+ 2 -\ 3 fu-x (271- 1) (271-3) "-"'

and find the general formula.

\addexamplecitation{Math. Trip. 1896.}

See also \hardsectionref{15}{5} example.

%
% 335
%

38. Shew that

p m /cos ) = - r(?t+wi + l) f cos ii + i) <9 - TT + |??t7r V - Am cos
(?t + |)<9-|7r+ 7ft7r Vtt r(n + |) L (2 sin 0)5 2 (2% + 3) (2sin0)

(12 -4m2) (32-4 2 ) cos (n + f)0 f7r + i7r "1 ' 2.4.(2 + 3)(2n + 5)
(2sin0) ' J'

obtaining the ranges of values of m, n and 6 for which it is valid.

\addexamplecitation{Math. Trip. 1901.}

39. Shew that the values of n, for which Pn~"' (cos 6) vanishes,
decrease as 6 increases from to TT when m is positive; and that the
number of real zeros of /* ""' (cos 6) for values of d between -w and
tt is the greatest integer less than n - m+l.

(Macdonald, Proc. London Math. Soc. xxxi, xxxiv.)

40. Obtain the formula

1 rn- \,

- I [1 - 2A cosa) cos + sin o) sin cos(0'- 0)! +/i-] dd= 2 /i"P (cos
\&>)/' (cos 0). 2ir J -TT n=o

\addexamplecitation{Legendre.}

41. H f(x) = x x O) Aud f(x)=-x x<0), shew that, if f(x) can be
expanded into a uniformly convergent series of Legendre pol aiomials
in the range (-1, 1), the expansion is

\addexamplecitation{Trinity, 1893.} (1-2A + AT " :..

42. If 7 T- -TTTTT, = 2 h" 0/ (Z)

shew that

C,," xxi - (a-2 \ i)h (a-j2 - 1) cos 0

  r(2v-i) n 4 r(w-X4-i) r(i/+x) 2(2i/+2X-i) r(wp;,io ~)"" r(n + 2,. +
X)

X x - 1)* (.r,2- i)i c;+;; ( ) (7;+;; (a;,) c[-' (cos< ).

(Gegenbauer, IFiewe?* Sitsimg/sberichte, cil. (1893), p. 942.)

43. If o-,. (2) = P' (  ' -3tz + l)-h t' dt,

where cj is the least root of fi - Ztz + 1 = 0, shew that

(2 + l)o- +,-3(2?i-l).'o- \, + 2( -l)o- \ . = 0, and

4 (4;3 \ 1) an" + 1442V " - : (1 2?i-' - 24? - 291 ) a-,,' - (n - 3)
(2 - 7) 2n + 5) o- - 0, where (r = " -, etc.

(Pincherle, Rendiconti Lincei (4), vii. (1891), p. 74.)

44. If (P-3/i2-fl)- = 2 Rn z)h'\

71=0

shew that 2 ( + l) /2 + i ~ 3(2n+l)2 + (2?i- 1) i? \ 2-0,

 /? +/?' \ ., -2i? ' = 0, and

4 (4 3-1) R "' + 9Gz'iR,:'-z \ 2n + 24n-9l) R,,' - i 2n + 3) 2n + 9)R
=0,

,, d R

where Rj," = -j-, etc.

(Pincherle, Mem. 1st. Bologna (5), i. (1889), p. 337.)

%
% 336
%

45. If (-)=2 r;nWr) ' "'-')" "-')>'

obtain the recurrence-formula

( + l)(2H-l).4 (.r)- (47i2\ l) +l,, \ l(.r)-|-( -l)(2? + l) \ 2( ')
= 0.

\addexamplecitation{Schendel, Journal fur Math, lxxx.}

46. If 11 is not negative and m is a positive integer, shew that the
equation

( 2 - 1 ) + (2'/i + 2) = m ( ( + 2/i + 1 ) 3/ has the two solutions

when X is not a real number such that - 1 .?; 1.

47. Prove that

fClare, 1901.)

48. If F,, x)= I ~; x-\

m=0 ™

shew that "'" '"-' £ (e +* ')l =e P (, a),

where P (*', a) is a polynomial of degree 7i in .r; and deduce that

d dx

\addexamplecitation{Trinity, 1905.}

49. If Fn (x) be the coefficient of s" iu the expansion of

2kz

gflZ g ~ ''3

in ascending powers of z, so that

3 .2 \ 2

Fo x) = 1, Fi x) = X, F2 (x) = -g -, etc.,

shew that

(1) F,i x) is a homogeneous polynomial of degree n in x and h,

(2) ' i =Fn-r -) n n

Pn + 1 C-, ) = ( ' + <*) n ( *'5 ) +*-'' TT, A (=' ) )

(3)

f i (.r)<;.r = C i l),

(4) If y = a( F( x) + aiFi (x) + a2F2 x) + ..., where Uo, !, aa? ...
*'i'e real constants, then the mean value of -j~, in the interval from
x= -h to x= +A is a . \addexamplecitation{Leaute.}

50. If Fn (* ) be defined as in the preceding example, shew that,
when -h <x <h,

 2, W = (-0-2- . (cos - -2,- cos - - + cos- + ...j,

\addexamplecitation{Appell.}


\documentclass[../main.tex]{subfiles}

\begin{document}
\subsection{Depth-first Search}
The following search algorithm is how we will determine the connected components of a disconnected graph. We do this by selecting an arbitrary vertex of the graph as the "root". And then exploring along the branches from the vertex as far as possible until we need to backtrack, at which point we choose a new undiscovered arbitrary root and repeat. Labeling each vertex discovered along that exploration as discovered. The aim is to discover all the vertices of the graph.

\begin{algorithm}[H]
\caption{DFS\cite{wiki}}\label{dfs}
Let $G$ be a graph with vertex set $V = \{1,...,n\}$
\begin{algorithmic}[1]
\Procedure{DFS}{$G,V$}
\State label $v$ as discovered
\ForAll{edges from $v$ to $w$ \textbf{in} $G.$adjacentEdges$(V)$}
	\If{(vertex w is not labelled as discovered)}
	 	\State recursively call DFS$(G,w)$
	\EndIf
\EndFor
\EndProcedure
\end{algorithmic}
\end{algorithm}

\noindent This algorithm will allow you to find the connected components of a disconnected graph. Then using the following algorithm we can check if our forest at each step of our algorithm is acyclic. We do this by counting the number of edges that each component has since we know a tree can have at most $n-1$ edges by \textit{lemma 3.7}. This procedure is invoked in \textit{algorithm 3}.

\begin{algorithm}[H]
\caption{Acyclic Check}\label{acyclic}
Let $G$ be a graph with the set of connected components $C$ as found by DFS(G,v) where v is an arbitrary vertex in G.
\begin{algorithmic}[1]
\Procedure{ACYCLIC}{$G,C$}
\ForAll{$i$ \textbf{in} $C$}
	\If{$i.$edgeCount() $> n-1$}
		\Return False
	\EndIf
\EndFor
	\Return True
\EndProcedure
\end{algorithmic}
\end{algorithm}
\end{document}


%!TEX root =  ../main.tex

\objective{Utilize standard angle values and circular symmetry}

There are not many angles we could draw for which we could precisely name
the displacement involved.  Two shapes we know every such thing about are the
square and the equilateral triangle.  We might begin by drawing a square with
sides of length 1, and then drawing a diagonal.

\begin{figure}[h]
\begin{center}
\begin{tikzpicture}[scale=2]
	\draw (0,0) -- (1,0) -- (1,1) -- (0,1) -- (0,0) -- (1,1);
	\draw (0,0.9) -- (.1,.9) -- (.1,1);
	\node at (0.5,0) [anchor=north] {1};
	\node at (0,0.5) [anchor=east] {1};
\end{tikzpicture}
\begin{tikzpicture}[scale=2]
	\draw (0,0) -- (2,0) -- (1, 1.732050808) -- (1,0) -- (0,0) -- (1,1.732050808);
	\draw (1,.1) -- (1.1,.1) -- (1.1,0);
	\node at (1.5,0) [anchor=north] {1};
	\node at (1.7,.85) [anchor=south]{2};
\end{tikzpicture}
\caption{Special triangles are halves of thoroughly understood shapes.}
\end{center}
\end{figure}

According to the Pythagorean Theorem, what must the length of the
hypotenuse be?  For either one of the triangles, what are the angles and
the ratios of the sides?

Next, consider an equilateral triangle with side of length 2.  If all the angles
are the same, what must they be?  Now we draw the perpendicular bisector,
which is also the altitude.  How long are the two half of the side we
bifurcated?  What are the angles we split in two?  What would Pythagorus
tell you the length of the altitude is?

\begin{derivation}{Special Triangles}
The special triangles are derived from
squares and equilateral triangles.

A $45^\circ$-$45^\circ$-$90^\circ$ triangle has sides with ratios $1:1:\sqrt{2}$.

A $30^\circ$-$60^\circ$-$90^\circ$ triangle has sides with ratios $1:\sqrt{3}:2$.
\end{derivation}

Armed with such triangles, we can answer what sine, cosine, and tangent are
for $30^\circ$, $45^\circ$, and $60^\circ$, nine facts you should memorize.

\subsection{Reflection and Symmetry}
In the previous section of this chapter, we computed reference angles without
explaining why.  We will rectify that now.  Consider that there is a point $(x,y)$
somewhere in the first quadrant.  Draw a ray from the origin through this point,
and make it the terminal side of an angle.  Call that angle $\theta$.

\begin{figure}[h]
\begin{centering}
\begin{tikzpicture}[scale=0.5]
	\draw[<->, thick] (-4,0) -- (4,0);
	\draw[<->, thick] (0,-4) -- (0,4);
	\draw[fill] (55:3) circle (0.1) node[anchor=south] {$(x,y)$};
	\draw (3,0) arc(0:55:3);
	\node at (1,0.7) {$\theta$};
	\draw (0,0) -- (55:3);
\end{tikzpicture}
\caption{Turning angle $\theta$ results in going to coordinates $(x,y)$.}
\end{centering}
\end{figure}

What will be at the reference angle in the fourth quadrant?  If we turn
down from $0^\circ$ to $360^\circ-\theta$, we will be taken to $(x,-y)$.
In the second quadrant, the reference angle is $1800^\circ-\theta$, which
ends in the coordinates $(-x,y)$.  Finally, the third quadrant reference
angle of $180^\circ+\theta$ points to $(-x,-y)$.

Through the use of symmetry and reference angle, every fact we
learn in the first quadrant instantly reveals three other facts around
the grid.  Fill knowledge of the first quadrant entails full knowledge
of the entire Cartesian plane.

\begin{figure}[h]
\begin{centering}
\begin{tikzpicture}[scale=0.5]
	\draw[<->, thick] (-4,0) -- (4,0);
	\draw[<->, thick] (0,-4) -- (0,4);

	\draw[fill] (55:3) circle (0.1) node[anchor=south] {$(x,y)$};
	\draw (3,0) arc(0:55:3);
	\node at (1,0.7) {$\theta$};
	\draw (0,0) -- (55:3);

	\draw[fill] (125:3) circle (0.1) node[anchor=south] {$(-x,y)$};
	\draw (0,0) ++ (125:3) arc(125:180:3);
	\node at (-1,0.7) {$\theta$};
	\draw (0,0) -- (125:3);

	\draw[fill] (235:3) circle (0.1) node[anchor=north] {$(-x,-y)$};
	\draw (0,0) ++ (180:3) arc(180:235:3);
	\node at (-1,-0.7) {$\theta$};
	\draw (0,0) -- (235:3);

	\draw[fill] (-55:3) circle (0.1) node[anchor=north] {$(x,-y)$};
	\draw (3,0) arc(0:-55:3);
	\node at (1,-0.7) {$\theta$};
	\draw (0,0) -- (-55:3);
\end{tikzpicture}
\caption{Reference angles are examples of horizontal and/or vertical symmetry. }
\end{centering}
\end{figure}

\subsection{$x$ and $y$ and slope}
Even the infinite number of points in the first quadrant can be scaled
down somewhat.  Let us consider only the points 1 unit away from
the origin.  Such points make a circle, called the Unit Circle.
If you think of sine as opposite over hypotenuse, and the hypotenuse is
always 1, then on the unit circle, sine equals the opposite leg
of the reference triangle.  On the unit circle, this is always the $y$
value.  Sine \emph{is} $y$.

Again, if cosine is adjacent over hypotenuse and the hypotenuse is
always one, then on the unit circle, cosine equals the adjacent leg
of the reference triangle.  On the unit circle, this always the $x$
value.  Cosine \emph{is} $x$.

Lastly, if tangent is opposite over adjacent, then on the unit circle
that is $y$ over $x$, rise over run, a.k.a. slope.  Tangent \emph{is}
slope.  And for any radius greater or less than 1, we need only
multiply by that radius.

When we overlay this way of thinking about trigonometric functions
(cosine is $x$, sine is $y$, tangent is slope) onto the grid, we can see
that all the first quadrant information we might gather can be
applied to any other quadrant with only sign changes.  Sine (as $y$)
will be positive in the first and second quadrant, and negative in
the third and fourth.  Cosine (as $x$) will be positive in the first
and fourth quadrants, and negative in the second and third.
Tangent (as $m$) will be positive in the first and third, and negative
in the second and fourth.


\section{Background}

\subsection{State}

\cindex{environment} has state $S_t^e$, which receives action $A_t$ and emits observation $O_{t+1}$ and scalar reward $R_{t+1}$.

\cindex{state} is a function of all history, so the reinforcement learning could be a Markov process:
\begin{equation}
	S_t = f([O_1, R_1, A_1, \dots, A_{t-1}, O_t, R_t])
\end{equation}

\subsection{Planning and Learning}

\subsubsection{Planning}

\cindex{planning} uses simulated experience from \cindex{model}. So the model is known.

There are two different planning methods:
\begin{description}
	\item[\cindex{state-space planning}] searches through state space.
	\item[\cindex{plan-space planning}] searches through plans. It uses evolutionary methods. Seldom used in reinforcement learning.

\end{description}

\subsubsection{Learning}
\cindex{learning} uses real experience of environment. So the environment and policy are unknown.

\subsection{Agent}

\cindex{agent} has three important components:
\begin{itemize}
	\item policy
	\item value function
	\item model
\end{itemize}

\subsubsection{Policy}

\cindex{policy} can be deterministic or statistics :
\begin{description}
	\item[deterministic] $a = \pi(s)$
	\item[stochastic] $\pi(a|s) = \mathbb{P}[A_t=a|S_t=s]$
\end{description}

\subsubsection{Model}
\cindex{model} is anything an agent can use to predict environment response. so a model simulate environment.

\begin{description}
	\item[distribution model] explores all possibility and all probability
	\item[sample model] explores only one possibility
\end{description}

\cindex{distribution model} is stronger than \cindex{sample model} because it can always generate sample. However in practice it is much easier to obtain sample models.

\subsection{Evaluation and Control}

\begin{description}
	\item[\cindex{evaluation}] tries to calculate $v(s)$ or $q(s,a)$.
	\item[\cindex{control}] tries to calculate $v_*(s)$ , $q_*(s,a)$ or $\pi_*$.
\end{description}

\subsection{Exploration and Exploitation}

\begin{description}
	\item[\cindex{exploration}] find more information about environment.
	\item[\cindex{exploitation}] exploit known information to maximize reward.
\end{description}

\subsection{Incremental Mean}

If $Q_{n+1}$ is the mean of $R_i$: $Q_{n+1} = \frac{1}{n} \sum\limits_{i=1}^n R_i$. $Q_{n+1}$ could be rearrange as:
\begin{equation}
	Q_{n+1} = Q_n + \frac{1}{n} \Big( R_n - Q_n \Big)
\end{equation}

If we replace $\frac{1}{n}$ by $\alpha$, the formula becomes:
\begin{equation}
	\begin{aligned}
		Q_{n+1} &= Q_n + \alpha \Big( R_n - Q_n \Big)\\
		&= (1-\alpha )^n Q_1 + \sum_{i=1}^n \alpha (1 - \alpha )^{n-1}R_i
	\end{aligned}
\end{equation}

$Q_n$ will be convergent if $\alpha$ follows the following formula:
\begin{equation}\label{convergenceofsequence}
	\begin{cases}
		\sum\limits_{n=1}^\infty \alpha_n = \infty \\
		\\
		\sum\limits_{n=1}^\infty \alpha_n^2 < \infty
	\end{cases}
\end{equation}

\subsection{Terminology}

\cindex{backup} uses future return to update current value.


\section{communityalg}\label{communityalg}

Algorithms and functions in Matlab for community detection in networks.
Expands BrainConnectivity toolbox.

\section{Matlab/Octave algorithms and
functions}\label{matlaboctave-algorithms-and-functions}

\begin{itemize}[<+->]
\tightlist

  \subsection*{ami.m} Returns the adjusted mutual information between two
  membership vectors.

  \subsection*{association\_score.m} Returns the association score between
  pairs of communities specified by the graph and membership.

  \subsection*{asymptotic\_modularity.m} Compute asymptotic modularity of a
  graph with respect to a membership vector.

  \subsection*{asymptotic\_modularity\_sum.m} TODO

  \subsection*{asymptotic\_surprise.m} Compute asymptotic surprise of a graph
  with respect to a membership vector.

  \subsection*{clique.m} Generate an adjacency matrix of a clique graph with
  \texttt{n} nodes.

  \subsection*{cluster\_similarity.m} Compare two membership vectors.

  \subsection*{clustering\_entropy.m} Compute the clustering entropy of an
  agreement matrix as in ``Gfeller, Newman, 2006''.

  \subsection*{community\_robustness\_weighted.m} TODO

  \subsection*{community\_size2memb.m} Convert an array where every element
  is the size of a clique to the correspondig membership vector.

  \subsection*{comm\_mat.m} Returns the block matrix of a graph and its
  community structure as membership.

  \subsection*{compute\_surprise.m} Compute the surprise given surprise
  paramenters.

  \subsection*{consensus\_clustering.m} TODO

  \subsection*{consensus\_clustering\_weighted.m} TODO

  \subsection*{consensus\_entropy.m} TODO

  \subsection*{consensus\_robustness.m} TODO

  \subsection*{correlation\_louvain.m} Adaptation of the BCT
  \texttt{community\_louvain} method for correlation matrices, as
  described in MacMahon,2015.

  \subsection*{count\_comm.m} Plot the histogram with the community size
  given a membership vector.

  \subsection*{cycle\_graph.m} Generate the adjacency matrix of a cycle graph
  with n nodes.

  \subsection*{effcommplot.m} TODO

  \subsection*{generate\_agreement.m} Generate the agreement matrix for a
  given community detection method.

  \subsection*{generate\_agreement\_weighted.m} Generate the weighted
  agreement matrix for a given community detection method.

  \subsection*{generate\_connected\_components.m} TODO

  \subsection*{graph\_JS\_similarity.m} Compute the quantum Jensen Shannon
  divergence between two adjacency matrices.

  \subsection*{graph\_laplacian.m} Compute the graph combinatorial Laplacian
  matrix \texttt{L=D-A}.

  \subsection*{group2membership.m} Convert a cell of arrays representing the
  nodes in the communities to a membership vector.

  \subsection*{image\_to\_network.m} Convert a gray index image to its
  corresponding adjacency graph.

  \subsection*{imagesctxt.m} Show a matrix like \texttt{imagesc} but with
  text values of elements displayed on the pixels.

  \subsection*{isoctave.m} Returns true if using Octave, false if using
  Matlab.

  \subsection*{jensen\_shannon\_sim.m} Returns the Jensen-Shannon symmetrized
  information theoretic distance between two graph Laplacians.

  \subsection*{k\_regular.m} Generate a \texttt{k}-regular graph, a graph
  where the degree of every vertex is \texttt{k}.

  \subsection*{KL.m} Returns the binary Kullback-Leibler divergence between
  Bernoulli distribution \texttt{p} and \texttt{q}.

  \subsection*{kullback\_leibler\_sim.m} Returns the Kullback-Leibler
  divergence between two graph Laplacians.

  \subsection*{logHyperProbability.m} Compute the logarithm of the
  hypergeometric probability in base 10.

  \subsection*{membership2groups.m} Convert a membership vector to a cell of
  arrays of nodes in every community.

  \subsection*{membership\_agreement.m} DEPRECATE

  \subsection*{membership\_similarity.m} TODO

  \subsection*{method\_best.m} Functio handle to the community detection
  method that returns the best value over a set of repetitions.

  \subsection*{modularity.m} Returns the modularity of a graph with respect
  to a membership vector.

  \subsection*{nearcorr.m} Returns the nearest correlation matrix of a square
  matrix. Implementation by Nick Higham.

  \subsection*{nearestSPD.m} Returns the positive definite matrix of a square
  matrix. Implementation by Nick Higham.

  \subsection*{norm\_conf\_mat.m} DEPRECATE

  \subsection*{number\_connected\_components.m} Returns the number of
  connected components of a graph.

  \subsection*{number\_of\_edges.m} Returns the number of edges of a binary
  or weighted graph.

  \subsection*{paco.m} Function handle to the MEX implementation of PACO.

  \subsection*{partition\_params.m} Returns the partition parameters for use
  with \texttt{compute\_surprise}.

  \subsection*{quantum\_density.m} Returns the quantum density of a graph,
  \texttt{Brauenstein\ et\ al.} ``Ann. of Combinatorics, 10, no 3
  (2006), 291-317.''

  \subsection*{reindex\_membership.m} Transform a membership vector to have
  community indices sorted by community size from \texttt{1} to
  \texttt{\textbar{}C\textbar{}}

  \subsection*{reorder\_membership.m} Linearize a membership vector to have
  continuous indices of communities from \texttt{1} to
  \texttt{\textbar{}C\textbar{}}

  \subsection*{ring\_of\_cliques.m} Returns a network ring of cliques, with
  given number of cliques and clique size and its membership.

  \subsection*{ring\_of\_custom\_cliques.m} Returns a network ring of
  cliques, with given size of cliques specified as input and its
  membership.

  \subsection*{rmtdecompose.m} Returns the Random Matrix Theory decomposition
  of a correlation matrix.

  \subsection*{robustness\_configuration\_interp\_und.m}

  \subsection*{robustness\_edge\_weight\_und.m}

  \subsection*{run\_cluster\_similarity.m}

  \subsection*{rwalkent.m} Returns the random walk entropy of a graph as in
  \texttt{Estrada\ et\ al.} Walk entropies in graphs, ``Linear Algebra
  and its Applications 443 (2014) 235--244''

  \subsection*{significance.m} Returns the significance of a graph
  partitioning, \texttt{Traag\ (2013)}.

  \subsection*{smi.m} Returns the standardized mutual information of two
  membership vectors.

  \subsection*{sort\_group\_by\_size.m} Sort community groups by size.

  \subsection*{star\_of\_custom\_cliques.m} Returns a star of cliques, every
  clique is connected to all other cliques with one edge.

  \subsection*{surprise.m} Returns the surprise of a graph partitioning.

  \subsection*{threshold\_by\_giant\_component.m} Returns the threshold over
  which the graph has more than one connected component.

  \subsection*{threshold\_by\_num\_edges.m} Returns a graph thresholded to
  have a specific number of edges.

  \subsection*{vonneumann\_entropy.m} Returns the VonNeumann quantum entropy
  of graph \texttt{Brauenstein\ et\ al.} ``Ann. of Combinatorics, 10, no
  3 (2006), 291-317.''

  \subsection*{write\_brainet.m} Write a graph with coordinates of nodes and
  membership to Brainet format.

  \subsection*{write\_brainet\_community.m} TODO

  \subsection*{writetoEdgesList.m} TODO

  \subsection*{writetoPAJ\_labels.m}

  \subsection*{writetoPAJ\_labels\_coords.m}
\end{itemize}

\section{Python algorithms}\label{python-algorithms}

\begin{itemize}[<+->]
\tightlist

  \subsection*{find\_intersections.py} Find the intersections of edges in a
  bipartite graph (TODO)
\end{itemize}

\section{Datasets}\label{datasets}

This repository contains the 638 areas template used by Crossley (2013).
It consists of two files:

\begin{enumerate}[<+->]
\def\labelenumi{\arabic{enumi}.}
\tightlist

  \texttt{template.nii} is the NIFTI file describing the template, MNI
  space

  \texttt{template\_638.txt} is the description of anatomical a
\end{enumerate}

Additionally the file \texttt{template\_638\_coords\_abbr.txt} is
organized as follows

\begin{longtable}[]{@{}llllll@{}}
\toprule
Node & X & Y & Z & Label & Abbr\tabularnewline
\midrule
\endhead
\bottomrule
\end{longtable}

and differently from \texttt{template\_638.txt} the NodeID starts from 0
to 637 (for indexing with Python).


\subsection{One-shot attack}

\begin{lemma}[Compression attack]

Let $\textrm{Com}$ be a compression function, $\textrm{Enc}$ be a strictly length-monotonic
encryption function, $f$ be a rendering function and $Q$ be a plaintext
predicate detectable with non-negligible advantage $\alpha$ over plaintext
distribution $\mathcal{M}$.

Then:
\begin{align*}
    \exists \alpha \text{ non-negl}:
    \forall \textrm{Enc}:
    \exists g:\\
    \exists PPT \mathcal{A}:
    \forall PPT \mathcal{S}:\\
    \text{Adv}_{\mathcal{SE}(\textrm{Enc}, \textrm{Com}), \mathcal{A}, \mathcal{S}}
    (\lambda, f, \mathcal{M}, g) = \alpha(\lambda)
\end{align*}

\end{lemma}

For a full proof, see Appendix A.

\subsection{Amplified attack}\label{subsec:amplification}

We can now amplify the attack to achieve a better probability of success by a small modification in our adversary.
The amplification is parameterized by an odd parameter $k$.

Let the amplification adversary be defined as follows:

\begin{lstlisting}[texcl,mathescape,basicstyle=\small]
def $\mathcal{A}(Q, \mathcal{M})$:
    $(r_1, r_2) \leftarrow \mathcal{O}_R(\textrm{Com}, f, Q, \mathcal{M})$

    $low = 0$
    $high = 0$

    for $i$ = $0$ to $k$:
        $l_1 = |\text{Reflect}^{\mathcal{E}_{pk}}_s(r_1)|$
        $l_2 = |\text{Reflect}^{\mathcal{E}_{pk}}_s(r_2)|$

        if $l_1 < l_2$:
            $low = low + 1$
        else:
            $high = high + 1$

    if $low > high$:
        return True
    else:
        return False
\end{lstlisting}

\begin{lemma}[Amplification]

Under the assumptions of the Compression Attack Theorem against $f, \textrm{Com}$
and compression-detectable predicate $Q$ with non-negligible
detectability margin $\alpha(\lambda)$,
the amplified adversary achieves an arbitrarily large advantage
against a non-negligible subset of elements, the
\textit{amplifiable elements} distinguished by predicate $Amp$.
\begin{align*}
    \forall \textrm{Enc}:
    \exists g:\\
    \exists PPT \mathcal{A}:
    \forall PPT \mathcal{S}:\\
    \exists Amp:
    \exists B \text{ non-negl}:
    \exists C \text{ negl}:\\
    \Pr_{s \leftarrow \mathcal{M}}[Amp(s)] = B(\lambda) \land\\
    \text{Adv}_{\mathcal{SE}(\textrm{Enc}, \textrm{Com}), \mathcal{A}, \mathcal{S}_{Amp}}
    (\lambda, f, \mathcal{M}, g) = 1 - \pi - C(k)
\end{align*}

\end{lemma}

The complete proof can be found in Appendix A.