Math Help - integral (ln(x))^2

1. integral (ln(x))^2

Man I'm having problems.
Question is
$\int_1^2 {(\ln (x))^2 } dx \\$

I get this
$= \int_1^2 {\ln (x)\ln (x)dx} \\$
$= \frac{1}{x}\ln (x) - \int {\frac{1}{x}} \times \frac{1}{x}dx \\$
$= \frac{1}{x}\ln (x) - \int {x^{ - 2} } dx \\$
$= \frac{1}{x}\ln (x) - [ - x^{ - 1} ] \\$
$= \frac{1}{x}\ln (x) + \frac{1}{x} \\$
$= [\frac{1}{2}\ln (2) + \frac{1}{2}] - [\frac{1}{1}\ln (1) + \frac{1}{1}] \\$
$= \frac{1}{2}\ln (2) - \frac{1}{2} \\
$

But apparently it should be
$= 2(\ln (2))^2 - 4\ln (2) + 2
$

2. Originally Posted by Craka
Man I'm having problems.
Question is
$\int_1^2 {(\ln (x))^2 } dx \\$

I get this
$= \int_1^2 {\ln (x)\ln (x)dx} \\$
$= \frac{1}{x}\ln (x) - \int {\frac{1}{x}} \times \frac{1}{x}dx \\$
$= \frac{1}{x}\ln (x) - \int {x^{ - 2} } dx \\$
$= \frac{1}{x}\ln (x) - [ - x^{ - 1} ] \\$
$= \frac{1}{x}\ln (x) + \frac{1}{x} \\$
$= [\frac{1}{2}\ln (2) + \frac{1}{2}] - [\frac{1}{1}\ln (1) + \frac{1}{1}] \\$
$= \frac{1}{2}\ln (2) - \frac{1}{2} \\
$

But apparently it should be
$= 2(\ln (2))^2 - 4\ln (2) + 2
$
You have not applied the integration by parts forumla correctly. Go back and check what it says.

There are many ways of doing it. The best way for you I think is to make the substitution $u = \ln x$. Then the integral becomes $\int_{0}^{\ln 2} u^2 \, e^u \, du$. Now use integration by parts - twice.

3. Originally Posted by Craka
Man I'm having problems.
Question is
$\int_1^2 {(\ln (x))^2 } dx \\$

I get this
$= \int_1^2 {\ln (x)\ln (x)dx} \\$
$= \frac{1}{x}\ln (x) - \int {\frac{1}{x}} \times \frac{1}{x}dx \\$
$= \frac{1}{x}\ln (x) - \int {x^{ - 2} } dx \\$
$= \frac{1}{x}\ln (x) - [ - x^{ - 1} ] \\$
$= \frac{1}{x}\ln (x) + \frac{1}{x} \\$
$= [\frac{1}{2}\ln (2) + \frac{1}{2}] - [\frac{1}{1}\ln (1) + \frac{1}{1}] \\$
$= \frac{1}{2}\ln (2) - \frac{1}{2} \\
$

But apparently it should be
$= 2(\ln (2))^2 - 4\ln (2) + 2
$
See here

personally, i like my way the best (this is usually not the case)

...oh, i didn't show the full working... oh well, i gave a small outline. try it. Mr F's method is there too

There should be another thread around where this was done completely...you can do a search if you want

4. Originally Posted by Craka
Man I'm having problems.
Question is
$\int_1^2 {(\ln (x))^2 } dx \\$

I get this
$= \int_1^2 {\ln (x)\ln (x)dx} \\$
$= \frac{1}{x}\ln (x) - \int {\frac{1}{x}} \times \frac{1}{x}dx \\$
$= \frac{1}{x}\ln (x) - \int {x^{ - 2} } dx \\$
$= \frac{1}{x}\ln (x) - [ - x^{ - 1} ] \\$
$= \frac{1}{x}\ln (x) + \frac{1}{x} \\$
$= [\frac{1}{2}\ln (2) + \frac{1}{2}] - [\frac{1}{1}\ln (1) + \frac{1}{1}] \\$
$= \frac{1}{2}\ln (2) - \frac{1}{2} \\
$

But apparently it should be
$= 2(\ln (2))^2 - 4\ln (2) + 2
$
$\int\ln^2(x)dx$

Let $\ln(x)=u\Rightarrow{x=e^u}$

So $dx=e^u$

Giving

$\int{e^uu^2du}$

Parts gives

$\int{e^uu^2du}=u^2e^u-2\int{e^u\cdot{u}du}=u^2e^u-2\bigg[e^uu-\int{e^u}\bigg]=u^2e^u-2ue^u+2e^u=$ $(u^2-2u+2)e^u$

Now back subbing we get

$\int\ln^2(x)=(\ln^2(x)-2\ln(x)+2)x+C$

EDIT: Sorry Mr. F! Didn't even see that you had that there! Well, at least the poster sees what you meant

5. Originally Posted by Craka
Man I'm having problems.
Question is
$\int_1^2 {(\ln (x))^2 } dx \\$

I get this
$= \int_1^2 {\ln (x)\ln (x)dx} \\$
$= \frac{1}{x}\ln (x) - \int {\frac{1}{x}} \times \frac{1}{x}dx \\$
$= \frac{1}{x}\ln (x) - \int {x^{ - 2} } dx \\$
$= \frac{1}{x}\ln (x) - [ - x^{ - 1} ] \\$
$= \frac{1}{x}\ln (x) + \frac{1}{x} \\$
$= [\frac{1}{2}\ln (2) + \frac{1}{2}] - [\frac{1}{1}\ln (1) + \frac{1}{1}] \\$
$= \frac{1}{2}\ln (2) - \frac{1}{2} \\
$

But apparently it should be
$= 2(\ln (2))^2 - 4\ln (2) + 2
$
But if you were to do it your way

let $u=\ln(x)$
and math $dv=\ln(x)dx$
So $du=\frac{dx}{x}$
and $v=\int\ln(x)dx=x\ln(x)-x=x(\ln(x)-1)$

Giving us

$\int\ln^2(x)=\ln(x)x(\ln(x)-1)-\int\frac{x(\ln(x)-1)}{x}dx$

So for the second integral we get

$\int\frac{x(\ln(x)-1)}{x}dx=\int\ln(x)-1dx=x(\ln(x)-2)$

Giving us a grand finale of

$\int\ln^2(x)=x\ln(x)(\ln(x)-1)-x(\ln(x)-2)=x(\ln^2(x)-2\ln(x)+2)+C$

An easier method that might have been mentioned elsewhere would be as if you were just calculating $\int\ln(x)dx$

So for this case let

$u=\ln^2(x)$
and $dv=dx$
so then
$du=\frac{2\ln(x)}{x}dx$
and $v=x$

So once again using our parts formula we get

$\int\ln^2(x)dx=\ln^2(x)\cdot{x}-\int\frac{2\ln(x)\cdot{x}}{x}$

Now for the second one we apply parts again and once again let dv=dx to get

$\int\ln^2(x)dx=\ln^2(x)\cdot{x}-2(\ln(x)\cdot{x}-x)=(\ln^2(x)-2\ln(x)+2)x+C$

as you can see your method is by far the messiest, there are very few integrals where you have $\int{u^2(x)dx}$

and let $u=u(x)$ and $dv=u(x)$

There are some I think, but they are uncommon