TITLE: Sum of Legendre function
QUESTION [5 upvotes]: I'm currently trying to solve the sum
$$
f(x)=\sum\limits_{n=0}^\infty\frac{x^{n+1}}{n+1}P_n(x),
$$
where $P_n(x)$ is the Legendre function of order n.
I also named the sum $f(x)$ since I'm the solution will be a function of $x$. The first thing that can be noticed is that the function $f(x)$ is an uneven function.
My first step was to take the derivative of $f(x)$, this then yields that:
$$
f'(x)=\sum\limits_{n=0}^\infty x^{n}P_n(x)+\sum\limits_{n=1}^\infty\frac{x^{n+1}}{n+1}P'_n(x).
$$
Using the generating function
$$
\frac{1}{\sqrt{1-2hz+h^2}}=\sum\limits_{n=0}^\infty h^nP_n(z)
$$
I'm able to rewrite the first term as:
$$
f'(x)=\frac{1}{\sqrt{1-x^2}}+\sum\limits_{n=1}^\infty\frac{x^{n+1}}{n+1}P'_n(x).
$$
Now for the second term I'm still stuck, I've been trying a few recursive relations, in the hope to maybe get a first order differential equation for $f(x)$. So far I haven't found the right recursive relation yet.
Now I'm wondering if there is maybe a better approach that I should have taken, or that if there is an easy trick to solve the second term?
After playing with the function in Mathematica I figured out that the most probable solution is
$$
f(x)=\mathrm{arctanh}(x),
$$
this gives me a direction, but still I have no clue for the second term. All help is welcome!

REPLY [4 votes]: While the other response is a good exercise in exploiting recurrence relations, a much more direct route is provided by the technique of summing under the integral which converts the series into an integral of the generating function:
$$\begin{align}
f{\left(x\right)}
&=\sum_{n=0}^{\infty}\frac{x^{n+1}}{n+1}P_{n}{\left(x\right)}\\
&=\sum_{n=0}^{\infty}P_{n}{\left(x\right)}\int_{0}^{x}\mathrm{d}t\,t^{n}\\
&=\int_{0}^{x}\mathrm{d}t\,\sum_{n=0}^{\infty}t^{n}P_{n}{\left(x\right)}\\
&=\int_{0}^{x}\mathrm{d}t\,\frac{1}{\sqrt{1-2xt+t^2}}\\
&=\int_{-x}^{\frac{\sqrt{1-x^2}-1}{x}}\mathrm{d}u\,\frac{2}{1-u^2};~~~\small{\left[\sqrt{1-2xt+t^2}=tu+1\right]}\\
&=2\int_{\frac{1-\sqrt{1-x^2}}{x}}^{x}\frac{\mathrm{d}w}{1-w^2};~~~\small{\left[-u=w\right]}\\
&=2\operatorname{arctanh}{\left(x\right)}-2\operatorname{arctanh}{\left(\frac{1-\sqrt{1-x^2}}{x}\right)}\\
&=\operatorname{arctanh}{\left(x\right)}.\blacksquare\\
\end{align}$$