keisoku

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)

-4-3-2-101234-6-4-20246

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)

FunctionMax yx at maxMin yx at min
f(x)
1-4.7067-14.7067
g(x)
3.146.28-3.14-6.28

List of intersections (approximate)

#xy
1-1.8955-0.9477
200
31.89550.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).