Xét hàm:
\(f\left(x\right)=x+x^2+x^3+...+x^n\)
Theo công thức tổng cấp số nhân ta có:
\(x+x^2+x^3+...+x^n=\dfrac{x^{n+1}-x}{x-1}\)
Đạo hàm 2 vế ta được:
\(1+2x+3x^2+...+nx^{n-1}=\dfrac{\left[\left(n+1\right)x^n-1\right]\left(x-1\right)-\left(x^{n+1}-x\right)}{\left(x-1\right)^2}\)
\(\Leftrightarrow1+2x+3x^2+...+nx^{n-1}=\dfrac{nx^{n+1}-\left(n+1\right)x^n+1}{\left(x-1\right)^2}\)
\(\Leftrightarrow x+2x^2+3x^3+...+n.x^n=\dfrac{n.x^{n+2}-\left(n+1\right)x^{n+1}+x}{\left(x-1\right)^2}\)
Thay \(x=\dfrac{1}{2}\) vào ta được:
\(S=\dfrac{1}{2}+\dfrac{2}{2^2}+\dfrac{3}{2^3}+...+\dfrac{n}{2^n}=\dfrac{n.\left(\dfrac{1}{2}\right)^{n+2}-\left(n+1\right).\left(\dfrac{1}{2}\right)^{n+1}+\dfrac{1}{2}}{\left(\dfrac{1}{2}-1\right)^2}\)
\(\Rightarrow limS=lim\dfrac{n\left(\dfrac{1}{2}\right)^{n+2}-\left(n+1\right)\left(\dfrac{1}{2}\right)^{n+1}+\dfrac{1}{2}}{\left(\dfrac{1}{2}-1\right)^2}=\dfrac{0-0+\dfrac{1}{2}}{\dfrac{1}{4}}=2\)