0
|
5578 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# Computing Triple Integral with Variable Limits of Integration

Posted 11 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!
4 Replies
Sort By:
Posted 11 years ago
 Please disregard, I cleared all my notebook settings and now it's properly evaluating the integral. Thank you!
Posted 11 years ago
 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 11 years ago
 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 11 years ago
 Use Pi, pi is unknown to MathematicaIn[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