Graph the interval |x-center| < radius/10
.
Show the interval by dragging the two (white-filled) orange dots
to the endpoints of the interval.
init({
range: [[LOWER_BOUND - 1, UPPER_BOUND + 1], [-1, 1]]
});
line([LOWER_BOUND, 0], [UPPER_BOUND, 0]);
for (var x = LOWER_BOUND; x <= UPPER_BOUND; x++) {
line([x, -0.2], [x, 0.2]);
}
for (var J = LOWER_BOUND; J <= UPPER_BOUND; J++) {
label([J, -0.53], ((J - centerposition)/10) + center, "center", { color: "#6495ED" });}
addMouseLayer();
graph.movablePoint = addMovablePoint({
constraints: { constrainY: true } ,
normalStyle: {
fill: "#FFFFFF",
stroke: KhanUtil.ORANGE
},
highlightStyle: {
fill: "#FFFFFF",
stroke: KhanUtil.ORANGE
},
});
graph.movablePoint.onMove = function( x, y ) {
graph.movableLineSegment.coordA = graph.movablePoint.coord;
graph.movableLineSegment.transform();
var newx = round(x);
if (abs(newx - x) < 0.25) {
x = newx;
}
return [min(max(LOWER_BOUND, x), UPPER_BOUND), y];
};
graph.movablePoint2 = addMovablePoint({
coord: [UPPER_BOUND,0] ,
constraints: { constrainY: true } ,
normalStyle: {
fill: "#FFFFFF",
stroke: KhanUtil.ORANGE
},
highlightStyle: {
fill: "#FFFFFF",
stroke: KhanUtil.ORANGE
},
});
graph.movablePoint2.onMove = function( x, y ) {
graph.movableLineSegment.coordZ = graph.movablePoint2.coord;
graph.movableLineSegment.transform();
var newx = round(x);
if (abs(newx - x) < 0.25) {
x = newx;
}
return [min(max(LOWER_BOUND, x), UPPER_BOUND), y];
};
graph.movableLineSegment =
addMovableLineSegment({
normalStyle: {
stroke: ORANGE,
"stroke-width": 5
},
coordA:graph.movablePoint.coord,
coordZ:graph.movablePoint2.coord,
fixed:true
});
graph.movablePoint.visibleShape.toFront();
graph.movablePoint2.visibleShape.toFront();
Move the orange dots to select your answer.
[graph.movablePoint.coord[0],graph.movablePoint2.coord[0]]
return (abs(centerposition - radius - min(guess[0],guess[1])) < 0.001)
&&
(abs(centerposition + radius - max(guess[0],guess[1])) < 0.001);
|x-center|
is the distance from x
to center
.
So we need to graph all numbers x
such that
the distance from x
to center
is less than radius/10
.
This would be the open interval centered at center
with radius radius/10
.
In other words, the open interval from center - radius/10
to center + radius/10
.
In other words, the open interval from center - (radius/10)
to center + (radius/10)
.
graph.movablePoint.moveTo(LOWER_BOUND, 0);
graph.movablePoint2.moveTo(UPPER_BOUND, 0);
style({ stroke: "#6495ED", fill: "#6495ED", strokeWidth: 2.5, arrows: "->" });
line([LOWER_BOUND, 0], [centerposition - radius, 0]);
graph.movablePoint.visibleShape.toFront();
style({ stroke: "#6495ED", fill: "#6495ED", strokeWidth: 2.5, arrows: "->" });
line([UPPER_BOUND, 0], [centerposition + radius, 0]);
graph.movablePoint2.visibleShape.toFront();
Now follow the blue arrows above. That is, drag
the left (white-filled) orange dot over to center - (radius/10)
and drag
the right (white-filled) orange dot over to center + (radius/10)
.
I can drag the dots for you -- just ask for the next hint.
graph.movablePoint.moveTo(centerposition - radius, 0);
graph.movablePoint2.moveTo(centerposition + radius, 0);
I've dragged the dots into their proper position.
Now click on "Check Answer" or "Try Again".