Help with a trig-substitution integral I'm in the chapter of trigonometric substitution for integrating different functions. I'm having a bit of trouble even starting this homework question:
$$\int \frac{(x^2+3x+4)\,dx} {\sqrt{x^2-4x}}$$
 A: A start: We have $x^2-4x=(x-2)^2-4$. If you want to use a trigonometric substitution, the natural one is $x-2=2\sec t$. 
We unfortunately end up needing to integrate powers of $\sec t$, a messy business. Nicer is the hyperbolic function substitution $x-2=2\cosh t$. 
A: Also note that $x^{2}+3x+4 = (x-2)^{2} + 7x = 4\sec^{2}(t) + 7 \cdot (2\sec(t)+2)$
A: 
Make the substitution suggested by completing the square, $\sqrt{x^2-4x}=\sqrt{(x-2)^2-4}$, that is, $y=x-2$. Then, by the easily constructed triangle, we have
\begin{align}
\frac{y}{2}
 & = \sec\theta\\
\frac{\sqrt{y^2-4}}{2}
 & = \tan\theta\\
x^2+3x+4
 & =(y+2)^2+3(y+2)+4\\
 & = y^2+7y+14\\
\frac{dy}{2}
 & = \sec\theta\tan\theta\ d\theta. 
\end{align}
The integral becomes 
\begin{align}
\int \frac{(x^2+3x+4)} {\sqrt{x^2-4x}}dx
 & = \int\frac{y^2+7y+14}{\sqrt{y^2-4}}dy\\
 & = \int\frac{4\sec^2\theta+14\sec\theta+14}{2\tan\theta}2\sec\theta\tan\theta\ d\theta\\
 & = \int4\sec^3\theta+14\sec^2\theta+14\sec\theta\ d\theta.
\end{align}
Andre Nicolas suggests in another response that the powers of secant are unsavory, and that a hyperbolic trig sub would be more apt. (Claude Leibovici explores this.) 
(I vaguely recall methods for the $\sec^3\theta$ integrand in Stewart's Calculus. The $\sec\theta$ is in most trig integral lists, and perhaps the $\sec^2\theta$ is amenable to some fortuitous trig identity.) 
Here are some resources on those: 
http://en.wikipedia.org/wiki/List_of_integrals_of_trigonometric_functions#Integrands_involving_only_secant
http://en.wikipedia.org/wiki/Integral_of_the_secant_function
http://en.wikipedia.org/wiki/Integral_of_secant_cubed
A: In order to make a proper substitution in integral calculus, the function that you are substituting must have a unique inverse function. However, there is such a case where the the derivative is present and you can make what I refer to as a "virtual substitution". This is not exactly the case here, we have to do other algebraic manipulations. Trigonometric functions such as sine, cosine and their variants have infinitely many inverse functions; inverse trigonometric functions ( i.e. arcsine, arccosine, etc...) have a unique inverse function, thus are fine. For example, if I made the substitution $y = \sin x$ ( where $-1≤y≤1$) , then $ x = (-1)^n \cdot \arcsin y + n\pi$ ($n \in \mathbb  Z$): this does not work, without bound. If anyone disagrees with my statement, please prove that the substitution is proper. Also, in my opinion, turning a rational/algebraic function into a transcendental function is ridiculous. There are very elementary ways to approach this integral; a good book to read on many of these methods is Calculus Made Easy by Silvanus P. Thompson. 
A: May be I was too fast even if the answer is almost correct.
First make $x = 2 (\cosh(y) + 1)$. The integrand then becomes
$(\pm) 2 (8 + 7 \cosh(y) + \cosh(2 y))$
So, the integral is $(\pm) (16 y + 14 \sinh(y) + \sinh(2 y))$
If you replace $y$, you arrive to my formula (the $\pm$ was missing) 
