# Integral de tg² x: fórmula, dedução e exemplos

> A integral de tg² x é tg x - x + C. Veja como a identidade tg² x = sec² x - 1 faz todo o trabalho, além de tg²(ax), tg³ x e exemplos de integrais definidas.

Fonte: https://practicecalculus.com/pt/integrais/integral-de-tg-quadrado-x
Atualizado: 2026-11-06

$$ \int \tan^2 x\,dx = \tan x - x + C $$

## Visão geral

- **Primitiva:** $\tan x - x + C$
- **Identidade usada:** $\tan^2 x = \sec^2 x - 1$
- **De 0 a π/4:** $1 - \dfrac{\pi}{4} \approx 0.215$
- **Forma linear:** $\int\tan^2(ax)\,dx = \dfrac{\tan(ax)}{a} - x + C$
- **Parceira com cotangente:** $\int\cot^2 x\,dx = -\cot x - x + C$

## Pontos principais

- A integral de $\tan^2 x$ é $\tan x - x + C$.
- Reescreva com a identidade pitagórica $\tan^2 x = \sec^2 x - 1$ e integre cada termo.
- Não use a regra da potência. $\frac{\tan^3 x}{3}$ está errado.
- A mesma identidade resolve potências ímpares como $\tan^3 x$.

A **integral de $\tan^2 x$ é $\tan x - x + C$**. Uma única identidade a transforma em duas integrais que você já conhece.

$$\int \tan^2 x\,dx = \tan x - x + C$$

## Gráfico de tg² x e de sua primitiva

```graph
title: 'Área sob y = tg² x de 0 a π/4, com a primitiva y = tg x - x'
caption: 'A área sombreada é $1 - \frac{\pi}{4} \approx 0.215$. A primitiva tracejada é plana na origem, porque $\tan^2 0 = 0$, e nunca decresce.'
x: [-1.6, 1.6]
y: [-2.5, 4]
functions:
  - expr: tan(x)^2
    label: y = tg² x
    domain: [-1.1, 1.1]
  - expr: tan(x) - x
    label: y = tg x - x (primitiva)
    dashed: true
    domain: [-1.4, 1.4]
shade: {expr: tan(x)^2, from: 0, to: 0.7854}
points:
  - [0.7854, 1, '(π/4, 1)']
```

## Dedução, passo a passo

1. Parta da identidade pitagórica $\sin^2 x + \cos^2 x = 1$. Divida por $\cos^2 x$ para obter $\tan^2 x + 1 = \sec^2 x$.
2. Reorganize: $\tan^2 x = \sec^2 x - 1$.
3. Substitua: $\displaystyle\int\tan^2 x\,dx = \int\sec^2 x\,dx - \int 1\,dx$.
4. Use a [integral de sec² x](/integrals/sec-squared-x), $\tan x$, e a [integral de uma constante](/integrals/constant), $x$.
5. Junte: $\tan x - x + C$.

## Verificação por derivação

$$\frac{d}{dx}(\tan x - x) = \sec^2 x - 1 = \tan^2 x \checkmark$$

## Integrais definidas

$$\int_0^{\pi/4}\tan^2 x\,dx = \left(\tan\frac{\pi}{4} - \frac{\pi}{4}\right) - 0 = 1 - \frac{\pi}{4} \approx 0.215$$

$$\int_0^{\pi/3}\tan^2 x\,dx = \sqrt{3} - \frac{\pi}{3} \approx 0.685$$

Como $\tan^2 x$ é par, $\int_{-\pi/4}^{\pi/4}\tan^2 x\,dx = 2 - \frac{\pi}{2}$.

## Variantes por substituição

$$\int\tan^2(ax + b)\,dx = \frac{1}{a}\tan(ax + b) - x + C$$

Repare que só o termo com $\tan$ recebe o fator $\frac{1}{a}$. O $-x$ vem da integral da constante $1$, que não tem função de dentro.

**Exemplo 1.** $\int\tan^2(3x)\,dx = \frac{1}{3}\tan(3x) - x + C$.

**Exemplo 2.** $\int\tan^2\frac{x}{2}\,dx = 2\tan\frac{x}{2} - x + C$.

## Potências maiores de tg

A identidade $\tan^2 x = \sec^2 x - 1$ é a chave para qualquer potência de $\tan x$.

**Exemplo 3: tg³ x.**

$$\int\tan^3 x\,dx = \int\tan x(\sec^2 x - 1)\,dx = \int\tan x\sec^2 x\,dx - \int\tan x\,dx$$

A primeira parte dá $\frac{\tan^2 x}{2}$ com $u = \tan x$. A segunda é a [integral de tg x](/integrals/tan-x). Então

$$\int\tan^3 x\,dx = \frac{\tan^2 x}{2} - \ln\lvert\sec x\rvert + C$$

**Exemplo 4: tg² x sec² x.** Aqui $u = \tan x$ funciona diretamente: $\int\tan^2 x\sec^2 x\,dx = \frac{\tan^3 x}{3} + C$. Esse é o único caso em que $\frac{\tan^3 x}{3}$ é a resposta certa, porque o fator $\sec^2 x$ está presente.

**Exemplo 5: tg⁴ x.** $\tan^4 x = \tan^2 x(\sec^2 x - 1) = \tan^2 x\sec^2 x - \tan^2 x$, então

$$\int\tan^4 x\,dx = \frac{\tan^3 x}{3} - \tan x + x + C$$

## Erros comuns

1. **Responder $\frac{\tan^3 x}{3}$.** Isso exige um fator $\sec^2 x$. Confira: sua derivada é $\tan^2 x\sec^2 x$.
2. **Responder $\sec^2 x$ ou $\ln^2\lvert\sec x\rvert$.** Nenhuma das duas, derivada, volta a $\tan^2 x$.
3. **Inverter a identidade.** É $\sec^2 x - 1$, e não $1 - \sec^2 x$. Teste em $x = \frac{\pi}{4}$: $\tan^2 = 1$ e $\sec^2 - 1 = 2 - 1 = 1$.
4. **Dividir o $-x$ por $a$** em $\int\tan^2(ax)\,dx$.

Pratique com os [exercícios de integrais trigonométricas](/practice-problems/trig-integrals).

## Perguntas frequentes

### Qual é a integral de tg² x?

É $\tan x - x + C$.

### Qual é a integral de tg² x de 0 a π/4?

É $\left(1 - \frac{\pi}{4}\right) - 0 = 1 - \frac{\pi}{4} \approx 0.215$.

### Qual é a integral de tg²(2x)?

É $\frac{1}{2}\tan(2x) - x + C$.

### Qual é a integral de tg³ x?

Escreva $\tan^3 x = \tan x\sec^2 x - \tan x$. A resposta é $\frac{\tan^2 x}{2} - \ln\lvert\sec x\rvert + C$.
