Graph Two Functions f(x) and g(x)
Plot two expressions f(x) and g(x) on the same axes in distinct colors, and automatically find their max, min, and intersection points.
Input
Allowed symbols: + - * / ^ (power), parentheses, the variable x, and the constants pi and e. Functions: sin cos tan asin acos atan sinh cosh tanh exp log (natural log) ln log10 sqrt cbrt abs. Implicit multiplication such as 2x or 2sin(x) also works.
Result
Intersections in range
3
Points where f(x) equals g(x) (approximate)
f(x) = sin(x)
g(x) = x/2
f(x) maximum
1
f(x) minimum
-1
g(x) maximum
3.14
g(x) minimum
-3.14
Max and min in range (approximated at sampled points)
| Function | Max y | x at max | Min y | x at min |
|---|---|---|---|---|
f(x) | 1 | -4.7067 | -1 | 4.7067 |
g(x) | 3.14 | 6.28 | -3.14 | -6.28 |
List of intersections (approximate)
| # | x | y |
|---|---|---|
| 1 | -1.8955 | -0.9477 |
| 2 | 0 | 0 |
| 3 | 1.8955 | 0.9477 |
How it works
- Enter an expression for f(x) and g(x) to draw both curves on the same coordinate plane in different colors. f(x) is shown in blue and g(x) in pink.
- Allowed symbols are + - * / and ^ (power), parentheses, the variable x, and the constants pi and e. Major functions such as sin, cos, tan, exp, log (natural log), sqrt and abs are supported, and implicit products like 2x or 2sin(x) are also parsed.
- Change the minimum and maximum x to adjust the visible range. The range must be entered so that minimum < maximum.
- For each function the tool lists the maximum and minimum within the specified range along with the approximate x where they occur. These are approximations based on sampling.
- Points where the two curves cross (where f(x) equals g(x)) are searched for automatically and shown as black dots on the graph and in a list. The values are numerical approximations.
- For functions with vertical asymptotes or discontinuities, the line may appear broken. Keep this in mind when plotting curves such as 1/x or tan(x).
Related calculators
Function Graph Plotter f(x)
NumericalType an expression such as sin(x) or x^2-2 and instantly plot its graph over a chosen x range. Maximum, minimum, zeros, and sample point values are shown alongside.
Open calculator →Data Point f(x) Graph Plotter
NumericalJust paste your (x, y) data points to instantly draw a line-and-point chart. See the point count plus the minimum, maximum, and average of y at the same time.
Open calculator →Plot Data Points f(x), g(x)
NumericalPaste two sets of (x, y) data points and get f(x) and g(x) drawn as color-coded overlaid line graphs, with each series' point count and min/max.
Open calculator →Bisection Method Equation Solver
NumericalSolve f(x)=0 with the bisection method. Enter a function and an interval to get the approximate root, f(root), the iteration count, and the error, plus a per-step table of intervals and midpoints and a function graph.
Open calculator →