class36-37a - PHYS 5900 Class 36-37...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
PHYS 5900 Class 36-37 (12/02/2009,12/04/2009Fri) Zi-Wei Lin Hw6 is due now; it will be graded by Monday 12/07/2009. Final: will be from 11:00am to 1:30pm on Friday 12/11/2009; open-book, and you can bring notes (but not your laptop); 150 points, 30% of your total points for the course. Example: In[1]:= $ContextPath = 8 "PacletManager`", "WebServices`", "Global`", "System`" < Out[1]= 8 PacletManager`, WebServices`, Global`, System` < In[2]:= BeginPackage @ "test`", 8 "PhysicalConstants` ", "Units`" <D Out[2]= test` In[3]:= Convert @ 24.5872 Meter ± Second, Mile ± Hour D Out[3]= 55. Mile Hour In[4]:= SpeedOfLight Out[4]= 299 792 458 Meter Second In[5]:= 8 $Context, $ContextPath < Out[5]= 8 test`, 8 test`, PhysicalConstants` , Units`, System` << In the above, packages , as the 2nd argument of BeginPackage[ ] , have been loaded. These packages have also been included in the context search path $ContextPath . In[6]:= Begin @ "mycontext`" D Out[6]= mycontext` In[7]:= 8 $Context, $ContextPath < Out[7]= 8 mycontext`, 8 test`, PhysicalConstants` , Units`, System` <<
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
In the above, Begin["mycontext`"] sets the current context to mycontext` without affecting $ContextPath. In[8]:= End @D Out[8]= mycontext` In[9]:= 8 $Context, $ContextPath < Out[9]= 8 test`, 8 test`, PhysicalConstants` , Units`, System` << In the above, End[ ] restores the current context to the previous one ( test` ) without affecting $ContextPath. In[10]:= EndPackage @D In[11]:= 8 $Context, $ContextPath < Out[11]= 8 Global`, 8 test`, PhysicalConstants` , Units`, PacletManager`, WebServices`, Global`, System` << 2 class36-37a.nb
Background image of page 2
Example: write a package to provide the normalized energy eigenfunctions and eigenvalues (i.e. eigenenergies) of the hydrogen atom; allow the eigenvalues to be expressed in the unit of ElectronVolt, Erg or Joule. ± Physics of the Problem The normalized hydrogen energy eigenfunctions are given by Ψ nlm H r, Θ , j L = R nl H r L * Y lm H Θ , j L a product of a radial function and spherical harmonics. Here n = 1, 2, 3, . ..; l = 0, 1, ..., H n - 1 L ; m = - l , - l + 1, ..., l - 1, l . The radial function is R nl H r L = 2 a - 3 ± 2 n 2 H n - l - 1 L ! @H n + l L ! D 3 F nl 2 r na , with a being the Bohr radius : a = 4 ΠΕ 0 ± 2 m e e 2 » 0.53 Angströms , and F nl H x L = x l e - x ± 2 L n - l - 1 2 l + 1 H x L , L p q H x L = H p + q L ! * LaguerreL @ p, q, x D class36-37a.nb 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The eigenenergies are E n = - R y n 2 , where R y H the Rydberg constant L = m e e 4 32 Π 2 Ε 0 2 ± 2 = H ± c L 2 2 I m e c 2 M a 2 » 13.6 eV. Definition of the Package
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9

class36-37a - PHYS 5900 Class 36-37...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online