Squeeze Theorem Example
Author: Jamie Mulholland

Diagram to accompany section 2.3, Example 12, in course notes.

Positive x-values

Negative x-values

point on f

points on g

points on h

Xvalue = 3
g(x) = x * (sin(1 / x) + cos(1 / x))
h(x) = 2 x
f(x) = -2 x
fpos = Function(f(x), 0, Xvalue)
fneg = Function(f(x), -Xvalue, 0)
hpos = Function(h(x), 0, Xvalue)
hneg = Function(h(x), -Xvalue, 0)
gpos = Function(g(x), 0, Xvalue)
gneg = Function(g(x), -Xvalue, 0)
a = true
b = true
x_0 = 0.040000000000000036 (slider from -0.5 to 0.5, step 0.0050)
A: (x_0, 0)
B_f: (x_0, f(x_0))
C_f: (0, y(B_f))
B_g: (x_0, g(x_0))
C_g: (0, y(B_g))
B_h: (x_0, h(x_0))
C_h: (0, y(B_h))
ylineh = Segment(B_h, C_h)
xlineh = Segment(A, B_h)
ylinef = Segment(B_f, C_f)
ylineg = Segment(B_g, C_g)
xlinef = Segment(A, B_f)
xlineg = Segment(A, B_g)
c = true
d = true
e = true