Expectation value of momentum times position particles in a box

1. Dec 16, 2012

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

What is the expectation value of <p*x> aka the momentum times the position operator, for a particle in a box.

2. Relevant equations

Psi(x) = root(2/l) sin (n∏x/l)
P= -ih(bar)d/dx
X=x

3. The attempt at a solution
All integrals are from 0 to L
I'm typing this on a playbook so I won't show all my steps.
-2ih/l ∫sin(n∏x/l)d/dx(xsin(nx/l)
Which I got to be : sinx(sinx) + xcosx. My teacher however never gave us the integral of xcosx from 0 to l. So how can I solve this?

2. Dec 16, 2012

Dick

The integral of x*cos(x)dx is equal to the integral of x*d(sin(x)). Use integration by parts.