How to integrate $\int \frac{dx}{\sqrt{ax^2-b}}$ So my problem is to integrate
$$\int \frac{dx}{\sqrt{ax^2-b}},$$
where $a,b$ are positive constants. What rule should I use here? Should substitution be used or trigonometric integrals?
The solution should be: 
$$\frac{\log\left(\sqrt{a}\sqrt{ax^2-b}+ax\right)}{\sqrt{a}}+C$$
Thank you for any help =) 

The question says "Should substitution be used or trigonometric integrals?".  But a trigonometric substitution is a substitution, not an alternative to substitution.
$$
\int \frac{dx}{\sqrt{ax^2-b}} = \int\frac{dx/\sqrt{b}}{\sqrt{\frac a b x^2 - 1}} = \int \frac{\sec\theta\tan\theta\,d\theta/\sqrt{a}}{\sqrt{\sec^2\theta - 1}}
$$
Then use the fact that $\sec^2\theta-1=\tan^2\theta$.  The substitution is $\sec\theta=x\sqrt{\frac a b}$ so that $\sec\theta\tan\theta\,d\theta=dx\sqrt{\frac a b}$ and thus $\sec\theta\tan\theta\,d\theta/\sqrt{a} = dx/\sqrt{b}$.
$$
\begin{array}{cc|c|c}
& \text{When  you have} & \text{then use} & \text{so that} \\
\hline
& (\text{variable})^2 + \text{positive constant} & \text{variable}=\tan\theta & \tan^2\theta+1\text{ becomes }\sec^2\theta \\
& (\text{variable})^2 - \text{positive constant} & \text{variable}=\sec\theta & \sec^2\theta-1\text{ becomes }\tan^2\theta \\
& \text{positive constant} - (\text{variable})^2 & \text{variable}=\sin\theta & 1-\sin^2\theta\text{ becomes }\cos^2\theta \\
\end{array}
$$
In the last one, $\cos\theta$ rather than $\sin\theta$ will also work.
