Show that $f(x) = e^x \cos(x)$ on $\mathbb{R}$ is a tempered distribution As shown in the title.
I know that the anti-derivative of $f(x) = e^x \cos(x)$ is $ \frac{\sin(x)+\cos(x)}{2} e^x$, whose anti-derivative is $\frac{\sin(x)}{2}e^x$...but not sure how to prove it.
 A: Let me show that $T(\varphi) = \int f(x) \varphi(x)$ does not define a bounded linear functional on the Schwartz space. Let $\eta$ be the following smooth function
$$ \eta(x) = \begin{cases} e^{-1/x},& x>0, \\ 0,&x\leq 0. \end{cases} $$
The crucial feature is that all derivatives of $\eta$ are bounded (by induction one gets $\eta^{(n)}(x) = \eta(x) p_n(1/x)$ where $p_n$ is a polynomial function). Now we define $g(x) = \eta(x) e^{-x/2} \cos(x)$. If we can show that $g$ is a Schwartz function, then we are done as
$$ \int_{-\infty}^\infty f(x) g(x) dx = \int_0^\infty e^{x/2-1/x} \cos^2(x) dx = \infty. $$
To show that $g$ is Schwartz, it is enough to show that $h(x):=\eta(x) e^{-x/2}$ is Schwartz as all derivatives of $\cos(x)$ are uniformly bounded. By the Leibniz rule we have
$$ h^{(n)}(x) = \sum_{k=0}^n \binom{n}{k} \eta^{(k)}(x) \left(e^{-x/2} \right)^{(n-k)}
= \sum_{k=0}^n \binom{n}{k} (-2)^{n-k}\eta^{(k)}(x) e^{-x/2}.$$
Hence, we the only thing we need to assure is that $\eta^{(n)}(x) e^{-x/2}$ decays faster than any polynomial. This is indeed the case as we have
$$ \eta^{(n)}(x) e^{-x/2} = \begin{cases} e^{-x/2-1/x} p_n(1/x),&x>0, \\ 0,&x\leq 0. \end{cases} $$
Away from the origin this function decays exponentially and hence faster than any polynomial.
Added: What is the main idea. I want the integral to go to infinity. The first complication is that $\cos(x)$ does not have a sign, thus I put a $\cos(x)$ in the function I test with to make the integrand $f(x) g(x)$ nonnegative. Then I want that the integrand blows up but the function $g$ is stil Schwartz. To make it Schwartz, I would like to have some exponential decay, that is why I put the $e^{-x/2}$ into $g$. It gives us decay, but this decays much slower than $e^x$ grows, which gives us the blow-up of $f(x) g(x)$. Of course for negative $x$ the factor $e^{-x/2}$ blows up, so we need to get rid of that, which is why I introduced some kind of cut-off function $\eta$ (we could also take $e^{-\vert x \vert/2}$ and smooth it out around the origin, but that seemed more annoying to do). We could also take a "real" cut-off for $\eta$ (i.e. $\eta(x)=0$ for $x<0$ and $\eta(x)=1$ for $x>1$), then $\eta^{(n)}$ has compact support for $n\geq 1$ and thus $\eta^{(n)}(x) e^{-x/2}$ still decays exponentially.
