What This Calculator Does
This tool analyzes any sinusoidal function written in the standard form \(y = A\sin(Bx + C) + D\) (the same rules apply to cosine). From the four coefficients it extracts the amplitude, period, frequency, horizontal phase shift, and vertical midline — the key features you need to graph or describe a wave.
How to Use It
Enter the coefficient A (multiplies the trig function), B (multiplies x inside the function), C (the constant added inside), and D (the constant added outside). Leave C and D as 0 if your function has no shifts. Press calculate to see all five characteristics.
The Formulas Explained
The amplitude is \(|A|\), the maximum distance the curve rises above or falls below its midline. The period $$T = \frac{2\pi}{|B|}$$ is the horizontal length of one complete cycle, and the frequency $$f = \frac{|B|}{2\pi}$$ is how many cycles occur per unit of x — they are reciprocals. The phase shift equals \(-\frac{C}{B}\) (positive means a shift right). The midline is the horizontal line \(y = D\) about which the wave oscillates.
Worked Example
For \(y = 3\sin(2x)\): \(A = 3\), \(B = 2\), \(C = 0\), \(D = 0\). Amplitude \(= |3| = 3\). Period $$= \frac{2\pi}{|2|} = \pi \approx 3.1416$$ Frequency $$= \frac{|2|}{2\pi} = \frac{1}{\pi} \approx 0.31831$$ Phase shift \(= -\frac{0}{2} = 0\). Midline \(= 0\). So this wave swings between \(-3\) and \(3\), completing a cycle every \(\pi\) units.
More Worked Examples
For any sinusoid written as \(y = A\sin(Bx + C) + D\) (a cosine works identically), the five key quantities are amplitude \(|A|\), period \(T = \dfrac{2\pi}{|B|}\), frequency \(f = \dfrac{|B|}{2\pi}\), phase shift \(-\dfrac{C}{B}\), and midline \(y = D\).
Example 1 — A cosine function: \(y = 3\cos(2x)\)
Here \(A = 3\), \(B = 2\), \(C = 0\), \(D = 0\).
- Amplitude: \(|A| = |3| = 3\).
- Period: \(T = \dfrac{2\pi}{|B|} = \dfrac{2\pi}{2} = \)\(\pi\).
- Frequency: \(f = \dfrac{|B|}{2\pi} = \dfrac{2}{2\pi} = \dfrac{1}{\pi} \approx 0.318\) cycles per unit.
- Phase shift: \(-\dfrac{C}{B} = -\dfrac{0}{2} = 0\) (no horizontal shift).
- Midline: \(y = D = 0\).
The graph is a cosine oscillating between \(-3\) and \(3\), completing one cycle every \(\pi\) units.
Example 2 — Phase shift and midline: \(y = 2\sin\!\left(3x + \dfrac{\pi}{2}\right) + 4\)
Here \(A = 2\), \(B = 3\), \(C = \dfrac{\pi}{2}\), \(D = 4\).
- Amplitude: \(|A| = 2\).
- Period: \(T = \dfrac{2\pi}{|B|} = \dfrac{2\pi}{3} \approx 2.094\).
- Frequency: \(f = \dfrac{|B|}{2\pi} = \dfrac{3}{2\pi} \approx 0.477\).
- Phase shift: \(-\dfrac{C}{B} = -\dfrac{\pi/2}{3} = -\dfrac{\pi}{6} \approx -0.524\) (shifted left by \(\tfrac{\pi}{6}\)).
- Midline: \(y = D = 4\); the wave oscillates between \(4-2 = 2\) and \(4+2 = 6\).
Definitions & Glossary
- Coefficient A (vertical stretch)
- The number multiplying the sine or cosine. Its absolute value sets how tall the wave is; a negative \(A\) also reflects the curve across the midline.
- Amplitude \(|A|\)
- The maximum distance from the midline to a peak (or trough), always non‑negative: \(\text{amplitude} = |A|\). The curve ranges from \(D-|A|\) to \(D+|A|\).
- Coefficient B (angular frequency)
- The number multiplying \(x\) inside the trig function. Larger \(|B|\) compresses the wave horizontally, producing more cycles per unit.
- Period \(T = \dfrac{2\pi}{|B|}\)
- The horizontal length of one complete cycle. It depends only on \(|B|\), not on \(A\), \(C\), or \(D\).
- Frequency \(f = \dfrac{|B|}{2\pi} = \dfrac{1}{T}\)
- The number of complete cycles per unit of \(x\) — the reciprocal of the period.
- Coefficient C (phase term)
- The constant added inside the trig argument. Combined with \(B\) it determines the horizontal displacement of the wave.
- Phase shift \(-\dfrac{C}{B}\)
- How far the curve is shifted horizontally. A positive result shifts right; a negative result shifts left. (Factoring \(Bx + C = B(x + C/B)\) reveals the shift.)
- Coefficient D (vertical shift)
- The constant added outside the trig function, raising or lowering the entire wave.
- Midline \(y = D\)
- The horizontal line about which the wave oscillates, located halfway between the maximum and minimum values.
FAQ
Does this work for cosine functions? Yes. The amplitude, period, and frequency formulas are identical for sine and cosine; only the starting point differs.
What if B is negative? Period and frequency use \(|B|\), so a negative B gives the same period — it just reflects the graph horizontally.
Why is the phase shift \(-\frac{C}{B}\) and not C? Factoring \(Bx + C = B(x + \frac{C}{B})\) shows the horizontal translation is \(-\frac{C}{B}\), not the raw constant C.