Zoom Telescope / Microscope

The learner drags a log-scale zoom slider (or presses Zoom in / Zoom out). Zooming in about a point, a differentiable graph straightens into its tangent line while a corner, cusp or vertical tangent never does, and two curves through a common zero approach the ratio of their slopes; zooming out, a polynomial turns into its leading term, a rational function hugs its asymptote, and one growth rate swamps another, with a comparison curve always on screen.

Used in: Mathematical Analysis, Single Variable Calculus

Props

PropTypeDefaultDescription
titlestringby mode ("Zooming in on a point", "Zooming in on two curves", "Zooming out to the ends")Card title.
modestringmicroscope when a is given, else telescopemicroscope: zoom in about (a, f(a)) with x and y scaled together (local linearity, corners, L'Hopital). telescope: zoom out about the origin (end behaviour, leading terms, asymptotes, growth rates).
fstring"x^3 - 2*x"The function zoomed, in x and the parameter names. A leading "y =" or "f(x) =" is ignored. Supports + - * / ^, implicit multiplication, |u|, comparisons, if(cond, a, b), sin cos tan sec csc cot and inverses, sinh cosh tanh, sqrt cbrt exp ln log log10 log2 abs sign floor ceil min max, factorial, pi, e.
comparestringnoneA comparison curve g kept on screen, dashed: the leading term, an asymptote ("2", "2*x - 1"), a rival growth rate ("e^x"), or in microscope mode a second curve through the same point (L'Hopital's g). Its values join the readouts.
anumber | stringnone (telescope)Microscope mode: the point where the zoom is centred, on the graph at (a, f(a)). The learner can drag it along the curve in the overview. Strings may be expressions ("pi/4").
zoomnumberthe low end of zoomRangeStarting magnification (microscope) or zoom-out factor (telescope).
zoomRange[number, number][1, 1000]Range of the logarithmic zoom slider (capped at 10^7).
yZoomstring"same" (microscope), "fit" (telescope)How the y axis follows the zoom: same (y scaled with x, so slopes keep their look), fit (y refitted to the curves in view, never narrower than the starting view), fixed (y stays at the starting view).
endsstringboth (right when f or g is undefined for negative x, or xRange starts at 0)Telescope mode: which ends of the x axis to study: both, right (x to infinity) or left (x to minus infinity).
xRange[number, number][a - 2, a + 2] (microscope), [-5, 5] / [0, 5] / [-5, 0] by ends (telescope)The view at zoom 1. Microscope: its width sets the zoom-1 window around a (and the overview). Telescope: it is scaled about the origin by the zoom factor.
yRange[number, number]fitted to the curvesVertical view at zoom 1.
showTangentbooleanfalseMicroscope mode: draw the tangent line at a dashed (for g too), so the zoomed curve can be seen merging into it; a vertical line at a vertical tangent.
showRatiobooleanfalseWith compare: f(x)/g(x) at x = a - w and a + w (microscope) or at the window's ends (telescope).
showDifferencebooleanfalseTelescope mode with compare: the column f(x) - g(x) at the window's ends (goes to 0 for an asymptote).
markCrossingsbooleanfalseTelescope mode with compare: mark where f and g cross in the window and say which stays on top beyond the last crossing.
logYbooleanfalseTelescope mode: logarithmic y axis (positive values only), e.g. to see x^p against e^x.
draggablebooleantrueMicroscope mode: let the learner drag the zoom centre along the curve in the overview.
parameters{name, min, max, initial?, step?, label?}[][]Named parameters with sliders, usable in f, compare and a (e.g. the power p in x^p). x, e, pi and inf are reserved.
fLabelstring"$y = ...$" ("$f(x) = ...$" with compare)Legend label of f ($...$ TeX).
compareLabelstring"$g(x) = ...$"Legend label of the comparison curve ($...$ TeX).
presets{label, ...props}[][]Further examples in an Example dropdown; each overrides the props it names. A preset that sets its own f drops the main example's compare, labels and parameters unless it gives them.
presetLabelstring"Main example"Dropdown label of the main example when presets are given.
controlsstring[]all controls shownIds of the hideable controls to show (see the controls registry); core ones always show. Absent = everything. Fitted per page by tooling, not by hand.