# Tabular and Recursive IBP don't agree

1. Jul 17, 2010

### paulfr

What am I doing wrong here ?

Tabular and Recursive Integration By Parts don't agree for the
Integral of [Ln x]^2 dx

Using Tabular Integration By Parts …………

....................................................1
[ Ln x ]^2 ..................................... x
2 (Ln x)( 1/x )................................x^2 / 2
2 (1/x) (1/x) + 2Ln x (–1/x^2)............x^3 / 6

I get ..............
x(Ln x)^2 – x Ln x + (1/3) x (1 – Ln x) = x(Ln x)^2 – (4/3)x Ln x + (1/3) x

But WolframAlpha gives ..

x(Ln x)^2 – 2x Ln x + 2x)

Thanks for any suggestions.

2. Jul 21, 2010

### paulfr

Bump

Can no one help me out here ?

I do not think there is any reason why this integral
can not be done by Tabular IBParts

Am I wrong or did I make errors in my calculations ?

Thanks

3. Jul 21, 2010

### HallsofIvy

I did not respond to this because I simply could not understand what you are doing. You appear to be integrating $\int (ln(x))^2 dx$ by parts letting $u= (ln(x))^2$ and dv= dx. Then $du= 2(ln(x))/x dx$ and v= x. The integral becomes
$uv- \int v du= x(ln(x))^2- 2\int ln(x)dx$

Now do the second integral by parts, letting u= ln(x) and dv= dx so that du= 1/x and v= x: $\int ln(x) dx= x ln(x)- \int dx= x ln(x)- x+ C$.

Putting those together, $\int (ln(x))^2 dx= x(ln(x))^2- 2x ln(x)+ x+ C$.

I cannot see where you get the $x^2$ or $x^3$ terms from.

4. Jul 21, 2010

### paulfr

Yes exactly right.
What you did is standard recursive IBP.
{the last terms should be 2x + C, not x + C}
That is what I get too.

But I want to do the problem using the Tabular Method of IBP
u = [Ln x]^2 and dv = 1
So the left column is differentiating and
the right column is integrating.
The result disagrees with what you did.

I do not understand why ?

The problem seems to be the 2 / 6 = 1/3 factor.
Removing or ignoring that leads to an answer that agrees with the recursive method.
But how is that 1/3 incorrect ?
It is a direct result of the right column integration.

Does the Tabular Method have a limitation I do not know about ?
I do not see any error in my differentiation or integration.

Thanks again for any suggestions

Last edited: Jul 21, 2010
5. Jul 21, 2010

### Mute

I don't use tabular integration, but from what I read about it on wikipedia it looks to me like your problem is that you stopped at the x^3 term, but according to the tabular integration recipe you're supposed to keep going until there are no possible pairings left. You just arbitrarily stopped at the third iteration. If you did infinitely many iterations presumably you would get the same answer as regular integration by parts.

I don't think the tabular works well for this integral. It seems to work mainly for integrals where the du term eventually vanishes or where the integrand ends up repeating itself.

EDIT: Yes, that's exactly the problem. You can show by repeated integration by parts that

$$\int u v^{(1)}dx = uv + \sum_{n=1}^\infty (-1)^n u^{(n)}v^{(-n)}$$
where u^(n) is the nth derivative of u and v^(-n) is the nth anti-derivative of v. If u^(n) doesn't vanish for some n then this just goes on forever. If at some n=N the integrand is the same as the original integrand up to a constant factor, then

$$\int u v^{(1)}dx = uv + \sum_{n=1}^N (-1)^n u^{(n)}v^{(-n)} + \int u^{(N+1)}v^{(-N)} dx$$
with $\int u^{(N+1)}v^{(-N)} dx = C\int u v^{(1)}dx$,then

$$(1-C)\int u v^{(1)}dx = uv + \sum_{n=1}^N (-1)^n u^{(n)}v^{(-n)}$$
(where C is not 1).

Another possibility is that u^(n+1)v^(-n) is a constant, and the integration ends there after integrating the constant. This is the case for ln(x).

So this is your problem: the tabular method only works if the derivative eventually terminates, which does not happen with this problem, so you can't use it here. In doing the regular integration by parts for this problem we change what u and v are for the second integral, which makes it so we don't get this infinite series of integrations.

Last edited: Jul 21, 2010
6. Jul 21, 2010

### paulfr

Yes it sure does not work well for this one given the chosen u and dv

Maybe that is the limitation of the Tabular Method ??
u must extinguish or dv must repeat for it to work.

I did try u = dv = Ln x and it did not work well either.

7. Jul 21, 2010

### Mute

See my post above yours for my edit which explains the problem with the tabular method.

8. Jul 22, 2010

### paulfr

I did some more net searching and found out what I am doing wrong.
Briefly, the method [when one column does not terminate in zero or repeat] asks you to finish the
last line as an integral of the product of the two columns.
Note that the bottom entry in the integral (right) column is used twice.
Note also this is just what the statement of the problem is on the first line of the tabular form.
The Integral of u dv.

Here are two different solutions I was able to get to work and produce the correct answer.

Let u = dv = Ln x ………….

Ln x ..............Ln x
1 / x ..............x Ln x – x

x (Ln x)^2 – x Ln x – [Integral 1 / x (xLn x – x)]
x (Ln x)^2 – x Ln x – [Integral Ln x – 1)]
x (Ln x)^2 – x Ln x – [ [x Ln x – x ] – [ x] ]
x (Ln x)^2 – 2x Ln x + 2x

-----------------------------------------------------

Alternate Choice of u and dv; u = [ Ln x ]^2 dv = 1

(Ln x)^2..........................................1
2 (Ln x)( 1/x ).................................x
2 (1/x) (1/x) + 2Ln x (–1/x^2)............x^2 / 2

x(Ln x)^2 – x Ln x + [ Integral (1 – Ln x) ]
x(Ln x)^2 – x Ln x + [ (x – (xLn x – x) ]
x(Ln x)^2 – x Ln x + [ (x – xLn x + x ]
x (Ln x)^2 – 2x Ln x + 2x

Last edited: Jul 22, 2010
9. Jul 24, 2010

### paulfr

Here is a clearer description of the Tabular Method ...

http://www.maa.org/pubs/Calc_articles/ma036.pdf [Broken]