# Homework Help: Integration by Parts with sin and ln(x)

1. Feb 17, 2010

### Ayesh

1. The problem statement, all variables and given/known data

The method to use to integrate the function is up to us.
The choices are:
1) U-substitution
2)Integration by Parts
3)Trigonometric integrals
4)Trigonometric substitution
5)Partial fraction

2. Relevant equations

According to me, the best way to do it is to use Integration by Parts.

Here is the function:

$$\int$$sin(ln(x))/x2

3. The attempt at a solution

u=sin(lnx)
du=cos(lnx)/x dx
dv=1/x2 dx
v=-1/x

$$\int$$sin(lnx)/x2 dx = -sin(lnx)/x - $$\int$$ -cos(lnx)/x2 dx
= -sin(lnx)/x + $$\int$$ cos(lnx)/x2 dx
= -sin(lnx)/x + (-cos(lnx)/x2 - $$\int$$ sin(lnx)/x dx

2 $$\int$$ sin(lnx)/x2 dx = -sin(lnx)/x - cos(lnx)/x2 dx

$$\int$$sin(lnx)/x2dx = 1/2(-sin(lnx)/x - cos(lnx)/x2)

According to Maple, the answer is 1/2((-2sin(lnx) - 2cos(1/2ln(x))2 + 1 + 2sin(1/2ln(x))cos(1/2lnx))/x

Last edited: Feb 17, 2010
2. Feb 17, 2010

### tiny-tim

Hi Ayesh!

(have an integral: ∫ and try using the X2 tag just above the Reply box )
No, almost but not quite …

(and I'm afraid what you've written is too difficult to read for me to work out where the error was
oh, this is just Maple going beserk

if you simplify that, you'll get something much more sensible

3. Feb 17, 2010

### Ayesh

The answer Maple gave me is simplified.

4. Feb 17, 2010

### tiny-tim

really?? simplify it some more!

5. Feb 17, 2010

### Ayesh

This is the most simplified answer Maple gives me :

-(1/2)*(2sin(lnx)+2cos((1/2)ln(x))2-1-2sin((1/2)lnx)*cos((1/2)lnx))/x

6. Feb 17, 2010

### tiny-tim

You're human! Maple isn't!

simplify it some more!

(alternatively, try the integration by parts again, only more neatly, and see if it comes out right this time )

7. Feb 17, 2010

### Ayesh

I've redone the integration by hand and my answer now is:

$$\int$$sin(lnx)/x2 = 1/2 (-sin(lnx) + cos(lnx)/x)

8. Feb 17, 2010

### vela

Staff Emeritus
Closer, but you flipped a sign somewhere.

9. Feb 18, 2010

### tiny-tim

Hi Ayesh!

(what happened to that ∫ i gave you? )
I strongly agree.

Getting the sign wrong in integration by parts is notoriously easy,

so it's essential to check the answer by differentiating it (especially if the question has obviously been designed to put in as many minuses as possible!)

10. Feb 18, 2010

### Ayesh

I found my mistake, thank you!

Differentiating was a good idea :)

11. Feb 18, 2010

### Count Iblis

You could also have substituted x = exp(u) and then have done the partial integration. In that case there is an alternative method to partial integration that is not on your list:

6) Differentiation w.r.t. to a parameter.

If 6) works that's usually a lot easier than partial integration.