Message Boards Message Boards

0
|
5281 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Computing Triple Integral with Variable Limits of Integration

Posted 10 years ago
I'm trying to calculate the probability of finding an electron in a cubic infinite well with a triple integral as follows:
Integrate[((2/L)^(3/2)
    Sin[(2 pi x)/L] Sin[(pi y)/L] Sin[(pi z)/L])^2, {x, 0, L}, {y,
  L/3, 2 L/3}, {z, 0, L}]
For some reason, I'm getting this error:

Integrate::ilim: "Invalid integration variable or limit(s) in {(2\L)/3,L/3,(2\L)/3}"

According to my sources, I should be getting a numerical answer of 0.609. Do I have to do something special to the variable 'L'?

Thank you in advance!
POSTED BY: Julius O
4 Replies
Please disregard, I cleared all my notebook settings and now it's properly evaluating the integral. Thank you!
POSTED BY: Julius O
Udo, this is really weird!

I copy/pasted your code verbatim into an empty notebook, and it still gives me the invalid limit error message:



Not sure what's going on? I pasted into W|A and it evaluated perfectly. Now I'm wondering if Mathematica's been corrupted. I even retyped "Pi" and confirmed the autocomplete suggestion.
POSTED BY: Julius O
Mea culpa! Completely forgot that Pi was a reserved word and had to be capitalized. Wish I got a better error message than saying that my bounds were invalid, might have to submit feedback on that. Thank you Udo!
POSTED BY: Julius O
Use Pi, pi is unknown to Mathematica
In[1]:= Integrate[((2/L)^(3/2) Sin[(2 Pi x)/L] Sin[(Pi y)/L] Sin[(Pi z)/L])^2, {x, 0, L}, {y, L/3, 2 L/3}, {z, 0, L}]
Out[1]= 1/3 + Sqrt[3]/(2 \[Pi])

In[2]:= N[%]
Out[2]= 0.608998
POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract