Frobenius expansion of the Legendre equation at an endpoint (source code)

= Frobenius expansion of the Legendre equation at an endpoint
{c}
{title2=$a_{k+1}=\frac{(k-n)(k+n+1)}{2(k+1)^2}a_k$}

= Endpoint Frobenius expansion for Legendre polynomials
{c}
{synonym}

For the <Legendre differential equation> $(1-x^2)y''-2xy'+n(n+1)y=0$, put $t=1+x$. The equation becomes $t(2-t)y_{tt}+2(1-t)y_t+n(n+1)y=0$. Its <indicial equation> is $2r^2=0$. The exponent-zero <power series> $\sum a_kt^k$ obeys the displayed <linear recurrence relation>. For a nonnegative integer $n$, it terminates at degree $n$, giving a <Legendre polynomial> with $a_0\ne0$. Every analytic solution at the endpoint is proportional to this one, since the recurrence determines all coefficients from $a_0$.

The second independent solution has the local form $P_n(x)\log(1+x)+B(x)$, where $B$ is analytic near $-1$. Indeed, <reduction of order> gives $P_n(x)\int dx/[(1-x^2)P_n(x)^2]$, whose integrand is $1/[2P_n(-1)^2(1+x)]$ plus an analytic function. Rescale the second solution to obtain the unit coefficient of $P_n\log(1+x)$. Reflection gives the corresponding expansion at $x=1$. This also proves the logarithmic divergence of the independent <Legendre function of the second kind> at each endpoint.