Integrate ${\sec 4x}$ How do I go about doing this? I try doing it by parts, but it seems to work out wrong:
$\eqalign{
  & \int {\sec 4xdx}   \cr 
  & u = \sec 4x  \cr 
  & {{du} \over {dx}} = 4\sec 4x\tan 4x  \cr 
  & {{dv} \over {dx}} = 1  \cr 
  & v = x  \cr 
  & \int {\sec 4xdx}  = x\sec 4x - \int {4x\sec 4x\tan 4xdx}   \cr 
  & \int {4x\sec 4x\tan 4xdx} :  \cr 
  & u = 4x  \cr 
  & {{du} \over {dx}} = 4  \cr 
  & {{dv} \over {dx}} = \sec 4x\tan 4x  \cr 
  & v = {1 \over 4}\sec x  \cr 
  & \int {4x\sec 4x\tan 4xdx}  = x\sec 4x - \int {\sec 4x} dx  \cr 
  & \int {\sec 4xdx}  = x\sec 4x - \left( {x\sec 4x - \int {\sec 4xdx} } \right) \cr} $

I don't know where to go from here, everything looks like it equals 0, where have I went wrong?
Thank you!
EDIT: Is there an easier way to do this?
 A: Let $4x = t$, i.e., $4dx = dt$.
$$I=\int \sec(4x) dx = \dfrac14\int \sec(t) dt = \dfrac14\int \dfrac{dt}{\cos(t)} = \dfrac14 \int \dfrac{\cos(t) dt}{\cos^2(t)} = \dfrac14 \int \dfrac{\cos(t) dt}{1-\sin^2(t)}$$
Now let $\sin(t) = y$, to get $\cos(t) dt = dy$. Hence, we get that
$$I = \dfrac14 \int \dfrac{dy}{1-y^2} = \dfrac18\left(\int\dfrac{dy}{1+y} + \int\dfrac{dy}{1-y}\right) = \dfrac18\left(\log(\vert 1+ y \vert) - \log(\vert 1 - y \vert)\right)+\text{const}$$
This gives us
$$I = \dfrac18 \log \left(\left\vert \dfrac{1+y}{1-y}\right\vert \right) + \text{const} = \dfrac18 \log \left(\left \vert \dfrac{1+\sin(t)}{1-\sin(t)}\right \vert\right)+\text{const} = \color{red}{\dfrac18 \log \left(\left \vert \dfrac{1+\sin(4x)}{1-\sin(4x)}\right \vert\right)+\text{const}}$$
EDIT
You can simplify it further as much as you like.
\begin{align}
\dfrac{1+\sin(4x)}{1-\sin(4x)} & = \dfrac{1+\sin(4x)}{1-\sin(4x)} \times \dfrac{1+\sin(4x)}{1+\sin(4x)} = \dfrac{(1+\sin(4x))^2}{1-\sin^2(4x)}\\
& = \dfrac{(1+\sin(4x))^2}{\cos^2(4x)} = (\sec(4x) + \tan(4x))^2
\end{align}
Hence,
$$\boxed{\color{blue}{I = \dfrac{\log(\vert \sec(4x) + \tan(4x)\vert)}4 + \text{const}}}$$
A: Use two substitutions. The first substitution transforms the integrand into $\sec \theta$, whose evaluation was asked here. The second substitution is the Weirstrass substitution. (See comment below). In the present case the second integral becomes an easy table integral:
$$\begin{eqnarray*}
\int \sec 4x\,dx &=&\frac{1}{4}\int \sec \theta \,d\theta ,\qquad \theta =4x
\\
&=&\frac{1}{4}\int \frac{1}{\frac{1-t^{2}}{1+t^{2}}}\frac{2}{1+t^{2}}
\,dt,\qquad t=\tan \frac{\theta }{2} \\
&=&\frac{1}{2}\int \frac{1}{1-t^{2}}dt=\frac{1}{2}\operatorname{arctanh}t+C \\
&=&\frac{1}{2}\operatorname{arctanh}\left( \tan \frac{\theta }{2}\right) +C \\
&=&\frac{1}{2}\operatorname{arctanh}\left( \tan 2x\right) +C.
\end{eqnarray*}$$
This integral can be rewritten as
$$\frac{1}{2}\operatorname{arctanh}\left( \tan 2x\right) =\frac{1}{4}\ln \left\vert
\tan 2x+1\right\vert -\frac{1}{4}\ln \left\vert 1-\tan 2x\right\vert .$$

Comment: The Weierstrass substitution is a universal standard substitution to evaluate an integral of a rational fraction in $\sin \theta,\cos \theta$, i.e. a rational fraction of the form 
$$R(\sin \theta,\cos \theta)=\frac{P(\sin \theta,\cos \theta)}{Q(\sin \theta,\cos \theta)},$$
where $P,Q$  are polynomials in $\sin \theta,\cos \theta$ 
$$
\begin{equation*}
\tan \frac{\theta }{2}=t,\qquad\theta =2\arctan t,\qquad d\theta =\frac{2}{1+t^{2}}dt
\end{equation*},
$$
which converts the integrand into a rational function in $t$. We know from trigonometry (see this answer) that 
$$\cos \theta =\frac{1-\tan ^{2}\frac{\theta }{2}}{1+\tan ^{2}\frac{
\theta}{2}}=\frac{1-t^2}{1+t^2},\qquad \sin \theta =\frac{2\tan \frac{\theta }{2}}{1+\tan ^{2}
\frac{\theta }{2}}=\frac{2t}{1+t^2}.$$
A: First try $u = 4x$. Then multiply numerator and denominator by $(\tan u + \sec u)$
A: The standard trick is $$\sec(4x)=\frac{(\sec 4x)(\sec 4x +\tan 4x )}{\sec 4x + \tan 4x}=\frac{\sec^2 4x+\sec 4x \tan 4x}{\sec 4x + \tan 4x}$$
Now take $u=\sec 4x + \tan 4x$, we have $du=4 \sec 4x \tan 4x + 4 \sec^2 4x$, so $\sec 4x dx=\frac{du}{4u}$.
