## expected values in infinite square well

Ok...this must sound stupid, because i didn't found answer on the web and on my books...but i am having trouble with the infinite square well.
I want to calculate <x>.
V(x)=0 for 0<=x<=a
$<x>=\frac{2}{a}\int^{a}_{0} x \sin^2(\frac{n\pi}{a}x)dx$
Doing integration by parts i got to:
$\frac{2}{a}\left[\frac{a^2}{2n}-\int^a_0\frac{a}{2n}dx\right]=0$
What i am doing wrong?
Thank you
 PhysOrg.com physics news on PhysOrg.com >> Is there an invisible tug-of-war behind bad hearts and power outages?>> Penetrating the quantum nature of magnetism>> Rethinking the universe: Groundbreaking theory proposed in 1997 suggests a 'multiverse'
 Mentor I would expect an error in your integration, as the first expression is not zero and the following one is.

 Quote by Aikon $=\frac{2}{a}\int^{a}_{0} x \sin^2(\frac{n\pi}{a}x)dx$

set
$u=\frac{n\pi}{a}x$

look up
$\int u \sin^2(u)du$
in a Table of Integrals to find
$\frac{u^2}{4}-\frac{u\sin(2u)}{4}-\frac{cos(2u)}{8}$

## expected values in infinite square well

 Quote by tadchem set $u=\frac{n\pi}{a}x$ look up $\int u \sin^2(u)du$ in a Table of Integrals to find $\frac{u^2}{4}-\frac{u\sin(2u)}{4}-\frac{cos(2u)}{8}$
Yeah, i got it...it is easier to use table of integrals.
it gives the expected $<x>=\frac{a}{2}$ for any value of n.
thanks

 Tags infinite square well, quantam mechanics

 Similar discussions for: expected values in infinite square well Thread Forum Replies Precalculus Mathematics Homework 5 Precalculus Mathematics Homework 4 Calculus & Beyond Homework 3 Calculus & Beyond Homework 2 Introductory Physics Homework 2