1001Ferramentas
Calculators

Numeric Function Derivative

Computes numeric derivative of a math expression at a point using central difference method.

Numerical derivative of a function

A numerical derivative estimates f'(x) from sampled function values, which is what you reach for when there's no analytic form or it costs too much to compute. The forward difference f'(x) ≈ (f(x+h) − f(x))/h has error O(h). The central difference f'(x) ≈ (f(x+h) − f(x−h))/(2h) brings that down to O(h²), and a 5-point stencil (−f(x+2h)+8f(x+h)−8f(x−h)+f(x−2h))/(12h) reaches O(h⁴). Take f(x) = x² at x = 2 with h = 0.01: central gives (4.0401 − 3.9601)/0.02 = 4.0000, which matches the exact 2x = 4. Pick h around √ε for forward or ∛ε for central, with ε being machine epsilon. Go too small and subtractive cancellation wrecks your precision.

Applications and context

You'll find numerical derivatives behind finite-element analysis (FEM), numerical ODE/PDE solvers, optimization without analytic gradients, signal processing (rate-of-change detection) and economic sensitivity studies. In ML the story is different. Automatic differentiation (PyTorch autograd, JAX, TensorFlow) usually wins over finite differences, since it hands back gradients exact up to round-off and scales to millions of parameters.

FAQ

Forward vs central, which one? Go central whenever you can evaluate both sides of x. That one extra call buys you a whole order of accuracy.

Can I just use h = 10⁻¹⁵? No. When you subtract two near-equal floats you throw away significant digits, and the total error traces a U-shape with one optimal h sitting at the bottom.

How does autodiff differ? It walks the chain rule symbolically through your source code, so you get exact derivatives and never have to tune an h.

Related Tools

Numeric Function Integral

Computes a definite integral over an interval using composite Simpson 1 3 rule.

Numerical Derivative

Compute numerical derivative f-prime(x) by central difference for a simple function.

Numeric Function Limit

Computes numeric two-sided limit of a function as x approaches a value.

🏖️

Vacation Pay Calculator (Brazil)

Calculate vacation pay with the constitutional third per Brazilian labor law (CLT). Enter gross salary and vacation days to get the estimated net amount.

📐

Timber Design Strength (kmod, NBR 7190)

Computes the timber design strength per the Brazilian NBR 7190, f_d = k_mod1 · k_mod2 · k_mod3 · f_k / γ_w, where the three modification factors correct the characteristic strength for load duration, service moisture class and timber grade, and γ_w is the material partial safety factor. Timber is the only common structural material whose strength falls with the DURATION of the applied load, and that is what k_mod1 encodes: it is 1.10 for instantaneous action and only 0.60 for permanent load, so the same member is worth nearly twice as much under impact as under self weight. In the most common design combination — long-duration action (0.70), moisture class 1 or 2 (1.00), first-grade sawn timber (1.00) and compression parallel to the grain with γ_wc = 1.4 — the factors cancel such that the design strength comes out exactly half the characteristic value, a shortcut worth memorising to sanity-check any result. Enter the three modification factors, the characteristic strength and the partial safety factor.

💪

Bench Press 1RM (Epley)

Estimates one-rep max (1RM) bench press by Epley formula.

The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.