Home » Blog » Determine formulas for given sums

Determine formulas for given sums

Consider the formula

    \[ 1 + x + x^2 + \cdots + x^n = \frac{x^{n+1} - 1}{x-1} \qquad (x \neq 1). \]

By differentiating, determine formulas for the following:

  1. 1 + 2x + 3x^2 + \cdots + nx^{n-1}.
  2. 1^2 x + 2^2 x^2 + 3^2 x^3 + \cdots + n^2 x^n.

  1. We observe that

        \[ \left(1 + x  + x^2 + \cdots + x^n\right)' = 1 + 2x + 3x^2 + \cdots + nx^{n-1}. \]

    Thus, using the given formula we have,

        \begin{align*} 1 + 2x + 3x^2 + \cdots + nx^{n-1} &= \left( \frac{x^{n+1} - 1}{x-1} \right)' \\  &= \frac{(n+1)x^n (x-1) - x^{n+1} + 1}{(x-1)^2} \\  &= \frac{nx^{n+1} - (n+1)x^n + 1}{(x-1)^2}. \end{align*}

  2. (Note: There’s an alternate solution to this in the comments that is more direct than this one. Definitely worth taking a look at that alternative.)
    Taking derivatives of both sides of the equation we derived in part (a),

        \begin{align*}  &&\left(1+2x + 3x^2 + \cdots + nx^{n-1}\right)' &= \left( \frac{nx^{n+1} - (n+1)x^n + 1}{(x-1)^2} \right)' \\[10pt] \implies && 2 + 6x + \cdots + n(n-1)x^{n-2}& \\   &&& \hspace{-4.2cm} = \frac{(x-1)^2 (n(n+1)x^n - n(n+1)x^{n-1}) - (2x-2)(nx^{n+1} - (n+1)x^n + 1)}{(x-1)^4} \\[10pt] \implies && (1 + 4x + 9x^2 + \cdots + (n-1)^2& x^{n-2}) + (1 + 2x + 3x^2 + \cdots + (n-1)x^{n-2}) \\ &&& \hspace{-4.2cm}= \frac{(x-1)(n(n+1)x^n - n(n+1)x^{n-1}) - 2(nx^{n+1} - (n+1)x^n + 1)}{(x-1)^3}\\[10pt] \implies && \left( \frac{1}{x} \right) (1^2 x + 2^2 x^2 + \cdots + (n-1)^2 &x^{n-1}) + (1 + 2x + \cdots + (n-1)x^{n-2}) \\ &&& \hspace{-4.2cm}= \frac{(n^2-n)x^{n+1} - 2(n^2-1)x^n + n(n+1)x^{n-1} - 2}{(x-1)^3}. \end{align*}

    Then, looking at the second term in the sum on the left, we have,

        \begin{align*}  1+ 2x + \cdots + (n-1)x^{n-2} &= (1 + x + \cdots + x^n)' - nx^{n-1} \\  &= \left( \frac{x^{n+1}-1}{x-1} \right)' - nx^{n-1} \\  &= \frac{nx^{n+1} - (n+1)x + 1}{(x-1)^2} - nx^{n-1} \\  &= \frac{(n+1)x^n - nx^{n-1} + 1}{(x-1)^2}. \end{align*}

    Thus, plugging this back into the expression above,

        \begin{align*}  && \frac{1}{x} &\left(1^2 x + 2^2 x^2 + \cdots + (n-1)^2 x^{n-1} \right) \\  &&&= \frac{(n^2-n)x^{n+1} - 2(n^2-1)x^n + n(n+1)x^{n-1} -2}{(x-1)^3} - \frac{(n-1)x^n - nx^{n-1} +1}{(x-1)^2} \\[10pt]  \implies &&1^2 &x + 2^2 x^2 + \cdots + (n-1)^2 x^{n-1} + n^2 x^n \\  &&&= x \left( \tfrac{(n^2-n)x^{n+1} - 2(n^2-1)x^n + n(n+1)x^{n-1} - 2 - ( (x-1)((x-1)x^n + nx^{n-1} + 1))}{(x-1)^3} \right)\\[10pt]  \implies &&1^2 &x + 2^2 x^2 + \cdots + (n-1)^2 x^{n-1} + n^2 x^n \\  &&&= \frac{n^2 x^{n+3} - (2n^2 + 2n-1)x^{n+2} + (n+1)^2 x^{n+1} - x^2 - x}{(x-1)^3}. \end{align*}

  3. ( Note: This is a lot of algebra. I included as many steps as I thought appropriate, but that still has a lot going on in each step. If there is something that isn’t clear please leave a comment. Also, given all of these equations it seems likely I’ve made at least one typo / mathematical error. If you find one, please point it out.)

2 comments

  1. tasos says:

    For the part b,

        \begin{align*}  \sum (i^2)(x^i) &= x \sum i^2 x^{-1} \\  &= x \left( \sum i x^i \right)' \\  &= x \left( x \sum i x^{i-1} \right)' \\  &= x \left( x \left(\sum x^i\right)' \right)' \\  &= x \left( x \cdot \frac{nx^{n+1} - (n+1)x^n + 1}{(x-1)^2} \right)'. \end{align*}

    This last step uses the result of part (a).

    This provides a direct solution. Hopefully there’s no typo.

    • RoRi says:

      Hi, thanks! I retyped your comment into latex so that it’s easier to read. Let me know if I made a mistake. This is a nice solution, that I think works also. I’ll leave the solution I have up there and put a note to look at the comments for this alternative. (I’m not anxious to actually take that derivative since I’ll definitely make an algebra mistake.)

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):