My book's attempt:
$$\int_{0}^{a}\frac{a^2-x^2}{(a^2+x^2)^2}dx$$
Let us find the antiderivative first:
$$\int\frac{a^2-x^2}{(a^2+x^2)^2}dx$$
$$=\int\frac{x^2(\frac{a^2}{x^2}-1)}{(x(\frac{a^2}{x}+x))^2}dx\tag{1}$$
$$=\int\frac{x^2(\frac{a^2}{x^2}-1)}{x^2(\frac{a^2}{x}+x)^2}dx$$
$$=\int\frac{(\frac{a^2}{x^2}-1)}{(\frac{a^2}{x}+x)^2}dx\tag{2}$$
$$=-\int\frac{1}{(\frac{a^2}{x}+x)^2}d(\frac{a^2}{x}+x)$$
$$=\frac{1}{(\frac{a^2}{x}+x)}+C\tag{3}$$
$$=\frac{x}{a^2+x^2}+C\tag{4}$$
$$\left[\frac{1}{(\frac{a^2}{x}+x)}\right]_{0}^{a}=\text{undefined}$$
$$\left[\frac{x}{a^2+x^2}\right]_{0}^{a}=\frac{1}{2a}\tag{5}$$
$(5)$ gives the correct answer according to this integral-calculator.
Both $(3)$ and $(4)$ should be perfectly valid antiderivatives, as we have completed the integration process before $(3)$. However, I found that only $(4)$ is a usable antiderivative, and $(3)$ gives an undefined expression.
Question:
- Why do we get an undefined expression using $(3)$?
My hunch:
My book's attempt of finding the antiderivative is wrong in that my book did $\frac{0}{0}=1$ multiple times throughout its working (for example, in lines $(1)$ and $(2)$). We should expect $(3)$ not to work since the process was wrong. When going from $(3)$ to $(4)$, the book did $\frac{0}{0}=1$ again. I am surprised that the book somehow managed to land at the correct antiderivative for our domain given that the process was wrong, and going from $(3)$ to $(4)$ is wrong as well.
Best Answer
You get an error with (3) because evaluating the expression at 0 results into a division-by-zero error. Now the standard way to bypass this problem is to replace 0 by $\varepsilon$ and then let $\varepsilon$ goes to $0$. Note that both expressions (3) and (4) coincide when $0$ is replaced by $\varepsilon$. So they must have the same limit when $\varepsilon$ goes to zero and since expression (4) is continuous at zero, the limit is the value of (4) at zero.