Question: How to find integration of max of two functions?

Suppose we have a parametric function g(x)=max{h(x,p),f(x,p)}. How can I find the exact form of g(x) by conditioning on x and also how I can find the integration of g(x) over an interval [a,b]?

For example, g(x)= max{ x-p, x^2+px} and [a,b]=[0,10].

Please Wait...