To solve the integral \(\int e^x (\tan x + \sec^2 x) \, dx\), let's break it down step by step:
- Observe the integral's form: \(\int e^x (\tan x + \sec^2 x) \, dx\). We can split it into two separate integrals: \(\int e^x \tan x \, dx + \int e^x \sec^2 x \, dx\).
- Begin by solving each integral separately. Let's start with \(\int e^x \tan x \, dx\). This integral can be attacked through integration by parts, where we let:
- \(u = \tan x\)and \(dv = e^x \, dx\).
- Differentiating and integrating:
- \(du = \sec^2 x \, dx\)
- \(v = e^x\)
- Using the integration by parts formula, \(\int u \, dv = uv - \int v \, du\):
- \(\int e^x \tan x \, dx = e^x \tan x - \int e^x \sec^2 x \, dx\)
- Now, handle the second integral \(\int e^x \sec^2 x \, dx\). This form is already present in our existing equation from the integration by parts step:
Notice from our integration by parts equation that we get back \(-\int e^x \sec^2 x \, dx\)which cancels itself out, leaving us with the term:
Thus, the final solution to the integral \(\int e^x (\tan x + \sec^2 x) \, dx\)is:
- Answer: \(e^x \tan x + c\), where \(c\)is the constant of integration.