# most general antiderivative involving sec x

I'm stumped on how to get the most general antiderivative, $F(x)$, of $f(x)=e^x+3secx(tan x + sec x)$.

First, I split the equation on addition, since $\int[f(x)+g(x)]dx=\int f(x)dx+\int g(x)dx$

$$F(x)=\int e^xdx+3\int secx(tanx+secx)dx$$

Then I use the Substitution Rule. $sec(x)$ seems like a good choice for $u$ since it's the inner function of a composition and du will encompass the other $x$ terms

$$u = secx \Rightarrow du = (tan x + sec x)dx$$

Then I have

$$F(x)= e^x+3 \int (u)du \\ F(x)=e^x+\frac{3u^2}{2}+C\\ F(x)=e^x+\frac{3sec^2x}{2}+C$$

However, the answer key says the correct answer is $F(x)=e^x+3secx+3tanx+C$.

Can someone please point out where I've gone wrong here?

• We are integrating $3\sec x\tan x+3\sec^2 x$. Antiderivative of first is $3\sec x$, of the second is $3\tan x$. Your $du$ is not right, it is $\sec x\tan x$ not $\sec x+\tan x$. – André Nicolas Apr 28 '16 at 2:20

No need to substitute. Remember that the derivative of $\sec(x)$ is $\sec(x)\tan(x)$ [which is why your substitution isn't working], and the derivative of $\tan(x)$ is $\sec^2(x)$.
$$\int e^xdx \space+\space \int3\sec(x)\tan(x)dx\space +\space \int 3\sec^2(x)dx$$
From $u=\sec x$ one rather gets $du= \sec x \tan xdx$, not $du = (\tan x + \sec x)dx$, this is a first mistake.