We break a unit length rod into two pieces at a uniformly chosen point. Find the expected length of the smaller piece We break a unit length rod into two pieces at a uniformly chosen point. Find the
expected length of the smaller piece
The length function is $f(x) = \min ( x,1-x )$ as you found.  This is $x$ on the interval $[0,0.5]$ and $1-x$ on the interval $[0.5,1]$.

We are ultimately trying to find $E(f(X))$, the expected length.  By the "law of the unconscious statistician," and since the distribution of the random variable $X$ is uniform:

$$E(f(X)) = \int_0^1 f(x) \cdot 1 \;dx = \int_0^{0.5} x \;dx + \int_{0.5}^1 (1-x) \;dx = \frac{1}{4}$$

Or you could just measure the area under the curve without integrating by noticing the graph forms a triangle with base $1$ and height $0.5$.
Length of the shorter stick is uniformly distributed between 0 and 0.5, hence the answer is a mean of uniform distribution which is a midpoint, here it is 0.25.