Find integral of $\int\frac{x^2+3}{\sqrt{x^2+6}}dx$ from Cambridge IGCSE Additional Mathematics $$\int\frac{x^2+3}{\sqrt{x^2+6}}dx$$
I tried to $$\int\frac{x^2+6-3}{\sqrt{x^2+6}}dx=\int\frac{x^2+6}{\sqrt{x^2+6}}dx-\int\frac{3}{\sqrt{x^2+6}}dx= \int\sqrt{x^2+6}dx - 3\int\frac{1}{\sqrt{x^2+6}}dx$$
Then got stuck
In exam-mate website the answer is $$\frac{1}{2}x\sqrt{x^{2}+6}$$
Thanks for replies in advance
 A: Since your work $$\int \frac{x^{2}+3}{\sqrt{x^{2}+6}}dx=\int \frac{x^{2}+6-3}{\sqrt{x^{2}+6}}dx=\int \sqrt{x^{2}+6}dx-3\int \frac{1}{\sqrt{x^{2}+6}}dx,$$ which it is correct. Now we are looking for primitives of $G(\sqrt{a^{2}+x^{2}})$, we can try with the substitution $x=a\tan t$.

*

*$\int \sqrt{x^{2}+6}dx\underset{x=\sqrt{6}\tan t}{=}6$ $\int \sec^{3}t\, dt$;

*$\int \frac{1}{\sqrt{x^{2}+6}}dx\underset{x=\sqrt{6}\tan t}{=}$$\int \sec t\, dt$,

Thus,
\begin{align*}\int \frac{x^{2}+3}{\sqrt{x^{2}+6}}\, dx &\underset{x=\sqrt{6}\tan t}{=}-3\ln|\tan t+\sec t|+3\tan t\sec t+3\ln|\tan t+\sec t|+C\\
&=3\tan t\sec t+C\\
&=3\tan(\tan^{-1}\frac{x}{\sqrt{6}})\sec(\tan^{-1}\frac{x}{\sqrt{6}})+C\\
&=3\frac{x}{\sqrt{6}}\sqrt{(\frac{x}{\sqrt{6}})^{2}+1}+C\\
&=3\frac{1}{\sqrt{6}}\frac{1}{\sqrt{6}}\sqrt{x^{2}+6}+C\\
&=\frac{1}{2}x\sqrt{x^{2}+6}+C
\end{align*}
Therefore,
$$\int \frac{x^{2}+3}{\sqrt{x^{2}+6}}dx=\frac{1}{2}x\sqrt{x^{2}+6}+C$$
as desired.
A: You can enforce an Euler substitution,
$$t=\frac{\sqrt{x^2+6}-\sqrt6}x \implies x=\frac{2\sqrt6\,t}{1-t^2} \implies dx = 2\sqrt6\frac{1+t^2}{(1-t^2)^2} \, dt$$
to transform the starting integral to
$$\int \frac{x^2+3}{\sqrt{x^2+6}}\,dx = 2\sqrt6 \int \frac{\frac{24t^2}{(1-t^2)^2}+3}{\frac{2\sqrt6\,t^2}{1-t^2}+\sqrt6} \, \frac{1+t^2}{(1-t^2)^2}\,dt = 6 \int \frac{1+6t^2+t^4}{(1-t^2)^3}\,dt$$
