Math 3 Winter 2004
Introduction to Calculus
Class Demo for the Limits of Functions
January 7, 2004
We first consider
as
.
> | f := x -> sin(x)/x: |
> | f(0.01); |
> | printf(" x f(x)\n"):
for n from 0 to 5 do x := 1 / 2^n: printf(" %15.10f %15.10f\n", x, f(x)); od: |
x f(x)
1.0000000000 0.8414709848
0.5000000000 0.9588510772
0.2500000000 0.9896158372
0.1250000000 0.9973978672
0.0625000000 0.9993490854
0.0312500000 0.9998372477
Observe this on the graph
> | plot(f, -Pi..Pi); |
Another Limit
Consider as .
> | g := t -> (sqrt(t^2 + 9) - 3) / t^2: |
> | g(0.5); |
> | printf(" t g(t)\n"):
for n from 0 to 5 do t := 1 / 2^n: printf(" %15.10f %15.10f\n", t, g(t)); od: |
t g(t)
1.0000000000 0.1622776600
0.5000000000 0.1655250600
0.2500000000 0.1663783200
0.1250000000 0.1665944000
0.0625000000 0.1666486000
0.0312500000 0.1666620000
As always, lets look at a picture.
> | plot(g, -1..1); |
> | plot(g, -1e-5..1e-5, 0.16..0.17); |
> | Digits := 50: |
... and another one
Consider as .
> | h := x -> sin(Pi / x): |
> | printf(" x h(x)\n"):
for n from 0 to 5 do x := 1 / 2^n: printf(" %15.10f %15.10f\n", x, h(x)); od: |
x h(x)
1.0000000000 0.0000000000
0.5000000000 0.0000000000
0.2500000000 0.0000000000
0.1250000000 0.0000000000
0.0625000000 0.0000000000
0.0312500000 0.0000000000
> | plot(h, -1..1); |