TITLE: Integrating $\frac{1}{(1-x)^2} $ into two different-looking functions
QUESTION [7 upvotes]: Background
I want to "trick" some students by showing that $$\int \frac{1}{(1-x)^2} \mathrm dx = \frac1{1-x} + C$$ in one instance and $$\int \frac{1}{(1-x)^2} \mathrm dx = \frac x{1-x} + C$$ in another.
Obviously these look like two different results due to the different numerator, but as the more astute will point out, the difference between these functions is a constant, and they therefore have the same derivative.
Question
When solving the integral, using the substitution $u = 1-x$ we naturally arrive that the first results, but is there a way of solving the integral that "naturally" yields the second result?

REPLY [3 votes]: Put $x=\sin^2(t)$; then $dx = 2\sin(t)\cos(t)\,dt$. We have
$$
\int \frac{1}{(1-x)^2}\,dx \longrightarrow \int \frac{2\sin(t)\cos(t)}{(1-\sin^2(t))^2}\,dt
$$
$$
=2\int \frac{\sin(t)}{\cos^3(t)}\,dt = 2\int \tan(t)\sec^2(t)\,dt  
$$
$$
\begin{cases}\stackrel{y=\tan(t)}{\longrightarrow}\int 2y\,dy= \tan^2(t)+C = \frac{\sin^2(t)}{1-\sin^2(t)}+C\longrightarrow \frac{x}{1-x}+C\\
\stackrel{y=\sec(t)}{\longrightarrow}\int 2y\,dy=  \sec^2(t)+C = \frac{1}{1-\sin^2(t)}+C\longrightarrow \frac{1}{1-x}+C
\end{cases}
$$This is a general phenomenon: antiderivatives of trig functions involving tangent and secant often look dissimilar but by the FTC they must be identical up to a constant.