I know how to integrate stuff like $\sqrt{a-x^2}$, though I haven't done this in a while. So I wanted to check the answer after calculating. My calculations go like this ($\theta=sin^{-1}(\frac{x}{\sqrt{a}})$): $$\int_{A}^{B}{\sqrt{a-x^2}}dx=\int_{A}^{B}{\sqrt{a-x^2}}\frac{1}{\frac{1}{\sqrt{a}}\frac{1}{\sqrt{1-\frac{x^2}{a}}}}d(sin^{-1}(\frac{x}{\sqrt{a}}))=\int_{sin^{-1}(\frac{A}{\sqrt{a}})}^{sin^{-1}(\frac{B}{\sqrt{a}})}{(a-x^2)d\theta}=\int_{sin^{-1}(\frac{A}{\sqrt{a}})}^{sin^{-1}(\frac{B}{\sqrt{a}})}{(a-((sin\theta)\sqrt{a})^2)d\theta}=[a\theta]_{sin^{-1}(\frac{A}{\sqrt{a}})}^{sin^{-1}(\frac{B}{\sqrt{a}})}-a\int_{sin^{-1}(\frac{A}{\sqrt{a}})}^{sin^{-1}(\frac{B}{\sqrt{a}})}{(\frac{1}{2}-\frac{1}{2}cos2\theta)d\theta}=[a\theta]_{sin^{-1}(\frac{A}{\sqrt{a}})}^{sin^{-1}(\frac{B}{\sqrt{a}})}-[a\frac{1}{2}\theta]_{sin^{-1}(\frac{A}{\sqrt{a}})}^{sin^{-1}(\frac{B}{\sqrt{a}})}+\frac{1}{2}a\int_{sin^{-1}(\frac{A}{\sqrt{a}})}^{sin^{-1}(\frac{B}{\sqrt{a}})}{cos2\theta\frac{1}{2}d(2\theta)}=[\frac{1}{2}a\theta]_{sin^{-1}(\frac{A}{\sqrt{a}})}^{sin^{-1}(\frac{B}{\sqrt{a}})}+\frac{1}{2}a[\frac{1}{2}sin2\theta]_{sin^{-1}(\frac{A}{\sqrt{a}})}^{sin^{-1}(\frac{B}{\sqrt{a}})}=[\frac{1}{2}a\theta]_{sin^{-1}(\frac{A}{\sqrt{a}})}^{sin^{-1}(\frac{B}{\sqrt{a}})}+[\frac{1}{2}a sin\theta cos\theta]_{sin^{-1}(\frac{A}{\sqrt{a}})}^{sin^{-1}(\frac{B}{\sqrt{a}})}=[\frac{1}{2}asin^{-1}(\frac{x}{\sqrt{a}})+\frac{1}{2}x\sqrt{a-x^2}]_{A}^{B}$$
However this doesn't seem to be right after I checked it multiple times with Wolfram Integrator and my calculator. Where did I go wrong?