# How do you find the antiderivative of int x^2/(4-x^2) dx?

Jul 29, 2018

$\int {x}^{2} / \left(4 - {x}^{2}\right) \mathrm{dx} = - x - \ln \left\mid x - 2 \right\mid + \ln \left\mid x + 2 \right\mid + C$

#### Explanation:

Add and subtract $4$ to the numerator:

$\int {x}^{2} / \left(4 - {x}^{2}\right) \mathrm{dx} = - \int \frac{{x}^{2} - 4 + 4}{{x}^{2} - 4} \mathrm{dx}$

$\int {x}^{2} / \left(4 - {x}^{2}\right) \mathrm{dx} = - \int \left(1 + \frac{4}{{x}^{2} - 4}\right) \mathrm{dx}$

using the linearity of the integral:

$\int {x}^{2} / \left(4 - {x}^{2}\right) \mathrm{dx} = - \int \mathrm{dx} - 4 \int \frac{\mathrm{dx}}{{x}^{2} - 4}$

$\int {x}^{2} / \left(4 - {x}^{2}\right) \mathrm{dx} = - x - 4 \int \frac{\mathrm{dx}}{{x}^{2} - 4}$

Decompose now the resulting integrand using partial fractions:

$\frac{4}{{x}^{2} - 4} = \frac{4}{\left(x - 2\right) \left(x + 2\right)}$

$\frac{4}{{x}^{2} - 4} = \frac{A}{x - 2} + \frac{B}{x + 2}$

$\frac{4}{{x}^{2} - 4} = \frac{A \left(x + 2\right) + B \left(x - 2\right)}{\left(x - 2\right) \left(x + 2\right)}$

$4 = A x + 2 A + B x - 2 B$

$4 = \left(A + B\right) x + 2 \left(A - B\right)$

$\left\{\begin{matrix}A + B = 0 \\ A - B = 2\end{matrix}\right.$

$\left\{\begin{matrix}A = 1 \\ B = - 1\end{matrix}\right.$

So:

$\int {x}^{2} / \left(4 - {x}^{2}\right) \mathrm{dx} = - x - \int \frac{\mathrm{dx}}{x - 2} + \int \frac{\mathrm{dx}}{x + 2}$

$\int {x}^{2} / \left(4 - {x}^{2}\right) \mathrm{dx} = - x - \ln \left\mid x - 2 \right\mid + \ln \left\mid x + 2 \right\mid + C$