# Improper integral confusing step

The following passage is in my textbook:

$$A(S) = \int_0^{\infty} f(E) \max(S-E,0)dE$$

This simplifies to $$A(S) = \int_0^{S} f(E)(S-E) dE$$

Now this is from a finance textbook so it might not be fully rigorous, but I'm curious about what happens with the integral. I think this is an improper integral, and I haven't really studied those yet, but after reading up on them I'm still confused as to what is done here and why it's allowed.

This is because $\max(S - E, 0) = 0$ for $E \geq S$. Alternatively, it is equal to $S - E$ for $E \leq S$.
• Because the function is zero there and $$\int_0^\infty f(x)dx = \int_0^S f(x)dx + \int_S^\infty f(x)dx$$ – muaddib May 29 '15 at 18:37