Inverse trigonometric substitution for integrals

I am trying to solve this integral by inverse trigonometric substitution. $$\int_{0}^1{\sqrt{4kx-k^2x^2}dx}$$ where k is an arbitrary constant. I completed the square to get this:$$\int_{0}^1\sqrt{2^2-(kx-2)^2}dx$$ Then, I substituted $$kx-2=2\sin \theta$$ into the integral to obtain: $$\int_{-\pi/2}^{\sin^{-1}(\frac{k-2}{2})}2\cos{\theta}\frac{2}{k}\cos\theta d\theta \\ =\frac{2}{k}\int_{-\pi/2}^{\sin^{-1}(\frac{k-2}{2})}2\cos^2{\theta}+1-1d\theta \\ =\frac{1}{k}\int_{-\pi/2}^{\sin^{-1}(\frac{k-2}{2})}2\cos(2\theta)+2d\theta \\ =\frac{1}{k}(\sin(2\theta)+2\theta)|_{-\pi/2}^{\sin^{-1}(\frac{k-2}{2})}$$ However, when I tried to check by substituting $$k=2$$, I get$$\int_{0}^1{\sqrt{4\cdot2\cdot x-2^2x^2}dx}=1.333333754$$ but my answer returns$$\frac{1}{k}(\sin(2\theta)+2\theta)|_{-\pi/2}^{-\sin^{-1}(\frac{k-2}{2})}=1.570796327$$ I am not sure where I have gone wrong with my substitution. I thought I merely left out a 2 multiple but that was not the case. Thank you very much for your help.

• Why is there no $k$ in the boundaries? Feb 22, 2021 at 13:47
• Are you sure this is a correct integral? If $k$ is arbitrary, you could get something uncomfortable in the case k>4. Or k<0 Feb 22, 2021 at 13:50
• I apologise for that, I have edited in the boundaries. The lower bound remained the same because $x=0$. There was no information provided for k in the question, I could only assume it to be properly behaving. Feb 22, 2021 at 13:57

You want to substitute $$kx-2=2\sin\theta$$. For the lower boundary, $$x=0$$, we have $$-2=2\sin\theta\Rightarrow\theta=-\frac{\pi}{2}.$$ And for $$x=1$$, we have $$k-2=2\sin\theta\Rightarrow\theta=\arcsin\left(\frac{k}{2}-1\right).$$
• I tried to do that, but I ended up with this: $$\frac{1}{k}\int_{-\pi/2}^{\arcsin(\frac{k}{2}-1)}{2\cos(2\theta)+2 d\theta}=1.5708$$ Note: Sorry about that, I accidentally hit enter instead of shift+enter. This is when k=2. Feb 22, 2021 at 14:34
• I really am sorry for wasting your time. It seems that a calculator reset solved the issue. I got $\pi/2$ with the original now. Thank you very much for your time and help, I really appreciate it. Feb 22, 2021 at 15:32