Consider the function $$g(x)=\begin{cases} \frac{1}{x}\ln\frac{1}{1-x}\hspace{.5cm} x\neq0,\\ 1 \hspace{1.8cm} x=0.\end{cases}$$
Prove that the improper integral $\int_{0}^{1}g(x)dx$ converges, that the series $\sum_{k=1}^{\infty}\frac{1}{k^2}=1+\frac{1}{4}+\frac{1}{9}+\cdots$ converges, and that the two limits are equal.
My attempt of a proof so far is the following:
First I defined $f(x)=\int_{0}^{x}\frac{1}{u}\ln\frac{1}{1-u}du$ and performed a Taylor expansion at 0 to get $f(x)=\int_{0}^{x}\frac{1}{u}\ln\frac{1}{1-u}du=\int_{0}^{1}\sum_{k=1}^{\infty}\frac{u^{k-1}}{k}=\sum_{k=1}^{\infty}\frac{x^k}{k^2}$ for $|x|<1$. This part of the proof I had trouble with, but eventually worked through it with some help. Now I need some more help.
The improper integral $\int_{0}^{1}g(x)dx$ can be expressed as $$\lim_{x\to1^-}f(x)=\lim_{t\to1^-}\int_{0}^{t}\frac{1}{x}\ln\frac{1}{1-x}dx=\lim_{x\to1^-}\sum_{k=1}^{\infty}\frac{x^k}{k^2}=\sum_{k=1}^{\infty}\frac{1}{k^2}.$$
It's now shown that the improper integral equals the series, so now all I need to do is show that the series converges and the proof will be satisfied. I will use the integral test for $\sum_{k=1}^{\infty}\frac{1}{k^2}$. Let $f(x)=\frac{1}{x^2}$. $f(x)$ is continuous and positive for all $x\geq1$ and $f'(x)=-\frac{2}{x^3}$ so $f(x)$ is decreasing for all $x\geq1$. The conditions for the integral test are satisfied. The integral test for convergence is $$\int_{1}^{\infty}\frac{1}{x^2}dx=\lim_{b\to\infty}\int_{1}^{b}\frac{1}{x^2}dx=\lim_{b\to\infty}\bigg[-\frac{1}{x}\bigg]_{1}^{b}=[0-(-1)]=1.$$
The integral converges so, therefore, the series must converge as well via the integral test. Thus, $\int_{0}^{1}g(x)dx$ and the series $\sum_{k=1}^{\infty}\frac{1}{k^2}$ both converge and are equal.
Are there any flaws in my proof and where can I improve?