On Oct 19, 1:02 am, Jim Clark <[email protected]> wrote:
> Hi sage supporters,
>
> I am attempting to verify some properties of the quantum mechanics  
> "particle in a box" problem.
> integral() is returning the wrong results for <x> and <x^2>.
> I can't figure out what I might be doing wrong.
>
> To find <x>:
> ----------------------------------------------------------------------
> | Sage Version 4.1.2, Release Date: 2009-10-14                       |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> sage: var('a, n, x')
> (a, n, x)
> sage: assume(a > 0)
> sage: assume(n, 'integer')
> sage: integral(a/2 * x * sin(n*pi*x/a)^2,x,0,a).simplify_full()
> 1/8*a^3
>
> The result should be a/2, which can almost be verified by inspection,
> but I have worked out the integral by hand also, and I am confident that
> a/2 is the correct result.

Dear Jim,

Hmm, I get the same answer as Sage with Wolfram Alpha.  Are you sure
you typed this in correctly?  Don't forget to use u-substitution in
calculating <x> - it looks like maybe something like that might
account for the missing constants.


Hope we can resolve this for you!

- kcrisman
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to