<s>[INST] Integrate $\int\frac{3x^2-1}{\sqrt{x^2+x-1}}dx$ Integrate $\int\frac{3x^2-1}{\sqrt{x^2+x-1}}dx$
I solved this integral by euler substitution by replacing
$\sqrt{x^2+x-1}=x+t$
but it's not allowed by the problem.
p.s Is there any other method to solve with?
Thank you in advance :)
 [/INST] Note
\begin{align}
\int \sqrt{x^2+x-1} \>dx
&\overset{IBP}=\frac12 x \sqrt{x^2+x-1} +\frac14\int \frac {x-2}{\sqrt{x^2+x-1}}dx\\
\end{align}
Then
\begin{align}
&\int\frac{3x^2-1}{\sqrt{x^2+x-1}}\>dx\\
=& 3 \int \sqrt{x^2+x-1} dx - \int \frac {3x-2}{\sqrt{x^2+x-1}}dx\\
=& \frac32 x \sqrt{x^2+x-1} -\frac98 \int \frac {2x+1}{\sqrt{x^2+x-1}}dx + \frac{13}8 \int \frac {1}{\sqrt{x^2+x-1}}dx \\
 =& \frac32 x \sqrt{x^2+x-1} -\frac94 \sqrt{x^2+x-1}
+ \frac{13}8 \cosh^{-1}\frac{2x+1}{\sqrt5}+C
\end{align}
</s>