Find $\int (\ln x)^n dx$ in the most simplified form. Take care to compact long sums into $\sum$ expressions.
  1. Find $\int xe^x dx.$
  2. Let $a_n=n^2+3^na_{n-1},$ with $a_0=1.$ Give a closed form expression for $a_n$ using sigma notation.

How could you find $\int (\ln x)\ dx?$

How about treating the integrand as $1\cdot \ln x?$

… and using integration by parts.

Why not apply this same technique to the original integral?

Try treating it as a recurrence relation.

… and unravelling it to obtain a $\sum$ expression.

Let $I_n=\int (\ln x)^ndx.$ We can obtain a recursive expression using integration by parts. We treat the integrand as the product $1 \cdot (\ln x)^n$ which gives us $I_n= x \ln^n(x) - \int n\ln^{n-1}(x)\ dx,$ and we get the recurrence relation $I_n = x \ln^n(x) - n I_{n-1}.$ We can expand out some of the terms to establish the pattern: $$ I_n= x \ln^n(x) - xn\ln^{n-1}(x) + xn(n-1)\ln^{n-2}(x)-\cdots $$

With each term, the sign flips, the exponent on the logarithm decreases by $1,$ and each term collects factors decreasing from $n.$ Expressing this as a $\Sigma$ expression, we get $I_n=\sum_{i=0}^n (-1)^i\frac{n!}{(n-i)!}x\ln^{n-i}(x).$