Blog · Calculus guides · 2 December 2026 · 4 min read
By the Asymptote team. Every answer on this page is checked by the same machine that grades the game.
Integrals of Sec and Tan: Formulas, Proofs & Practice Problems
The integral of is (the same as ), and the integral of is . Get the first by writing and substituting ; get the second by multiplying by and substituting . For example, .
Before you scroll
Try one now
Type the answer. Any correct form counts, and it is checked instantly. Stuck? The answer is underneath.
Problem 1
EasyIntegrate (the game accepts any constant):
Stuck? Show the answer
Answer
How to start
Let , so and the integral is .
The formula
The bottom two are just derivatives read backwards. The top two are the ones that turn up on exams, mostly to see who remembered them.
When to use it
Use these whenever a or appears on its own, or as a power like . For products and powers of and , the moves are in trig integrals. If you see , you will end up here after a trig substitution, since is where those often land. And if the integrand is of something other than , like , run a quick u-substitution first.
How to do it, step by step
- Is it one of the four basics? , , or : write the answer down from the formula box.
- Power of even? Save a . Turn every other into and let , .
- Power of odd? Save a . Turn the remaining even power of into and let , .
- Only even powers of ? Use to peel them down, one at a time.
- Check by differentiating. . It takes five seconds and catches every lost minus sign.
Worked examples
Example 1: The integral of tan x
EasyIntegrate:
Write as . The top is (minus) the derivative of the bottom, so let , :
Since , both forms are the same answer. The absolute value matters: is negative on half its life, and of a negative number is nobody's idea of fun.
Answer
Example 2: The integral of sec x, from scratch
MediumIntegrate:
No substitution is visible yet, so make one. Multiply by , which is just 1 in disguise:
Now look at the bottom, . Its derivative is , which is exactly the top. So the integral is :
Nobody would think of this trick unprompted. It has been passed down by teachers for centuries precisely because nobody would think of it.
To check, differentiate: , after factoring out of the top. There is also a lookalike: , by the same trick with .
Answer
Example 3: An even power of sec
HarderEvaluate:
The power of is even, so save one for and turn the other into :
Let , . The limits change too: gives and gives .
Why save and not ? Because there is no in the integrand to pair with a , and converting into s is always possible. If the power of had been odd, say , the other route works: save , write , and let to get .
Answer
Integrals of sec and tan practice problems
The easy one was at the top. Here are the harder ones. Type an answer and it is checked instantly by the same checker that grades the game; any correct form counts. Stuck? The answer and the first step are under each one.
Problem 2
MediumIntegrate:
Stuck? Show the answer
Answer
How to start
Replace with , then integrate each piece.
Problem 3
HarderIntegrate:
Stuck? Show the answer
Answer
How to start
The power of is odd: save , write , and let . You get .
Want more? Asymptote has 1,000 related problems, free, with no account.
Common mistakes
- Writing . That is the derivative of , read the wrong way. The integral of is a logarithm.
- Losing the minus sign. . Without the minus, the derivative is . Writing it as avoids the problem entirely.
- Dropping the absolute value. is negative for some , and so is . The bars keep the answer working there.
- Saving the wrong piece. With you must save ; with you must save . Save from an odd power of with an even power of , and you are stuck.
Practice it now
Five minutes, no account
There are no or integrals in the game yet. The closest practice is the other direction: Sprint's early trig derivative problems (d2-d3) are full of and , which is exactly where and come from, and its u-substitution problems at d5-d7 include answers built the same way as .
FAQ
- What is the integral of sec x?
- . It comes from multiplying by , which makes the top the derivative of the bottom.
- Is the integral of tan x ln|sec x| or -ln|cos x|?
- Both. , so they are the same function written two ways.
- What is the integral of sec^3 x?
- . It needs integration by parts with and , and then the original integral appears again on the right, so you solve for it.
- How do you integrate powers of tan and sec?
- For : if is even, save and let ; if is odd, save and let . If is even and is odd, rewrite everything in and use the reduction, which is the slow case.
- What is the integral of sec^2 x?
- , because the derivative of is . Likewise .
- Where can I find integrals of sec and tan practice problems?
- Right on this page: the practice problems section has three integrals of sec and tan problems, easy, medium and harder, with the answer and the first step under each one, and a box that checks what you type with the same checker that grades Asymptote. The game has 1,000 related problems after that, free and with no account: try a five-minute Sprint.
Keep going
Trig Integrals: Powers of Sin and Cos & Practice Problems
Integrate powers of sin and cos: save one factor of an odd power and substitute, or use half-angle identities if both are even. Examples and practice problems.
U-Substitution: Choosing u, 3 Examples & Practice Problems
U-substitution undoes the chain rule: pick u so du is in the integral, swap, integrate, swap back. 3 worked examples and practice problems with answers.
Trig Substitution: Which to Use & Practice Problems
Trig substitution: a²−x² → x = a sin θ, a²+x² → x = a tan θ, x²−a² → x = a sec θ. Converting back with a triangle, 3 examples and practice problems.