ArticleLocally Linear

This Sage tool will graph a function at a particular value of \(x\), \(x=a\). You can control the plot to show a square box centered at the point on the graph of the function (marked in red). The size of the box (in all four directions) is controlled by the value for the “Bounds”. Since the box is square, the scale on the horizontal and on the vertical are the same. The idea is to zoom in and zoom out, to better witness “local” and “global” behavior.

Optionally, you can include a plot of the tangent line (in green) at the point.

You should notice that if you use a large enough zoom factor, most functions,

  • Appear linear.
  • Are sloped just like the tangent line.

However, not all functions behave this way. Be sure to experiment with our favorite non-smooth function, the absolute function, \(|x|\) at \(x=0\). Be sure to turn off the tangent line when you do this! (Because there is no tangent line.)

Some examples to try:

  • \(f(x)=x^3\), at \(x=1\) and \(x=-1\).
  • \(f(x)=\sqrt(x)\) at \(x=4\). (sqrt(x) is \(\sqrt{x}\) in Sage.)
  • \(f(x)=sin(x)\) at \(x=\pi/2\). (pi is \(\pi\) in Sage.)
  • \(f(x)=|x|\) at \(x=0\). (abs(x) is \(|x|\) in Sage.)