This is making me feel quite stupid right now, but I have the following integral that is messing with my head

Where is continuous with compact support.

My first bit of instinct is to split the integral, because I need to know how to take that derivative. So there are two cases and , but how do I translate this into the limits of the integral? It seems that I would split it like so

.

Does this seem correct?