1. ## Are these two integral answers equivalent?

$\int sec^2xtanxdx$
I let u=tanx
du=sec^2xdx
$\int udu$
$\frac{u^2}{2} + C$

$\frac{1}{2}tan^2x + C$

$\frac{1}{2}sec^2x + C$

It doesn't seem that they could be the same. What did I do wrong?

2. ## Re: Are these two integral answers equivalent?

Both substitutions are correct, the book's substitution would have been easier though.

Your answer was $\frac{1}{2} \tan^2x + \mathrm{C}$

Although it really isn't intuitive, from there you can use the tangent identity $\tan^2\theta = \sec^2\theta - 1$ to rewrite your integral as $\frac{\sec^2x}{2} - \frac{1}{2} + \mathrm{C}$ now -1/2 is a constant and any constant plus an arbitrary constant is still an arbitrary constant so your answer becomes $\frac{\sec^2x}{2} + \mathrm{C}$

When all else fails, you can always try writing those trig functions in terms of sine and cosine. For this problem it would be
$\int \frac{\sin x}{\cos x} \frac{1}{ \cos^2x}\,\,dx = \int\frac{\sin x}{\cos^3x}\,\,dx \,\,\,\,\, u =\cos x \rightarrow dx = -\sin x \,\,du$
$-\int \frac{1}{u^3}\,\,du = -\frac{-1}{2u^2} + \mathrm{C} = \frac{1}{2} \frac{1}{\cos^2x} + \mathrm{C}= \frac{\sec^2x}{2} + \mathrm{C}$
that's a lot more unnecessary work, but it's a surefire way to get an answer

3. ## Re: Are these two integral answers equivalent?

Awesome, thank you for the explanation.