Assignment: Find a function $f:]-1,1[\rightarrow \mathbb{R}$ whose taylorseries, around 0, is $2+2x+2x^2+2x^3+2x^4+2x^5+...$
Attempted solution: Recognizing that the series is $2+2x+2x^2+2x^3+2x^4+2x^5+...\sum_{k=0}^{\infty} 2x^{k}$, it seems that the Taylor coefficients $c_k$ must equal $2$ for all $k$. I.e.
$c_k=\frac{f^{(k)}(0)}{k!}=2$
The first thought is a polynomial $p(x)$, with all coefficients equal to 2; $p(x)=2x^k+2x^{k-1}+...2x+2$, however this is not restricted to $x\in ]-1,1[$.
Of course, using an algebraic computational...thing called "Wolfram Alpha" it readily gives me the answer; i.e. $\sum_{k=0}^{\infty} 2x^{k}=\frac{-2}{x-1}, |x|<1$. I cannot, however, see how they arrived at this, or why the above is so decidedly wrong.
There is always the trial/error of trying functions of the kind $f(x)=\frac{1}{a+x^n)$. This, however, is guesswork - which I detest - and its spurred on by the fact that I know what the answer is... Not very satisfying.
(p.s.: Repeatedly differentiating a function like $\frac{2}{x^n-1}$ gets rather strenuous rather quickly; is there a neat way to show how it constantly equalling $2k!$ for the k'th derivative?)
$$2+2x+2x^2+ \dots = 2(1+x+x^2+ \dots)= \frac{2}{1-x}$$
for $|x|<1$ by the formula for geometric series (several proofs of the identity I used are listed here: https://en.wikipedia.org/wiki/Geometric_series; you should absolutely know this if you are dealing with series, it comes up all the time).