I am confused about the following proof I am studying of $\int \frac{1}{\sqrt{a^2-u^2}} d u=\sin ^{-1}\left(\frac{u}{a}\right)+C$; I am unsure about how we can "generalize to $u$" and replace $x$ with $u$, when we relied on the derivative of $x$ being $1$ in the proof during implicit differentiation. If we replace $x$ with any function $u$, then the derivative of $u$ may not be $1$ as we have assumed in the proof, it seems, making this invalid. Here is the proof:
Let $y=\sin ^{-1} \frac{x}{a}$. Then $a \sin y=x$. Now let's use implicit differentiation. We obtain $$ \begin{aligned} \frac{d}{d x}(a \sin y) & =\frac{d}{d x}(x) \\ a \cos y \frac{d y}{d x} & =1 \\ \frac{d y}{d x} & =\frac{1}{a \cos y} \end{aligned} $$ For $-\frac{\pi}{2} \leq y \leq \frac{\pi}{2}, \cos y \geq 0$. Thus, applying the Pythagorean identity $\sin ^2 y+\cos ^2 y=1$, we have $\cos y=\sqrt{1-\sin ^2 y}$. This gives $$ \begin{aligned} \frac{1}{a \cos y} & =\frac{1}{a \sqrt{1-\sin ^2 y}} \\ & =\frac{1}{\sqrt{a^2-a^2 \sin ^2 y}} \\ & =\frac{1}{\sqrt{a^2-x^2}} . \end{aligned} $$ Then for $-a \leq x \leq a$, and generalizing to $u$, we have $$ \int \frac{1}{\sqrt{a^2-u^2}} d u=\sin ^{-1}\left(\frac{u}{a}\right)+C $$ Is my understanding of what "generalizing to $u$" means correct? How could we accomplish this here? For context, the textbook goes on to use any function in the place of $u$ when applying this theorem.
I think "generalise to u" according to the book you are reading means that you have to consider $u$ as a general function of $x$, i.e. $u=u(x)$. Hereafter, you can see my suggested solution:
Define a variable $y=y(x)$ and let $u(x)=a \sin y(x)$. Thus, $\sqrt{a^2-u^2}=\sqrt{a^2(1-\sin^2 y)}=|a|\cdot|\cos y|$.
Define $g(u,x)=u-a \sin x=0$. Since $dg(u,x)=\frac{\partial g}{\partial u}du + \frac{\partial g}{\partial x}dx$, we have: $1\cdot du +[(-a \cos y)\cdot y'(x)]dx=0 \implies du=[(a \cos y)\cdot y'(x)] dx$. Then:
$I=\int_{}^{} \frac{1}{\sqrt{a^2-u^2}}du=\int_{}^{} \frac{1}{|a|\cdot|\cos y|}[(a \cos y)\cdot y'(x)] dx$
Now, you have to distinguish between two possible cases:
$\cases{ I_{+}=\int_{}^{} y'(x) dx,\qquad|a\cdot \cos y|>0\\ I_{-}=\int_{}^{} [-y'(x)] dx,\qquad|a\cdot \cos y|<0 }$.
Therefore, $I_{\pm}=\pm y(x)+C=\pm \sin^{-1}(u/a) + C$,
with $a\neq 0, |u(x)/a|\leq 1, \forall x$ and $ \forall C \in \mathbb{R}$.