\[
\int_{1/e}^e |\ln x| \, dx
=
\int_{1/e}^1 - \ln x \, dx
+
\int_{1}^e \ln x \, dx
=
-\int_{1/e}^1 \ln x \, dx
+
\int_{1}^e \ln x \, dx.
\]
We now calculate the associated primitive function for \(\ln x\) as an indefinite integral.
(We could evaluate the definite integral directly, but we will simplify the notation because the primitive function will be useful for both integrals).
\[
\int \ln x \, dx = \int 1 \cdot \ln x \, dx = x \cdot \ln x - \int \frac{x}x \, dx =
x\cdot (\ln x-1) + C.
\]
The second modification of the above involves integration by parts.
We get (since the constant in the evaluation of the definite integral is subtracted, we don't include it in the square brackets):
\[
-\int_{1/e}^1 \ln x \, dx
+
\int_{1}^e \ln x \, dx
=
-[x(\ln x-1)]_{1/e}^1 + [x (\ln x-1)]_1^e
=
\]
\[
=
-( -1 - 2/e) + (0 - (-1)) = 2 - 2/e.
\]