We assume $x$ is a real variable. According to "Advanced Engineering Mathematics 10th Edition", a differential equation $y'' + p(x) y + q(x) y = r(x)$ has a power series solution in powers of $x-x_0$ if $p,q,r$ are analytical at $x = x_0$.
Now this is Legendre's differential equation:
$(1-x^2)y'' - 2xy' + n(n+1) y = 0$ ($n$ is real)
According to the book, this differential equation has a power series solution in powers of $x$ because $\frac{-2x}{1-x^2}$ and $\frac{n(n+1)}{1-x^2}$ are analytical at $x = 0$. But is that true? It is trivial $n(n+1)$ is analytical but I think $-2x$ and $1-x^2$ are not analyticacl: I mean these two functions aren't seemed to fulfill Cauchy-Riemann equation, which you see in complex analysis. (I know Cauchy-Riemann equation is used to determine if a function is regular but a regular function is analytical, I believe.)
They are analytical.
The general definition of an analytic function (of one variable) is that for every $a$ there's a neighborhood for which there's constants $c_j$ such that $f(x) = \sum_0^\infty c_j (x-a)^j$ there (for more variables you have to sum over all combos of exponents with coefficient going with that).
Obviously this is true for every polynomial. Becase if $P(x) = \sum p_jx^j$ is a polynomial we have that $P(x) = P(x-a+a) = \sum_0^n p_j( (x-a) + a)^j$ and by binomial expansion we see that $P(x)$ is a polynomial in $x-a$ as well.
The definition is not actually different in complex analysis, it just happens that they in the complex case are the same as holomorphic (ie differentiable) functions which make some authors use that as a definition instead.