If I solve $$I=\int \sin(x) \sec^2(x) dx$$ with the substitution $u=\cos(x)$ I get the answer $$I = \frac{1}{2}\sec^2(x)$$ But if I try with $u = \tan(x)$ I get the answer $$I = \frac{1}{2}\tan^2(x)$$ What's going on? How can I get them to match?
2026-03-25 11:02:28.1774436548
On
Why does the indefinite integral $\int \sin(x) \sec^2(x) dx$ give different answers for different substitutions?
64 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
As others have mentioned, these are equivalent because $$ \frac{1}{2}\sec^2 x + C_1 = \frac{1}{2}\tan^2 x +C_2, $$ albeit with different values of constant.
Having said that, you have integrated incorrectly $-$ you should find that the actual integral is $$ I = \sec x + C $$ The first substitution works, whereas the second doesn't. Try it again and comment below if you have any trouble.
But they are the same (up to a constant): since $$ \sin^2{x}+\cos^2{x}=1, $$ dividing by $\cos^2{x}$ implies that $$ \tan^2{x}+1 = \sec^2{x}. $$