Consider a $1$ meter stick and suppose you break it into two pieces $X$ meters from the end, where $X \sim \operatorname{Unif}(0,1)$. What is the expected length of the longer piece (after it is broken)?
So the integral would be from $x$ to $1$, but what would be the integrand?
Thanks so much.
The length of the longer piece is $\max\{X,1-X\}$. So your expectation would be $\int_0^1 \max\{x,1-x\}\,dx$.