Does there exist a function $f(x)$, which is “parallel” to $e^x$ and has a finite “norm”? Does there exist a function $f: \mathbb{R} \rightarrow \mathbb{R}$ such that
$$
\lim_{M \rightarrow +\infty}\frac{\int_{-M}^{M}f(x)e^xdx}{\Big(\int_{-M}^{M}(f(x))^2dx\int_{-M}^{M}(e^x)^2dx\Big)^{1/2}}=1
$$
but also the limit
$$
\lim_{M \rightarrow +\infty} \int_{-M}^{M} (f(x))^2 dx 
$$
exists and finite?
I suppose the answer is no, but I don’t know how to prove it.
Motivation.  I think of the first limit as of some generalization of the cosine between two vectors (as it is somehow similar to a dot product of two vectors divided by their norms). So the first limit says that functions $f(x)$ and $e^x$ are parallel in some sense (although not in the common sense as there is a limit before the whole fraction).
The second limit says that that we are looking for a function $f(x)$ with a finite $L_2$-norm (again, not exactly the norm, but maybe its principal value). 
Functions $f(x) = ae^x$ with $a \in \mathbb{R}_+$ satisfy the first condition (as they are parallel to $e^x$), but do not satisfy the second (as their “norm” is infinite). I wonder if there exists such $f(x)$ which satisfies both.
 A: As I found out, the answer is no, there is no such function. 
Without loss of generality we can assume that
$$
\lim_{M \rightarrow +\infty} \int_{-M}^{M} (f(x))^2 dx = 2,
$$
which also leads to
$$
\lim_{M \rightarrow +\infty} f(M)= \lim_{M \rightarrow +\infty} f(-M) = 0.
$$
Suppose now that there is a function $f$  such that
$$
\lim_{M \rightarrow +\infty}\frac{\int_{-M}^{M}f(x)e^xdx}{\Big(\int_{-M}^{M}(f(x))^2dx\int_{-M}^{M}(e^x)^2dx\Big)^{1/2}}=\lim_{M \rightarrow +\infty}\frac{\int_{-M}^{M}f(x)e^xdx}{\Big(2\int_{-M}^{M}e^{2x}dx\Big)^{1/2}}=
$$
$$
=\lim_{M \rightarrow +\infty}\frac{\int_{-M}^{M}f(x)e^xdx}{\Big(2\cdot \frac{1}{2}(e^{2M}-\underbrace{e^{-2M}}_{\rightarrow 0})\Big)^{1/2}}=\lim_{M \rightarrow +\infty}\frac{\int_{-M}^{M}f(x)e^xdx}{e^M}=1.
$$
This limit equals to $1$ as the denominator tends to $+\infty$, which means that the numerator also tends to $+\infty$:
$$
\lim_{M \rightarrow +\infty}\int_{-M}^{M}f(x)e^xdx=+\infty.
$$
Now it seems that all the conditions needed to apply L'Hôpital's rule are met, and we can conclude
$$
\lim_{M \rightarrow +\infty}\frac{\int_{-M}^{M}f(x)e^xdx}{e^M}=1 \quad \Rightarrow \quad \lim_{M \rightarrow +\infty}\frac{\Big(\int_{-M}^{M}f(x)e^xdx\Big)'_M}{\big(e^M\big)'_M} \color{blue}{=1}.
$$
But
$$
\lim_{M \rightarrow +\infty}\frac{\Big(\int_{-M}^{M}f(x)e^xdx\Big)'_M}{\big(e^M\big)'_M} = \lim_{M \rightarrow +\infty}\frac{f(M)e^M-\overbrace{f(-M)e^{-M}}^{\rightarrow 0}}{e^M} = 
$$
$$
=\lim_{M \rightarrow +\infty}\frac{f(M)e^M}{e^M}=\lim_{M \rightarrow +\infty}f(M) \color{red}{=0},
$$
and we have reached a contradiction.
