Evaluate the integral:
\[
I = \int e^x \sec(x) \left( \tan(x) + 1 \right) \, dx
\]
1. Step 1: Simplify the integrand:
The integrand can be simplified by expanding the terms inside the brackets:
\[
\sec(x) \left( \tan(x) + 1 \right) = \sec(x) \tan(x) + \sec(x)
\]
Thus, the integral becomes:
\[
I = \int e^x \left( \sec(x) \tan(x) + \sec(x) \right) \, dx
\]
2. Step 2: Separate the terms:
We can now split the integral into two parts:
\[
I = \int e^x \sec(x) \tan(x) \, dx + \int e^x \sec(x) \, dx
\]
3. Step 3: Integrate each part:
- The first integral \( \int e^x \sec(x) \tan(x) \, dx \) can be solved by recognizing that the derivative of \( \sec(x) \) is \( \sec(x) \tan(x) \), so this part integrates to:
\[
e^x \sec(x) + C_1
\]
- The second integral \( \int e^x \sec(x) \, dx \) can be integrated similarly, resulting in:
\[
e^x \sec(x) + C_2
\]
4. Step 4: Combine the results:
Adding the two integrals gives us the final result:
\[
I = e^x \sec(x) \tan(x) + e^x \sec(x) + C
\]