PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

Related simulators

Continue with similar topics in this category — or all 85 in Math Visualization.

View category →
NewSchool

Taylor Polynomial

Launch Simulator

sin, cos, or exp vs Taylor sum about center a up to order n.

NewUniversity / research

STFT & Spectrogram

Launch Simulator

Slide a windowed FFT across the signal: chirps, two-tones, bursts. Tune window M, hop, type — see the time–frequency trade-off live.

NewUniversity / research

Runge–Kutta Stability Regions

Launch Simulator

Absolute-stability regions in the z = hλ plane for explicit Euler, RK2, and RK4; move λ and h, compare |R(z)|, and see why stiff modes constrain explicit time steps.

FeaturedSchool

Vector Addition

Launch Simulator

Place vectors and see the resultant with head-to-tail animation.

NewSchool

Newton's Method (1D)

Launch Simulator

Graph f(x), click x₀, iterate x − f/f′ with numeric derivative; pan and presets. Complex basins: separate Newton fractal sim.

NewKids

Harmonograph

Launch Simulator

Two damped harmonic sums in x and y: decaying rosette trace vs Lissajous loops.

PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Math Visualization/Function Grapher

Function Grapher

Enter f(x) and see instant plots with zoom and pan.

f(x)

Use x, powers ^, sin, cos, exp, log, sqrt, abs, pi, e (mathjs syntax).

View

1 ×

Drag on the plot to pan along x.

Shortcuts

  • •Space / Enter — reset view

Measured values

x range-6.50 … 6.50
y range (auto)-1.24 … 1.24

About this model

The Function Grapher provides a dynamic environment for visualizing mathematical relationships between an independent variable, typically x, and a dependent variable, y, defined by a function f(x). At its core, it models the fundamental concept of a function as a mapping from a set of inputs (the domain) to a set of outputs (the range), graphically represented as a set of points (x, f(x)) in the Cartesian coordinate system. The simulator implements plotting algorithms that evaluate the user-defined function over a specified interval, connecting discrete calculated points to form a continuous curve. This visual representation makes abstract algebraic relationships concrete, allowing students to directly observe properties like slope, curvature, intercepts, and asymptotic behavior. Key mathematical principles illustrated include the definition of a function, the graphical interpretation of derivatives (as the slope of the tangent line) and integrals (as the area under the curve), and the shapes of common function families such as polynomials, trigonometric functions, exponentials, and rational functions. A simplification is that the plot is a discrete approximation of a continuous function; the graph is drawn by connecting a finite number of calculated points, which can sometimes miss very fine detail or discontinuities if the sampling resolution is too low. By interacting with the simulator, students learn to connect symbolic expressions to geometric shapes, predict graph behavior from equations, and understand the effects of parameters—for example, how the coefficient 'a' in f(x)=a*sin(x) affects amplitude. The immediate visual feedback reinforces concepts of domain and range, function composition, and transformations like shifts and stretches.

Who it's for: High school and introductory college students learning algebra, pre-calculus, and calculus, as well as educators seeking a dynamic demonstration tool for classroom instruction.

Key terms

  • Function
  • Cartesian Coordinates
  • Domain and Range
  • Derivative
  • Asymptote
  • Polynomial
  • Trigonometric Function
  • Exponential Function

How it works

Type a y = f(x) expression evaluated by mathjs (variable x only). The plot auto-scales y; drag on the graph to pan horizontally. Zoom squeezes or widens the x window about the center. Discontinuities and poles are drawn as separate segments.

Key equations

Examples: sin(x), x^2 + 2*x, exp(-x^2)

Frequently asked questions

Why does my graph look jagged or incorrect for some functions, like tan(x)?
This is often due to the plotting algorithm sampling points. For functions with vertical asymptotes, like tan(x) near π/2, the calculated y-values jump from very large positive to very large negative numbers between sample points. The simulator connects these points with a line, creating a misleading vertical segment. Zooming in or adjusting the viewing window can help clarify the true behavior near discontinuities.
What's the real-world use of graphing functions?
Graphing functions is a foundational tool for modeling real-world phenomena. For instance, a quadratic function can model the trajectory of a projectile, an exponential function describes population growth or radioactive decay, and sinusoidal functions represent sound waves and alternating current. The graph provides an intuitive way to see maximums, minimums, periodic cycles, and rates of change critical for analysis and prediction.
Can I plot anything that isn't a function, like a circle (x² + y² = 1)?
No, this simulator is designed specifically for functions, where each x-input has only one y-output. A circle fails this 'vertical line test' because most x-values correspond to two y-values (top and bottom halves). To plot a circle, you would need to enter two separate functions: y = sqrt(1 - x²) and y = -sqrt(1 - x²).
How does zooming and panning help me understand the function better?
Zooming and panning allow you to investigate local and global behavior. Zooming in on a small region reveals local linearity—the function looks like a straight line, which is the core idea behind the derivative. Zooming out shows the overall shape, end behavior, and periodicity. Panning lets you explore different sections of the domain without redefining the function's input range.