To solve the integral \(\int_1^4|x-1|dx\), we first need to consider the behavior of the expression \(|x-1|\). The expression changes at \(x=1\).
For \(x \geq 1\), the expression \(|x-1|=x-1\). Therefore, for the interval \([1, 4]\), \(|x-1|=x-1\) holds true.
Thus, the integral becomes:
\(\int_1^4|x-1|dx = \int_1^4(x-1)dx = \int_1^4x\,dx - \int_1^41\,dx\)
Now, calculate each part separately:
\(\int_1^4x\,dx = \left[\frac{x^2}{2}\right]_1^4 = \frac{4^2}{2} - \frac{1^2}{2} = \frac{16}{2} - \frac{1}{2} = \frac{15}{2}\)
\(\int_1^41\,dx = \left[x\right]_1^4 = 4 - 1 = 3\)
Substituting these results back, we get:
\(\int_1^4(x-1)dx = \frac{15}{2} - 3 = \frac{15}{2} - \frac{6}{2} = \frac{9}{2}\)
Hence, the value of the integral \(\int_1^4|x-1|dx\) is \(\frac{9}{2}\).