Integration by parts question,, possibly a circular example I am having trouble figuring this out.
$$\int_0^{1/3} \sec^3(\pi x) \, dx$$
We are currently doing integration by parts,, so I set $g(x)=\sec^3(\pi x)$ and $f'(x)=1$.
I arrived at: $$x\sec^3(\pi x) - 3\pi \int x\tan(\pi x)\sec^3(\pi x) dx$$
I am lost here, I tried u substitution for $\tan(\pi x)$ so that I can get rid of $\sec^2(\pi x)$ but that doesnt help. 
 A: Part of the problem is that your first integration by parts is a poor choice. Let $u=\sec\pi x$ and $dv=\sec^2\pi x \, dx$, so that $du=\pi\sec\pi x\tan\pi x \, dx$ and $v=\frac1{\pi}\tan\pi x$. Now your (indefinite) integral $-$ call it $I$ $-$ is
$$I=\frac1{\pi}\sec\pi x\tan\pi x-\int\sec\pi x\tan^2\pi x \, dx\;.\tag{1}$$
Apply a trig identity to write that last integral as
$$\int\sec\pi x\left(\sec^2\pi x-1\right)dx=I-\int\sec\pi x \, dx$$
and substitute into $(1)$ to get
$$I=\frac1{\pi}\sec\pi x\tan\pi x-I+\int\sec\pi x \, dx\;.\tag{2}$$
Now solve $(2)$ for $I$; the remaining integral is one that you should know.
A: This is a recurring question.  See this article: http://en.wikipedia.org/wiki/Integral_of_secant_cubed
A: It can be shown that (as pointed out in the comment of Michael Hardy) $$\int \sec^3 \theta d\theta=\frac{\sec\theta \tan\theta}{2}+\frac{\ln|\sec\theta+\tan\theta|}{2} +c.$$
Going back to your integral, we let  $\theta=\pi x$ and we get
$$F(x)=\int \sec^3(\pi x) \, dx =\frac{\sec(\pi x) \tan(\pi x)} {2\pi}+\frac{\ln|\sec(\pi x) +\tan(\pi x)|}{2\pi}+c.$$Thus,
$$\int_0^{1/3} \sec^3(\pi x) \, dx=F(1/3)-F(0)$$ 
and we are done.
