What are the boundary conditions for the Hydrogen Atom which cause the polar power series to need to terminate? I am trying to solve the Hydrogen Atom, and I am stuck in the polar equation. To simplify, I have taken the special case in which $m=0$ to get the Legendre Equation:
$$(1-x^2)P''(x)-2xP'(x)+AP(x)$$ $$(x=\cos \theta)$$
And I've worked out the recursion function to be
$$a_{n+2}=\frac{n(n+1)-A}{(n+1)(n+2)}a_n$$
And I know this needs to terminate to obtain the correct form for $A$. I have tried imposing that the derivative of the polar function $\Theta$ is $\Theta_{\theta}=0$ at $\theta=0,\pi$ so that the function is continuous where it matches the $z$-axis, but due to the chain rule, it automatically becomes 
$$\frac{d\Theta}{d\theta}=-\sin\theta \frac {dP}{dx}$$
Which is automatically $0$ for those values, so it is useless.
I've also tried imposing that $\Theta(\theta)=\Theta(-\theta)$ to account for going backwards below $\theta=0$, but since $\cos(-\theta)=\cos\theta$ it just becomes
$$\Theta(-\theta)=\Theta(\theta) \implies P(x)=P(x)$$
So I am at a loss. Please help.
 A: Instead of expanding in series around $x=0$, you'll have better luck with a series around $x=1$. Then you'll get
$$c_{n+1}=c_n\frac{A-n(n+1)}{2(n+1)^2}.$$
Radius of convergence of this series (unless it terminates) is then
$$r=\lim\limits_{n\to\infty} \left|\frac{c_n}{c_{n+1}}\right|=\lim\limits_{n\to\infty}\frac{2(n+1)^2}{A-n(n+1)}=2.$$
The only two singular points the equation we're solving has are the regular singular points at $x=\pm1$. As we're expanding into Taylor series around $x=1$, our solution will be analytic at this point. But limited radius of convergence of Taylor series implies that there's a singularity somewhere. Indeed, we still have the other singular point at $x=-1$. This is exactly the point of singularity beyond which the series diverges unless it terminates.
But OTOH, we know from the symmetry of the problem (invariance of the Hamiltonian under $z$-inversion) that $P(-x)=\pm P(x)$, i.e. $P$ is either even or odd. As $P$ is analytic at $x=1$ by construction, it follows that it must also be analytic at $x=-1$.
This then requires that the series terminates, so analyticity is the boundary condition you are looking for.
A: The issue of finding or justifying the correct boundary conditions for the Schrödinger equation (or for the ordinary differential equations resulting from its factorization) is a never-ending story. Reasons like "wavefunctions must be continuous", "$\psi$ cannot diverge", or "it must go to zero because we expect zero probability" usually contain half of the truth but miss the real point and cannot go beyond the level of hand-waiving arguments. 
The probabilistic interpretation  requires only that, for a problem defined on a domain $D$ in $\mathbb{R}^n $, $|\psi|^2 $ would be integrable, i.e. it should belong to the Hilbert space $L_2(D)$. In $L_2(D)$ many of the elements are not even continuous and are allowed to diverge, provided their square modulus remains integrable.
The condition which puts a really strong constraint on the wavefunctions is the additional requirement of being in the domain of a self-adjoint operator. For differential operators, self-adjointness is quite a strong condition. Of course, the differential nature of the operator requires to restrict the domain to the subset of differentiable elements of $L_2(D)$. But it is the requirement of self adjointness which provides the real constraints on the boundary conditions. So, for example, the vanishing of the wavefunction at the boundary for the infinite square well, or the continuity conditions for a finite step-wise constant potential, all can be found and justified as condition to ensure the correct domain where momentum and/or hamiltonian operators are self-adjoint.
The case of the angular momentum is not different. The "periodicity" condition on the $\phi$ dependence of the wavefunction, when represented in spherical coordinate, is again consequence of restricing to elements of the subset of the differentiable function on $L_2[0,2 \pi]$ where the z-component $\hat L_z$ of the angular momentum is self-adjoint.
Finally, also $\hat L_x$ and $\hat L_y$, and then $\hat L^2$ put restriction on the boundary conditions on $\theta$, always as consequence of the self-adjointness requirement. It turns out (it is an exercise of integration by parts) that  a logaritmic divergence of the wavefunction at $\theta=0$ and at $\theta=2 \pi$ (resulting from a value of A which does not terminate the series after a finite number of terms), although compatible with the square modulus integrability on the interval $[0,2 \pi]$, would not be compatible with the domain where $\hat L^2$ is self adjoint.
About the reasons and importance of being self-adjoint for QM operators I can rely on two references here on SE: Why is quantum mechancis is not content with symmetric operators, but wants self-adjoint operators? and  What exactly implies the need of quantum mechanics for self-adjoint and not only symmetric operators?
A: I'm not going to prove anything, but I hope to give a reasonable argument. Suppose the series does not terminate. What happens for large $n$? 
Well, from your recursion we get 
$$a_{n+2}\approx a_n$$
Cool. So the coefficients become one in the same. We can then give an approximate solution for the large powers only, with the usual geometric series:
$$\frac{1}{1-x}=1+x+x^2+\dots$$
But then think about what your solution has to do. It is a wavefunction, right? So it has to be normalizable, i.e.
$$\int\limits_0^\pi P(\cos\theta)^2\sin\theta\,d\theta=\int\limits_{-1}^1P(x)^2\,dx=\mathrm{finite}$$
But plug this approximate solution we found. What do we get?
$$\int\limits_{-1}^{1}\frac{1}{(1-x)^2}\,dx=\left[\frac{1}{1-x}\right]_{x=-1}^{x=1}$$
Which clearly diverges. Thus, the series must terminate at some point and $A=l(l+1)$ for some natural number $l$. And this also fixes the parity of the exponents in the polynomial, since $l(l+1)$ can only zero out one parity of coefficients, while the other has to be zero from the start.
A: The reason it must terminate is literally the physics. Mathematically the Legendre differential equation has two types of solutions. Solutions of type 1, named $P_\ell(x)$, which are finite at $x=\pm 1$ and of type 2, denoted by $Q_\ell(x)$, which blow up at $x=\pm 1$. So physically we must demand our solution to be finite at $x=\cos\theta=\pm 1$ because it must represent not only a normalizable function but also a bounded function within the problems domain (in this case $[-1,1]$), so that we can give its values a probabilistic interpretation. Now how to see it from the equation. 
Study two cases. 
Case 1: $A=\ell(\ell +1)$ for $\ell$ an integer.
In this case as your recursion formula shows, the coefficient $a_{\ell+2}$ will vanish and the rest will be zero from then on. Leading to the Legendre polynomials of the first kind. 
Case 2: $A\neq\ell(\ell +1)$.
One can study the radius of convergence of the series by taking the limit of the ratio between the coefficients,
$$r = \lim_{n\rightarrow\infty} \left|\frac{n(n+1)-A}{(n+1)(n+2)}\right|=1,$$
which states that your series Ansatz will just converge for $|x|< 1$ (notice the inequality is strict), this is exactly the behaviour of the $Q_\ell$ mentioned above. For the Hydrogen atom this solutions (which can be expressed as infinite series) are discarded because of the requirement of finiteness at the edges. 
