Solve the following questions: Following are two questions and their respective answers(as given in textbook):
Q1. If $$ k=\sum_{r=0}^n \frac{1}{n \choose r}$$, then write $$\sum_{r=0}^n \frac{r}{n \choose r}$$ in terms of k.
Ans. $$\frac {nk}{2}$$
Q2. If $$x+y=1$$ find $$\sum_{r=0}^n r^{2} y^{n-r} x^r$$.
Ans. $$n(nx+y)$$
The thing is, I have tried solving both the problems, but that hasn't been much fruitful.
I faced difficulties from the first one as the expressions are sum of reciprocals of binomial coefficients. Because I never came across such reciprocals earlier.
The problem with the second is because of the two terms x and y. Had either x or y not been there, I could have easily differentiated $$ (1+x)^n$$ or $$ (1+y)^n$$ and their respective expansions and derived the result.
So, I would be thankful to anyone who provides a proper solution for each of the above problems.
Note: I wanted to add 'homework' tag, but wasn't allowed to do so.
 A: For the first problem, 
$$k=\sum_{r=0}^n \frac{1}{n \choose r}$$
=$$\frac{1}{n \choose 0}+\frac{1}{n \choose 1}+..\frac{1}{n \choose n}$$
Now, $$ {n\choose r} = {n\choose n-r}$$
(I can now make pairs of two terms taking the first term from the beginning and last term as my first pair, I can add them directly as their denominators are the same)
$$\implies k= \frac{2}{n \choose 0}+\frac{2}{n \choose 1}+\cdots$$
hence $$\frac{k}{2}=\frac{1}{n \choose 0}+\frac{1}{n \choose 1}+\cdots$$
(I'm not worried whether n is odd or even here, as you will see later that I have no interest in evaluating this sum)
Consider 
$$l=\sum_{r=0}^n \frac{r}{n \choose r}$$
$$\implies l=\frac{0}{n \choose 0}+\frac{1}{n \choose 1}+\frac{2}{n \choose 2}+\cdots +\frac{n-2}{n \choose n-2}+\frac{n-1}{n \choose n-1}+\frac{n}{n \choose n}$$
(Again I pair the terms the way I had done previously) 
$$\implies l=\frac{n}{n \choose 0}+\frac{n}{n \choose 1}+\cdots$$
$$\implies l=\frac{nk}{2}$$
A: For the second one, start with:
$\begin{align}
   \sum_{0 \le r \le n} x^r y^{n - r}
     &= y^n \sum_{0 \le r \le n} \left( \frac{x}{y} \right)^r \\
     &= y^n \frac{1 - (x/y)^{n + 1}}{1 - x/y} \\
     &= \frac{y^{n + 1} - x^{n + 1}}{y - x} \\
   x \frac{\mathrm{d}}{\mathrm{d} x}
     \left(
       x \frac{\mathrm{d}}{\mathrm{d} x}
           \frac{y^{n + 1} - x^{n + 1}}{y - x}
     \right)
     &= \sum_{0 \le r \le n} r^2 x^r y^{n - r} 
\end{align}$
The result is a quite ugly expression:
$\begin{align}
   &\frac{y^n (x^2 y + x y^2) 
           - (n + 1)^2 x^{n + 1} y^2
           + (2 n^2 + 2 n - 1) x^{n + 2} y 
           - n^2 x^{n + 3}}
        {(y - x)^3} \\
    &\qquad = \frac{y^{n + 1} x (x + y)
                     - x^{n + 1} 
                        ((n^2 + 2 n + 1) y^2
                          - (2 n^2 + 2 n - 1) x y
                          + n^2 x^2)}
                    {(y - x)^3} \\
    &\qquad = \frac{y^{n + 1} x (x + y)
                     - x^{n + 1} (y - x)
                         ((n + 1)^2 y - n^2 x)
                    }
                    {(y - x)^3} \\
    &\qquad = \frac{y^{n + 1} x
                     - x^{n + 1} (y - x)
                         ((n + 1)^2 y - n^2 x)
                    }
                    {(y - x)^3}
\end{align}$
Yes, it is fine to consider $x$ and $y$ as separate variables, as mentioned. The relation $x + y = 1$ can be used to simplify the end result, however.
