I am trying to come up with all the formulas I have myself and I stumbled upon a roadblock again. Integrating $\int \sqrt{a^2+x^2} \ \mathrm{d} x$ with Trig Substitution.
So I imagined a triangle where the hypotenuse is $1$, $\sin(y) = x$ opposite over hypotenuse and $\cos(y) = a$ adjacent over hypotenuse.
Then $dx = \cos(y)dy$ and factoring out the a out of the square root, I get $ \int a $ $\sqrt{1+\frac{x^2}{a^2}} \ \mathrm{d} x$ or $ \int \sqrt{1+\tan y^2}\cos y^2 \ \mathrm{d} y$ which I could simplify to $\int \cos y \ \mathrm{d} y$. This gives me the wrong answer.
Can you pinpoint or hint at where I am going wrong with my substitution once more? Apologies, I appreciate it.
In the integral $$\int\sqrt{a^2+x^2} dx $$ $a$ is supposed to be a constant, and you can’t just make it dependent on the variable of integration, by saying $a=\cos y$. The straightforward approach would be to substitute $x=a\tan y \implies dx=a\sec^2y dy$ To get$$\int a^2\sec^3y\ dy$$