Find $\int_{-1}^3xf(x)\,dx$ where $f(x)=\min(1,x^2)$ Find:
$$\int_{-1}^3xf(x)\,dx,$$  
where $f(x)=\min(1,x^2)$.
I thought about solving it like this:
$$\int_{-1}^1 x^3\,dx + \int_{1}^3x\,dx = \cdots = 4.$$ 
But the solution is $\frac{26}{3}$
and I don't understand how they got it.

My attempt::
Assuming $f:\Bbb R \to \Bbb R$,
$$f(x) = \min\Big(1\ ,\ x^2\Big) = 
\begin{cases}
x^2\quad,\ x \in [-1,1] \\
1 \quad,\ x \in (-\infty,-1)\cup(1, \infty)
\end{cases}$$
The graphs of $ y = \min(1, x^2)$ and $y = x\min(1,x^2)$ are respectively as follows:

Now, 
$$\int x\cdot f(x)\ \mathrm dx =
\begin{cases}
\displaystyle \int x^3 \mathrm dx = \frac{1}{4}x^4 \color{lightgray}{+ \mathcal C}\ , x \in [-1,1]\\
\displaystyle \int x \mathrm dx = \frac{1}{2}x^2 \color{lightgray}{+ \mathcal C}   \ ,\ x \in \Bbb R \sim [-1,1]\end{cases}$$
Hence,
$$ \int_{-1}^{3}xf(x)\mathrm dx = \int_{-1}^{1}xf(x)\mathrm dx + \int_{1}^{3} xf(x)\mathrm dx\\
= \frac{1}{4}x^4 \Big]_{-1}^{+1} + \frac{1}{2}x^{2}\Big]_{1}^{3} \\
= \frac{1}{4}\left[\Big((+1)^4 - (-1)^4\Big) + 2\Big(3^2 - 1^2\Big)\right]\\
= \frac{0 + 16}{4} = 4$$
So, yes, you're absolutely right =) The textbook was wrong. There is no room for doubt.
$$\boxed{\displaystyle \int_{-1}^{3}xf(x)\mathrm dx = 4}$$
