Calculator Inputs
Example Data Table
Example setup: f(x) = x² and g(x) = 2x + 1 from x = 0 to 5.
| x | f(x) | g(x) | Difference |
|---|---|---|---|
| 0 | 0 | 1 | -1 |
| 1 | 1 | 3 | -2 |
| 2 | 4 | 5 | -1 |
| 3 | 9 | 7 | 2 |
| 4 | 16 | 9 | 7 |
| 5 | 25 | 11 | 14 |
Formula Used
This calculator samples both functions over the chosen x-range.
It compares each valid point using several metrics.
- Difference: f(x) − g(x)
- Absolute Difference: |f(x) − g(x)|
- Ratio: f(x) / g(x), when g(x) is not zero
- Mean Absolute Difference: average of all absolute differences
- RMSE: square root of the mean squared differences
- Relative Error %: |f(x) − g(x)| / |g(x)| × 100
- Correlation: linear agreement between the sampled outputs
- Area Gap: trapezoidal estimate of the total difference across the interval
Intersections are estimated where the sampled difference changes sign.
How to Use This Calculator
- Select a model for function F.
- Enter the needed coefficients for that model.
- Select a model for function G.
- Enter the second function coefficients.
- Set the x-range and step size.
- Click the compare button.
- Review metrics, intersections, graph, and the generated table.
- Export your results as CSV or PDF.
Logarithmic, reciprocal, and some power inputs may skip invalid domain points automatically.
Frequently Asked Questions
1. What does this calculator compare?
It compares two sampled functions over the same x-range. You get values, differences, relative error, intersections, dominance counts, correlation, and total area gap.
2. Can I compare different model types?
Yes. You can compare linear, quadratic, cubic, exponential, logarithmic, power, sine, and reciprocal models within one interface.
3. Why are some points skipped?
Some models become invalid for certain x-values. Logarithms need positive inputs. Reciprocal models cannot divide by zero. Fractional powers of negative numbers may also fail.
4. What does RMSE tell me?
RMSE measures the typical gap size, while giving extra weight to large errors. Lower RMSE means the sampled outputs stay closer overall.
5. How are intersections estimated?
The tool checks when the difference changes sign between two sampled points. It then linearly estimates the crossing location between those points.
6. What does correlation mean here?
Correlation shows whether both functions move together across the range. Values near 1 suggest similar movement, while values near -1 show opposite movement.
7. Is a smaller step size always better?
Smaller steps usually improve detail and intersection accuracy. They also increase total points and processing time. Use a balanced step for your range.
8. What export options are included?
You can download the full numerical results as CSV. You can also save a PDF summary containing formulas, core metrics, and a preview table.