Showing Positive Definiteness In Inner Product 
Let $\mathcal{P}_2$ be the space of all polynomials of degree less or equal to $2$ for all $f,g\in \mathcal{P}_2$ we define:
$$\langle f,g \rangle=\int_0^\infty f(x)g(x)e^{-x} \,dx$$
Prove it is a inner product on $\mathcal{P}_2$

It is easy to show that $\langle f,g \rangle=\langle g,f \rangle$ and $\langle \alpha f+\beta g,h \rangle=\alpha\langle  f,h \rangle+\beta\langle g,h \rangle$
To show positive definiteness we take $\langle f,f \rangle=\int_0^\infty [f(x)]^2 e^{-x} \, dx$ but how can we be sure that $\langle f,f \rangle\geq 0$ and $\langle f,f \rangle=0\iff f=0$?
 A: We know that $e^{-x}> 0$ and $(f(x))^2\geq 0$. Thus, $\displaystyle\int_{0}^{\infty} (f(x))^2 e^{-x}\geq 0$ and this function is the product of continuous functions, therefore, is continuous. Then, $\displaystyle\int_{0}^{\infty} (f(x))^2 e^{-x}=0$ if and only if $(f(x))^2 e^{-x}=0$ if and only if $(f(x))^2=0$ if and only if $f(x)=0$
A: The function $\varphi \, : \, x \in (0,+\infty) \mapsto \big( f(x) \big)^2 e^{-x}$ is positive on $(0,+\infty)$, continuous and such that :
$$ \int_{0}^{+\infty} \big( f(t) \big)^2 e^{-t} \; dt = 0. $$
Therefore, this function is identically zero on $(0,+\infty)$. This implies that $f \equiv 0$. 

Here are some ideas. Assume that $\varphi$ is not identically zero on $(0,+\infty)$. Then, there exist some point $x_0 \in (0,+\infty)$ such that $\varphi(x_0) > 0$. Because $\varphi$ is continuous, there exist $\eta > 0$ such that $\varphi > 0$ on $(x_0 - \eta, x_0 + \eta) \subset (0,+\infty)$. From the positiveness of $\varphi$, it follows that:
$$ \int_{0}^{+\infty} \varphi(t) \, dt \geq \int_{x_0 - \eta}^{x_0 + \eta} \varphi(t) \, dt > 0. $$
This contradicts the fact that:
$$ \int_{0}^{+\infty} \varphi(t) \, dt = 0. $$
A: If you're not sure why $\int_{0}^{\infty} f(x)g(x) e^{-x} dx < \infty$.  It may be helpful to notice that  $\int_{0}^{\infty} x^ne^{-x} dx < \infty$ This can be seen in like a billion different ways, but an integration by parts is probably the most standard.
A: That $\langle f,f\rangle\ge0$ follows from the fact that $(f(x))^2 \ge 0$ (and this assumes the values of $f$ are real, as opposed to complex with possibly nonzero imaginary part) and $e^{-x}\ge0$ and the integral of a nonnegative function over $[0,\infty)$ is nonnegative.
The fact that $\langle 0,0\rangle=0$ is trivial, so proving $\langle f,f \rangle=0\iff f=0$ is a matter of proving $\langle f,f\rangle=0$ ONLY if $f$ is the zero polynomial.
$f$ is a continuous function since it's a polynomial function, so $x\mapsto (f(x))^2 e^{-x}$ is continuous and everywhere nonnegative. The only way a continuous nonnegative function can integrate over $[0,\infty)$ to $0$ is if it's $0$ everywhere in that interval. Since $e^{-x}$ is nowhere $0,$ we must have $(f(x))^2=0,$ so $f(x)=0.$
Let's see if I can make another method work:
\begin{align}
& \int_0^\infty (f(x))^2 e^{-x}\,dx = \int_0^\infty (ax^2+bx+c)^2 e^{-x}\,dx \\[10pt]
= {} & \int_0^\infty \left(a^2x^4 + 2abx^3 + (b^2+2ac)x^2 + 2bcx+c^2\right) e^{-x}\, dx \\[10pt]
= {} & 24a^2 + 12ab + 2(b^2+2ac) + 2bc + c^2 \\[10pt]
= {} & (b+c+2a)^2 + (b+4a)^2 + (2a)^2.
\end{align}
This is a sum of squares, so it can be $0$ only if each term is $0;$ thus we have
\begin{align}
0 & = b+c+2a\\
0 & = b+4a \\
0 & = 2a
\end{align}
Solving this for $a,b,c$ we get $a=b=c=0.$
A: You also have to show that the expression well-defined. To do this for given $f, g \in \mathcal{P}_2$, choose $M > 0$ such that for all $x \geq M$ we have $\lvert f(x) \cdot g(x)\rvert \leq x^5$ and $x^7 e^{-x}\leq 1$. Then we have
$$
\int_M^\infty\lvert f(x)g(x)e^{-x} \rvert \, dx \leq \int_M^\infty x^5e^{-x} \, dx = \int_M^\infty x^7e^{-x}x^{-2} \, dx \leq \int_M^\infty x^{-2} \, dx < \infty.
$$
It follows that
$$
\int_M^\infty f(x)g(x)e^{-x} \, dx <\infty.
$$
