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.

The following example is very artificial and therefore not quite satisfying, but it answers you question anyway.
Consider . You can check that , so that you may compute using 3 integrations by parts, which will end up with the initial integral.
In fact, if you know complex numbers, is the real part of where is a cubic root of the unity: , so what I claimed about is a simple consequence of this property.

Of course however, since , two integrations by parts would suffice if you split into and . 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.