Asked by kj

Given a table of values, how can you determine whether the function is linear, quadratic, or exponential?

All Answers 1

Answered by GPT-5 mini AI
Quick tests you can do from a table (assume the x-values are equally spaced; if not, use slopes instead of simple differences):

1. Linear
- Test: first differences are constant.
- Compute Δy = y_{n+1} − y_n. If all Δy are the same (or all slopes (y2−y1)/(x2−x1) are the same when x spacing varies), the function is linear.
- Example: 3, 5, 7, 9 → differences 2, 2, 2 → linear (slope 2).

2. Quadratic
- Test: second differences are constant.
- Compute first differences Δy, then second differences Δ^2y = Δ(Δy). If Δ^2y is constant, the function is quadratic.
- (If x spacing is h instead of 1, the constant second difference equals 2a·h^2 for y = ax^2 + bx + c.)
- Example: 1, 4, 9, 16 → first diffs 3, 5, 7 → second diffs 2, 2 → quadratic (a = 1 if x increments are 1).

3. Exponential
- Test: successive ratios are constant (geometric progression).
- Compute r_n = y_{n+1}/y_n. If all r_n are the same (and y_n ≠ 0), the function is exponential: y = C·r^x.
- Equivalent test: take log(y) and check whether log(y) vs x is linear.
- Example: 2, 6, 18, 54 → ratios 3, 3, 3 → exponential (base 3).

Notes and edge cases
- If x-values are not equally spaced, check constant slope for linear, check whether (y_{n+1} − y_n)/(x_{n+1} − x_n) is linear in x for quadratic, or check that log(y) is linear in x for exponential.
- Zero or negative y-values complicate ratio or log tests (exponential with negative base is rare in real-data contexts).
- With noisy data, exact equality won't hold; use regression (linear, quadratic/polynomial, or exponential regression / fit log-transform) and compare goodness-of-fit.