Multiplying an integral with a continuous functions (of a random variable) I was trying to follow along with a solution in a stats textbook, but something just isn't clicking about the solution with me. 
I was wondering if someone could help me understand it.
Context:
Given a probability density function p(y) for a random variable y, it was shown that $$\int_{-c}^{c}p(y)dy = 1$$ for some constant c>0
Given that, we know $$\int_{y=-\infty}^{-c} p(y)dy+\int_{y=c}^{\infty} p(y)dy=0$$
Since p(y) is a PDF, we also know that $$p(y)\geq 0$$ and we let $$f(y)=y^2$$ which is continous.
The textbook then concludes that $$\int_{y=-\infty}^{-c} y^2 p(y)dy+\int_{y=c}^{\infty} y^2 p(y)dy=0$$
Intuitively, I can see it, but when I try to derive it, I can't figure out how. I think I am missing a key property or theorem from calculus.

Since $p$ is a pdf. you have $\int_{-\infty}^\infty  p(x)dx = 1$.
If you are given that $\int_{-c}^c  p(x)dx = 1$ then you know that
$\int_{-\infty}^{-c}  p(x)dx + \int_c^\infty  p(x)dx = 1$. Since $p(x) \ge 0$ this
tells us that $p(x) = 0$ almost everywhere on $(-\infty, -c)$ and $(c,\infty)$.
Then
$E[y^2] = \int_{-\infty}^\infty  y^2 p(y)dy =  \int_{-c}^c  y^2 p(y)dy$. 
Since $y^2 \le c^2$ for $y \in [-c,c]$ we see that
$E[y^2] \le \int_{-c}^c c^2 p(y)dy = c^2$.
