Considering the geometric interpretation of the definite integral (finding the area under a curve) what should I do if the interval of integration is not contained in the function's domain? For instance
$$ \text{Calculate} \int_{-2}^4 f(x)dx \quad \text {where} \quad f(x)= \begin{cases} x \quad \text{if} \ 0\le x \le 2 \\ 2x \quad \text{if} \ 2 \le x \le 4 \end{cases} $$
Should I consider only the interval where the function is well defined?
If I just had to calculate it, I would say that the function is not integrable over that interval, but since the important thing in this case is the area interpretation I'm not shure what to do.