### Why substitution works in indefinite integration

Let’s integrate $\int{\frac{dx}{\sqrt{1-x^2}}}$. We know the trick: substitute $x$ for $\sin\theta$. We get $dx=\cos\theta d\theta$. Substituting into the original equation, we get $\int{\frac{\cos\theta d\theta}{\sqrt{1-\sin^2\theta}}}=\int{\frac{\cos\theta d\theta}{|\cos\theta|}}$. Let us assume $\cos\theta$ remains positive throughout the interval under consideration. Then we get the integral as $\theta$ or $\arcsin x$.

I have performed similar operations for close to five years of my life now. But I was never, ever, quite convinced with it. How can you, just like that, substitute $dx$ for $\cos\theta d\theta$? My teacher once told me this: $\frac{dx}{d\theta}=\cos\theta$. Multiplying by $d\theta$ on both sides, we get $dx=d\theta$. What?!! It doesn’t work like that!!

It was a year back that I finally derived why this ‘ruse’ works.

Take the function $x^2$. If you differentiate this with respect to $x$, you get $2x$. If you integrate $2x$, you get $x^2+c$. Simple.

Now take the function $\sin^2\theta$. Differentiate it with respect to $\theta$. You get $2\sin\theta.\cos\theta$. If you integrate $2\sin\theta.\cos\theta$, you get $\sin^2\theta+c$.

The thing to notice is when you integrate the two functions- $2x$ and $2\sin\theta.\cos\theta$, you want a function of the form $y^2$. However and whatever I integrate, I ultimately want a function of the form $y^2$, so that I can substitute $x$ for $y$ to get $x^2$.

In the original situation, let us imagine there’s a function $f(x)=\int{\frac{dx}{\sqrt{1-x^2}}}$. We’ll discuss the properties of $f(x)$. If we were to make the substitution $x=\sin\theta$ in $f(x)$ and differentiate it with respect to $\theta$, we’d get a function of the form $\frac{1}{\sqrt{1-y^2}}\cos\theta$, where $y$ is $\sin\theta$. There are two things to note here:

1. The form of the derivative if $f(x)$ wrt $\theta$ is the same as that of $f'(x)$, which is $\frac{1}{\sqrt{1-y^2}}$, multiplied by $\cos\theta$, or derivative of $\sin\theta$ wrt $\theta$.

2. When any function is differentiated with respect to any variable, integration wrt the same variabe gives us back the same function. Hence, $\int{\frac{\partial f}{\partial x}dx}=\int{\frac{\partial f}{\partial \theta}d\theta}$

Coming back to $\int{\frac{dx}{\sqrt{1-x^2}}}$, let us assume its integral is $f(x)$. It’s derivative on substituting $x=\cos\theta$ and differentiating wrt $\theta$ is of the same form as $\frac{\partial f}{\partial x}$ multiplied by $\cos\theta$. This is a result of the chain rule of differentiation. Now following rule 2, we know $\int{\frac{dx}{\sqrt{1-x^2}}}=\int{\frac{\cos\theta d\theta}{\sqrt{1-\sin^2\theta}}}$.

How is making the substitution $x=\sin\theta$ justified? Could we have made any other continuous substitution, like $x=\theta^2 +\tan\theta^3$? Let us assume we substitute $x$ for $g(\theta)$. We want $g(\theta)$ to take all the values $x$ can take. This is the condition that must be satisfied by any substitution. For values that $g(\theta)$ takes by $x$ doesn’t, we restrict the range of $g(\theta)$ to that of $x$. Note that the shapes of $f(x)$ as plotted against $x$ and $f(\sin\theta)$ as plotted against $\theta$ will be different. But that is irrelevant as long as we can write the same cartesian pairs $(m,n)$ for any variable, where $m$ is the x-coordinate and $n$ is the y-coordinate.

Summing the argument, we predict the form the derivative of $f(x)$ will take when the substitution $x=\sin\theta$ is made, and then integrate this new form wrt $\theta$ to get the original function. This is why the ‘trick’ works.