How to set interesting integrals I'm teaching integration by substitution and integration by parts and I'd like to make some interesting problems. I'd like to be able to use the chain rule and the product rule to reverse engineer some nice problems.

I would really like a non-obvious substitution to lead to an integral that needs to be integrated by parts, or an integral by parts that leads to an integral needing a substitution.

Like I said: I would like a method to reverse engineer. Any ideas?

Edit: I could, of course, pick a complicated function and differentiate it. But that would give an even more complicated integrand. I want a nice problem. A nice, compact integrand that - via a cunning substitution - becomes do-able. An Example would be:
$$\int \cos 2x \cdot \ln\left(\cos x \right) \cdot \mathrm{d}x$$
You can use the fact that:
$$
\int f(g(x))g'(x)dx = \int f(t)dt 
$$
with $t=g(x)$

e.g.
$$
f(x)=\dfrac{1}{x^2+a^2} \qquad g(x) = e^{x^2+b} 
$$
gives:
$$
g'(x)= 2xe^{x^2+b}
$$

and a integral of the form:

$$
\int \dfrac{2xe^{x^2+b}}{e^{2(x^2+b)}+a^2}dx
$$
can be integrated with the substitution 
$$
t=e^{x^2+b}
$$

If you want to hide better the substitution you can write:

$$
\int \dfrac{2exe^x}{e^{2(x^2+1)}+\pi^2} dx
$$
You can try taking some complicated derivatives and integrating them to obtain their integral counterparts. For example, try this:

  $ y= \{arctan {In{x^3} + {x^6}sin{4x} + {e^{4x}}\$  


Differentiate and then set it up as an integral. That should keep both you and your students busy for awhile..........lol