[CHM 371] computational exercises 371 calculator question
Andrew J. Pounds
pounds_aj at mercer.edu
Sat Aug 25 18:42:08 EDT 2012
Ahh, yes. The nasty beastie...
In this problem you are numerically approximating the integral of a
gaussian function only along the positive X-axis. The function starts
at 1 on the y axis and asymptotically approaches zero as X goes to
infinity. The value of the integral MUST be positive. The problem is
that if you put in 1e99 for the upper limit of integration the
calculator may actually try to evaluate that -- which will result in an
overflow.
For problems like this I recommend putting a smaller value in for the
upper limit (say 10) and get the calculator to give you a result. Then
put in a bigger number for the upper limit of integration (say 20) and
see how much the answer changes. Repeat this process until you get a
consistent value.
This problem introduces you to some interesting numerical mathematics
that we will see again and again. There is a limit to what you
calculator can actually do. If, as you saw in the case, the integral
does no longer changes as you enter larger upper limits of integration,
then you have reached the limit of your calculators precision.
As an aside, this is a function you will see a lot in chemical physics.
In fact, you will find the exact value of this integral in the appendix
of your P-Chem book as well as your Steiner math book -- sqrt(pi)/2.
On 08/25/2012 01:58 PM, wrote:
> Thanks! That worked. But I do have one more question.
>
> How do you input an integral with infinity like part three on problem
> b. I looked it up online and it said to use 1E99, but that just got me
> an error:overflow.
> ------------------------------------------------------------------------
> *From:* Andrew J. Pounds [pounds_aj at mercer.edu]
> *Sent:* Friday, August 24, 2012 6:28 PM
> *To:* chm371 at theochem.mercer.edu
> *Subject:* Re: computational exercises 371 calculator question
>
> On 08/24/2012 05:41 PM,wrote:
>> I was working on the computational exercises from 371. On the first
>> one (the one we did in class), I can't get my solver on my ti83 to
>> work. It seems like my x is already set at some certain value and not
>> a variable because I get the same answer no matter what I put in. Do
>> you know how to take that value away for x so that it can be used as
>> a variable?
>
> Excellent question. I'll explain the details behind what I am about
> to tell you next week, but here is what you need to do to move on
> right now.
>
> After you enter the equation in the solver, move down and set the
> bounds. If I remember correctly, the bounds for this problem are
> between zero and one. So on the bounds line you enter
>
> {0,1}
>
> Now, your X value, which is an initial guess at the solution, needs to
> be between those two boundaries. In this case I would enter 0.5 for X
> and then try to solve.
>
> Let me know if you have other questions!
>
>
>
> --
> Andrew J. Pounds, Ph.D. (pounds at theochem.mercer.edu)
> Associate Professor of Chemistry and Computer Science
> Mercer University, Macon, GA 31207 (478) 301-5627
--
Andrew J. Pounds, Ph.D. (pounds at theochem.mercer.edu)
Associate Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/chm371/attachments/20120825/49b34895/attachment.html>
More information about the chm371
mailing list