## Task $9 / 66$

Calculate

$$
\sum_{k=1}^{n}\left(k x^{k-1}\right)=1+2 x+3 x^{2}+\ldots+n x^{n-1}
$$
It holds that

$$
\int\left(\sum_{k=1}^{n}\left(k x^{k-1}\right)\right) d x=\int\left(1+2 x+3 x^{2}+\ldots+n x^{n-1}\right)=\sum_{k=1}^{n} x^{k}+c=x+x^{2}+x^{3}+\ldots+x^{n}+c
$$

The right-hand side of this equation represents a geometric series with the first term \(a_{1}=x\), the common ratio \(q=x\), and the number of terms \(n\). Therefore, according to the sum formula for geometric series,

$$
\int\left(\sum_{k=1}^{n}\left(k x^{k-1}\right)\right) d x=x \frac{1-x^{n}}{1-x}+c
$$

If we differentiate again, we get

$$
\sum_{k=1}^{n}\left(k x^{k-1}\right)=\frac{d\left(x \frac{1-x^{n}}{1-x}+c\right)}{d x}
$$

Using the product rule and the quotient rule, this results in

$$
\sum_{k=1}^{n}\left(k x^{k-1}\right)=1+2 x+3 x^{2}+\ldots+n x^{n-1}=\frac{1-(n+1) x^{n}+n x^{n+1}}{(1-x)^{2}}
$$