How would I go about computing this finite sum? How would I go about computing the sum
$$
\sum_{k=1}^{n} \dfrac{(-k^2+2k+1)2^k}{(k(k+1))^2}.
$$
I have tried partial fractions but have gotten stuck trying to find the coefficients. I decomposed it like this:
$$
\dfrac{2^k(-k^2+2k+1)}{(k(k+1))^2} = \frac{a_0}{k} + \frac{a_1}{k^2} + \frac{a_2}{k+1} + \frac{a_3}{(k+1)^2}
$$.
 A: Hint:
Without the need for solving the coefficients:
$\dfrac{-k^2+2k+1}{k^2(k+1)^2} =\dfrac{k^2+2k+1-2k^2}{k^2(k+1)^2}=\dfrac{(k+1)^2}{k^2(k+1)^2}-\dfrac{2}{(k+1)^2}=\dfrac{1}{k^2}-\dfrac{2}{(k+1)^2}.$
Thus, the sum is reduced to
$$\sum_{k=1}^{n}\dfrac{2^k}{k^2}-\sum_{k=1}^{n}\dfrac{2^{k+1}}{(k+1)^2}.$$
And then note that
$$\sum_{k=1}^{n}\dfrac{2^{k+1}}{(k+1)^2}=\sum_{k=2}^{n+1}\dfrac{2^{k}}{k^2}=-2+\dfrac{2^{n+1}}{(n+1)^2}+\sum_{k=1}^{n}\dfrac{2^{k}}{k^2}.$$
The rest is for you to finish.
A: Observe that
$$\dfrac{(-k^2+2k+1)2^k}{(k(k+1))^2}= \dfrac{-2^{k+1}}{(k+1)^2}+\dfrac{2^k}{k^2}.$$
Then take sum as $k$ varies from $1$ to $n$.
$$\sum_{k=1}^n \dfrac{-2^{k+1}}{(k+1)^2}+\dfrac{2^k}{k^2}=\sum_{k=1}^n \dfrac{-2^{k+1}}{(k+1)^2}+\sum_{k=1}^n \dfrac{2^k}{k^2}$$
This being an alternate sum of elements of same type, you are left with $$2-\dfrac{2^{n+1}}{(n+1)^2}$$
A: The partial fraction expansion gives
$$
{{ - k^{\,2}  + 2k + 1} \over {\left( {k\left( {k + 1} \right)} \right)^2 }} = {1 \over {k^{\,2} }} - {2 \over {\left( {k + 1} \right)^{\,2} }}
$$
Then we have
$$
\eqalign{
  & {{u^{\,k} } \over k} = \int_{t = 0}^{\,u} {t^{\,k - 1} dt} \quad  \Rightarrow \quad {{x^{\,k} } \over {k^{\,2} }} = \int_{u = 0}^x {{{du} \over u}\int_{t = 0}^{\,u} {t^{\,k - 1} dt} } \quad  \Rightarrow   \cr 
  &  \Rightarrow \quad {{x^{\,k} } \over {\left( {k + 1} \right)^{\,2} }} = {1 \over x}\int_{u = 0}^x {{{du} \over u}\int_{t = 0}^{\,u} {t^{\,k} dt} }  \cr} 
$$
so that 
$$
\eqalign{
  & \sum\limits_{k = 1}^n {{{ - k^{\,2}  + 2k + 1} \over {\left( {k\left( {k + 1} \right)} \right)^2 }}x^{\,k} }
  = \sum\limits_{k = 1}^n {{{x^{\,k} } \over {k^{\,2} }}}  - 2\sum\limits_{k = 1}^n {{{x^{\,k} } \over {\left( {k + 1} \right)^{\,2} }}}  =   \cr 
  &  = \sum\limits_{k = 1}^n {\int_{u = 0}^x {{{du} \over u}\int_{t = 0}^{\,u} {t^{\,k - 1} dt} } }  - 2\sum\limits_{k = 1}^n {{1 \over x}\int_{u = 0}^x {{{du} \over u}\int_{t = 0}^{\,u} {t^{\,k} dt} } }  \cr} 
$$
In particular for $x=2$ we have
$$
\eqalign{
  & \sum\limits_{k = 1}^n {{{ - k^{\,2}  + 2k + 1} \over {\left( {k\left( {k + 1} \right)} \right)^2 }}2^{\,k} }
  = \sum\limits_{k = 1}^n {\int_{u = 0}^2 {{{du} \over u}\int_{t = 0}^{\,u} {t^{\,k - 1} dt} } }  - \sum\limits_{k = 1}^n {\int_{u = 0}^2 {{{du} \over u}\int_{t = 0}^{\,u} {t^{\,k} dt} } }  =   \cr 
  &  = \sum\limits_{k = 1}^n {\int_{u = 0}^2 {{{du} \over u}\int_{t = 0}^{\,u} {t^{\,k - 1} dt} } }  - \sum\limits_{k = 1}^n {\int_{u = 0}^2 {{{du} \over u}\int_{t = 0}^{\,u} {t^{\,k} dt} } }  =   \cr 
  &  = \sum\limits_{k = 1}^n {\int_{u = 0}^2 {{{du} \over u}\int_{t = 0}^{\,u} {t^{\,k - 1} \left( {1 - t} \right)dt} } }  =   \cr 
  &  =  \cdots  \cr} 
$$
Can you continue from here ?
(the solution is
$
2 - {{2^{n + 1} } \over {\left( {n + 1} \right)^{\,2} }}
$
)
