Find the sum to n term of the series. $1+3x+5x^2+7x^3................, X\ne1$ Here, $a=1, d=2, b=1, r=x$
\begin{align}
S_n&= \frac{ab}{1-r}+\frac{bdr(1-r{^n}^{-1})}{(1-r)^2}-\frac{[a+(n-1)d]br^n}{1-r}\\
S_n&=\frac 1 {1-x}+\frac{ 2x(1-x{^n}^{-1})} {(1-x)^2}-\frac{[1+(n-1)(2)]x^n} {1-  x}\\
&= \frac 1 {1-x}+\frac{2x}{(1-x)^2}-\frac {2x.x{^n}^{-1}}{(1-x)^2}-\frac{[1+2n-2]x^n}{(1-x)}\\
&= \frac 1 {1-x}+\frac{2x}{(1-x)^2}-\frac {2x^n}{(1-x)^2}-\frac{[2n-1]x^n}{(1-x)}\\
\end{align}
Is it correct. I have not got the answer, please show me how to move to this answer without skipping any line
$\frac {1-3x} {(1-x)^2}+\frac {2x^n}{(1-x)^2}-\frac{(2n-1)x^n}{(1-x)}$
 A: Another way
\begin{align*}
1+3x+5x^2+7x^3+\cdots+(2n-1)x^{n-1}&=(1+2x+3x^2+4x^3+\cdots+nx^{n-1})\\&+x(1+2x+3x^2+\cdots+(n-1)x^{n-2})\\
&=\frac{d}{dx}(x+x^2+x^3+\cdots+x^n)\\&+x\frac{d}{dx}(x+x^2+x^3+\cdots+x^{n-1})\\
&=\frac{d}{dx}\left(\frac{x^{n+1}-x}{x-1}\right)+x\frac{d}{dx}\left(\frac{x^{n}-x}{x-1}\right)\\
\end{align*}
A: Here's a pretty simple approach:
$
S = 1 + 3x + 5x^2 + 7x^3 + \cdots + (2t + 1)x^t \\
\implies xS = x + 3x^2 + 5x^3 + \cdots + (2t - 1)x^t + (2t + 1)x^{t+1} \\
$
where $t = n - 1$. Subtracting $xS$ from $S$,
$$
(1 - x)S = 1 + 2x + 2x^2 + 2x^3 + \cdots + 2x^t + (2t+1)x^{t+1}.
$$
Replacing $t$ by $n - 1$,
$
(1-x)S = [-1 + (2n - 1)x^n] + 2(1 + x + x^2 + \cdots + x^{n-1})\\
\implies (1-x)S = [-1 + (2n - 1)x^n] + 2\frac{1 - x^n}{1 - x} \\
\implies S = \frac{(2n - 1)x^n}{1 - x} - \frac{1}{1-x} + 2\frac{1-x^n}{(1-x)^2}.
$
By the way, it's not important for the condition $0<x<1$ to hold, unless you're summing an infinite series.
A: Here's how I did it:
let $S = 1 + 3x + 5x^2 + 7x^3 + ....$
By expansion, $S = \displaystyle\sum_{n=0}^{\infty}(2n+1)x^n .... (1)$
but similarly, $S = \displaystyle\sum_{n=1}^{\infty}(2n-1)x^{n-1} ....(2)$
Examining $(2)$, $(2n-1)x^{n-1} = \displaystyle\frac{1}{x}(2n-1)x^n$
$ = \displaystyle\frac{1}{x}(2n+1-2)x^n = \displaystyle\frac{1}{x}[(2n+1)x^n - 2x^n]$
So $(2)$ becomes
$S = \displaystyle\frac{1}{x}\sum_{n=1}^{\infty}[(2n+1)x^n - 2x^n]$
But using $(1)$, we get 
$S = \displaystyle\frac{1}{x}(S-1)- \frac{2}{x}\sum_{n=1}^{\infty} x^n ....(3)$
(making term limits of $(1)$ as 1 and infinity and subtracting the first term.)
Now $\displaystyle\sum_{n=1}^{r} x^n = x + x^2 + x^3 + .... = x(1 + x + x^2 + ...)$ is the geometric series $\displaystyle\frac{x(1-x^r)}{1-x}$.
Hence $(3)$ becomes 
$S = \displaystyle\frac{1}{x}(S-1)- \displaystyle\frac{2(1-x^r)}{1-x}$
which makes $S = \displaystyle\frac{x+1-2x^{r+1}}{(1-x)^2}$ for $x>1$
or $S = \displaystyle\frac{x+1}{(1-x)^2}$ if $0<x<1$.
