How can I get Maclaurin series for $\frac{x^2 + 3e^x}{e^{2x}}$? The answer for it is $$3 + \sum_{k=1}^n (3+k(k-1)2^{k-2})\frac{(-1)^k}{k!} x^k + o(x^n)$$
Well, I've tried to change every $e^x$ to $1 + x + \frac{x}{2!} + ... + o(x^n)$ and got nothing useful. I know how to get Maclaurin series for polynomials but I don't really know what should I do with fractions and how get that kind of result.
Hint: I would start by simplifying:
$$
\frac{x^2+3e^x}{e^{2x}}=x^2e^{-2x}+3e^{-x}.
$$
First Write the function as $3e^{-x}+x^2e^x$. Then add the Maclaurin expansions.