Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Machine sized real number error' topicStudent Support Forum > General > Archives > "Machine sized real number error"

Next Comment >Help | Reply To Topic
Author Comment/Response
Sunny Wong
02/26/04 8:46pm

I was trying to plot the wave function of the molecular orbital for a hydrogen molecule (assuming that the MO wave function is a linear combination of the individual wave functions of a H atom), but what i've been getting is:

Z = 1
R1s[r_] := 2*(Z/(0.529*10^-10\))^(3/2)*
Exp[-((Z*r/(0.529*10^-10)]
R1s2[r_] := 2*((Z/
0.529*10^-10))^(3/2)*Exp[-Z(r + 75*10^-10)/(0.529*10^-10)]

MOhydrogen[r_] := R1s[r] + R2s[r]

Plot[MOhydrogen[r], {r, 0, 100*10^-12}]

and out came:

Plot::plnr : MOhydrogen[r] is not a machine-size real number at r = 4.166666666666667`*^-18

Plot::plnr: MOhydrogen[r] is not a machine-size real number at r = 4.0566991572915795`*^-12.

and so on and so forth. The interesting thing is, the plot function worked just fine when i'm just plotting R1s[r] or R1s2[r] separately

can anyone tell me what's going on?

URL: ,

Subject (listing for 'Machine sized real number error')
Author Date Posted
Machine sized real number error Sunny Wong 02/26/04 8:46pm
Re: Machine sized real number error Forum Modera... 02/27/04 3:31pm
Re: Machine sized real number error Timothy Choi 02/28/04 11:44am
Next Comment >Help | Reply To Topic