How to Write the Equation of a Sine Graph

How to Write the Equation of a Sine Graph

To write a sine equation from a graph, find the midline, amplitude, period, and a midline crossing. Use \(y=A\sin(B(x-h))+D\), where the amplitude is \(|A|\), the period is \(P=2\pi/|B|\), the horizontal shift is \(h\), and the midline is \(y=D\). The parameter \(B\) controls the period; it is not the period itself. These formulas use radians and assume \(A\ne0\), \(B\ne0\).

Quick answer: A sine graph has the equation y = A sin(B(x – h)) + D. A is the amplitude, half the distance from max to min. The period is 2π/B. h is the horizontal shift to an upward midline crossing, and D is the midline. For example, y = 2 sin(3x) + 1 has amplitude 2, period 2π/3 and midline y = 1.

Related Topics

Step-by-step to write the equation of a sine graph

To find out how to write the equation of a sine graph, follow the step-by-step guide below:

  1. Amplitude: Read the maximum \(M\) and minimum \(m\). The amplitude is \((M-m)/2\), a nonnegative distance. In the equation it equals \(|A|\), not necessarily \(A\).
  2. Period: Measure the horizontal distance \(P\) between consecutive peaks, consecutive troughs, or matching crossings in the same direction. Choose \(B=2\pi/P\). For an axis measured in degrees, use \(B=360^\circ/P\) instead.
  3. Horizontal shift: For positive \(A\) and \(B\), choose \(h\) at a midline crossing where the graph rises. A downward crossing requires a negative \(A\) with this choice of positive \(B\). Equivalent equations may use a different crossing.
  4. Vertical shift: Set \(D=(M+m)/2\), the height of the midline.
Original price was: $109.99.Current price is: $54.99.

For amplitude \(2\), period \(4\pi\), a right shift of \(3\), and an upward shift of \(1\), choose \(A=2\), \(B=2\pi/(4\pi)=1/2\), \(h=3\), and \(D=1\). A matching equation is \(y=2\sin\left(\frac{x-3}{2}\right)+1\). Check: its period is \(2\pi/(1/2)=4\pi\), its maximum is \(3\), and its minimum is \(-1\).

You can also use a graphing calculator or a software like Desmos to help you graph the function and find the equation.

The parent functions \(y=\sin x\) and \(y=\cos x\) have amplitude \(1\), range \([-1,1]\), period \(2\pi\), and domain all real numbers. Amplitude is a distance; the interval from \(-1\) to \(1\) describes their range.

Worked example: find an equation from key points

Suppose a sinusoidal graph has maximum \(5\), minimum \(-1\), period \(8\), and crosses the midline upward at \(x=2\). Then \(D=(5+(-1))/2=2\), \(A=(5-(-1))/2=3\), \(B=2\pi/8=\pi/4\), and \(h=2\). One equation is \(y=3\sin\left(\frac{\pi}{4}(x-2)\right)+2\).

Check five equally spaced points in one cycle: \((2,2)\), \((4,5)\), \((6,2)\), \((8,-1)\), and \((10,2)\). Their horizontal spacing is \(P/4=2\). These points confirm the upward crossing, maximum, minimum, and return to the starting height and direction.

Need more practice? Trigonometry for Beginners covers Trigonometry step by step, with practice problems and answers. Look inside · $17.99

Check the equation before you finish

Substitute a peak, a trough, and a midline crossing from the graph. Confirm the maximum and minimum, one full repeat length, and whether the graph rises or falls at your chosen crossing. In \(A\sin(Bx-C)+D\), the horizontal shift is \(C/B\); factor out \(B\) before reading the shift.

For the underlying transformation formulas, see OpenStax: Graphs of the Sine and Cosine Functions. Use the related sine and cosine lessons above to compare equivalent representations.

Tutor-style math help

Write the Equation of a Sine Graph: what to notice and how to work it

Trigonometry skill
A sine graph is a repeating wave. To sketch it well, mark the midline, amplitude, period, and five key points in one cycle.

What to notice first

For \(y=A\sin(Bx)+D\), the amplitude is \(|A|\), the period is \(2\pi/|B|\), and the midline is \(y=D\).

Common student mistake

Do not space the five key points randomly. Divide one period into four equal parts so the wave starts, rises, returns, falls, and returns again.

Key formulas and cues

\(y=A\sin(Bx)+D\)
\(\text{amplitude}=|A|\)
\(\text{period}=\frac{2\pi}{|B|}\)
\(\text{midline}=y=D\)
amplitude midline

A reliable path

  1. Choose the modelUse a right triangle, the unit circle, or a transformed graph.
  2. Track unitsConvert degrees and radians when needed.
  3. Use identitiesReplace complicated trig expressions with equivalent simpler ones.

Worked examples

Read a sine graph rule

Example: \(y=3\sin(2x)-1\)
  1. Amplitude is |3|.
  2. Period is 2pi/2 = pi.
  3. Midline is y = -1.
Answer: Amplitude \(3\), period \(\pi\), midline \(y=-1\).

Place five key points

Example: Graph one cycle of \(y=\sin x\).
  1. Start at (0, 0).
  2. Use quarter-period steps: pi/2, pi, 3pi/2, 2pi.
  3. The y-values are 0, 1, 0, -1, 0.
Answer: \((0,0),(\pi/2,1),(\pi,0),(3\pi/2,-1),(2\pi,0)\).
Try one before moving on
Try: Find the amplitude and period of \(y=2\sin(4x)\).
Answer: Amplitude \(2\), period \(\frac{\pi}{2}\).
Next step: do the matching worksheet or quiz while the method is still fresh, then come back and explain the first step in your own words.

Reading each value off a sine graph

ValueWhat to look forHow to compute it
D (midline)The horizontal line halfway between peaks and valleysD = (max + min) ÷ 2
A (amplitude)How far the graph rises above the midlineA = (max – min) ÷ 2
PeriodHorizontal distance from one peak to the nextMeasure it on the x-axis
BHow many cycles fit in 2πB = 2π ÷ period
h (phase shift)An x-value where the graph crosses the midline going upRead it from the graph

If the graph crosses the midline going down at your chosen point, keep h at that point and make A negative. If the graph starts at a peak, a cosine equation is often easier: y = A cos(B(x – h)) + D with h at the peak.

Example: a sine graph that starts by going down

A graph has a maximum of 4 and a minimum of -2. It crosses the midline going down at x = 0, and the next downward crossing is at x = π.

  1. Midline: D = (4 + (-2)) ÷ 2 = 1.
  2. Amplitude: (4 – (-2)) ÷ 2 = 3.
  3. Period: π – 0 = π, so B = 2π ÷ π = 2.
  4. The graph goes down at x = 0, so use A = -3 with no shift.

The equation is y = -3 sin(2x) + 1. Check two points. At x = π/4, y = -3 sin(π/2) + 1 = -2, the minimum. At x = 3π/4, y = -3 sin(3π/2) + 1 = 4, the maximum. Both match. Another correct answer is y = 3 sin(2(x – π/2)) + 1, which uses the upward crossing at x = π/2.

Frequently Asked Questions

What is the equation of a sine graph?

A sine graph follows y = A sin(B(x − h)) + D. The amplitude is |A|, the period is 2π/|B|, h is the horizontal shift and y = D is the midline. For example, y = 4 sin(2(x − 1)) − 3 has amplitude 4, period π, a shift of 1 to the right and midline y = −3.

How do you find B in a sine graph?

Measure the period P, the horizontal distance between two neighboring peaks, then use B = 2π/P. If a graph repeats every 4π, B = 2π/4π = 1/2. If it repeats every π, B = 2. When the x-axis is in degrees, use B = 360°/P instead. Remember that B is not the period itself.

How do you write a sine function from a graph?

Read the max and min, then the period and an upward midline crossing. Suppose the max is 5 and the min is −1: D = (5 + (−1))/2 = 2 and A = (5 − (−1))/2 = 3. If the period is 8, B = 2π/8 = π/4. With an upward crossing at x = 1, the equation is y = 3 sin(π/4 (x − 1)) + 2.

How do you write a sinusoidal function?

A sinusoidal function can use sine or cosine: y = A sin(B(x − h)) + D or y = A cos(B(x − h)) + D. Use sine when you can spot a point where the graph crosses its midline going up, and cosine when you can spot a maximum. Both forms give the same curve with a different horizontal shift.

What is the sine wave graph equation in physics?

In physics a sine wave is often written y = A sin(2πft + φ), where A is the amplitude, f is the frequency in cycles per second and φ is the phase shift. Here B = 2πf, so the period is 1/f. A wave with amplitude 3 and frequency 2 Hz is y = 3 sin(4πt), which repeats every 0.5 seconds.

Related to This Article

What people say about "Sine Graph Equation: How to Write y = A sin(B(x - h)) + D"?

No one replied yet.

Leave a Reply