Multiple Equations
Sine Waves
Compare four sine waves on shared axes.
The graph plots y = sin(x); y = sin(2*x); y = sin(3*x); y = sin(5*x). The trig function repeats. Sin and cos have period 2π and stay between −1 and 1 before they are scaled. A coefficient on x compresses or stretches that period.
Sample values: x = -2 gives y = -0.909297; x = -1 gives y = -0.841471; x = 0 gives y = 0; x = 1 gives y = 0.841471; x = 2 gives y = 0.909297. The first function: x = -2 gives y = 0.756802; x = -1 gives y = -0.909297; x = 0 gives y = 0; x = 1 gives y = 0.909297; x = 2 gives y = -0.756802. Points where the y-values agree are intersections of the curves.
Equation
y = sin(x)
y = sin(2*x)
y = sin(3*x)
y = sin(5*x)
Graph preview
How an explicit graph works
An explicit graph gives y directly from x. Every vertical line meets the curve once, except where the expression is undefined. DGS draws it on the 2D board and, for an ordinary function, can mark intercepts, extrema, and asymptotes without changing the equation you typed.
Domain matters. Square roots and logarithms stop where their inputs are invalid, and rational functions and tangent open a gap at a pole. A slider letter such as a, b, or c is not a second curve. In DGS the lowercase names a, b, and c start at 4, 3, and 5 unless the input assigns them.
Reading the input
y = sin(x)— This line defines an explicit function. The left side is the vertical coordinate, and the right side is evaluated for each x.y = sin(2*x)— This line defines an explicit function. The left side is the vertical coordinate, and the right side is evaluated for each x.y = sin(3*x)— This line defines an explicit function. The left side is the vertical coordinate, and the right side is evaluated for each x.y = sin(5*x)— This line defines an explicit function. The left side is the vertical coordinate, and the right side is evaluated for each x.
Try a change
- Add a second line such as y = 0 to see where the curve crosses the x-axis.
- Replace the expression with a nearby one, for example by changing a coefficient, then generate. Start from: y = sin(x)
Generate Graph posts the expression to the studio graph engine and draws the result on the homepage. The editable field is the entire input, including every line.