1. Integration by parts problem?!?!

I know how to do integration by parts. ∫ u dv= uv-∫ v du

as you may know for some functions like ∫ e^x cosx dx when you use integration by parts it repeats it's self. if you don't know what I mean, see the 3rd example on this page http://www.math.hmc.edu/calculus/tutoria...

what I need to know is a function that repeats when you use itegration by parts like ∫ e^x cosx dx
but instead of 2 steps it has 3.

if anyone knows of one let me know

2. The following example is very artificial and therefore not quite satisfying, but it answers you question anyway.
Consider $f(x)=e^{-\frac{x}{2}}\cos\left(\frac{\sqrt{3}}{2}x\right)$. You can check that $f'''(x)=f(x)$, so that you may compute $\int f(x)e^x\,dx$ using 3 integrations by parts, which will end up with the initial integral.
In fact, if you know complex numbers, $f(x)$ is the real part of $e^{jx}$ where $j=e^{\frac{2i\pi}{3}}=-\frac{1}{2}+i\frac{\sqrt{3}}{2}$ is a cubic root of the unity: $j^3=1$, so what I claimed about $f$ is a simple consequence of this property.

Of course however, since $e^xf(x)=e^{x/2}\cos\left(\frac{\sqrt{3}}{2}x\right)$, two integrations by parts would suffice if you split $e^xf(x)$ into $u(x)=e^{x/2}$ and $v'(x)=\cos\left(\frac{\sqrt{3}}{2}x\right)$. I don't know of a genuine example where after 3 integrations by parts, and not possibly less, we recover the initial integral, in a way enabling to find its value.

3. Thanks, Laurent.

If anyone can find a specific example of, as Laurent put it, where after 3 integrations by parts, and not possibly less, we recover the initial integral, that'd be great.