Your Equation

Library / Geometry, coordinates, surveying and trigonometry / GEO-45

Geometry, coordinates, surveying and trigonometry

Single harmonic equivalent of a sine and cosine sum

Amplitude R of the single sine wave R sin(x + φ) that equals a sin x + b cos x.

Ref
GEO-45
Rev
v1
Field
Geometry, coordinates, surveying and trigonometry
Result
R

A sum a sin x + b cos x is a single sine wave R sin(x + φ), with R = √(a² + b²) and φ = atan2(b, a). It follows from expanding R sin(x + φ) = R sin x cos φ + R cos x sin φ and matching coefficients. This amplitude is shown here; the phase is in the derived rows. If a = b = 0, R = 0 and the phase is not defined.

Amplitude R of the single sine wave R sin(x + φ) that equals a sin x + b cos x. The phase φ = atan2(b, a) is in the derived rows. If a = b = 0 the amplitude is zero and the phase is not defined.

Calculator

Solve for
−1010
−1010
  • Phase φ = atan2(b, a)0.9273 rad
  • Phase in degrees53.13 °
  • Value at x = 0, which equals b4

What drives the result

Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.

Amplitude () current value 5
bCosine coefficientKey driver
310.4
aSine coefficient
410.8
  • 3 sin x + 4 cos x = 5 sin(x + 0.9273), a wave of amplitude 5 shifted 53.13°.
  • This is how two vibrations or two AC voltages of the same frequency combine: the amplitudes add like the sides of a right triangle, not directly.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
b Cosine coefficient−10 to 10 310.447.44+0.4 +6.51 %
a Sine coefficient−10 to 10 410.776.77+0.4 +5 %

Sweep of Sine coefficient

Sine coefficientAmplitude
−1010.77
−7.58.5
−56.403
−2.54.717
04
2.54.717
56.403
7.58.5
1010.77

Sweep one variable

Amplitude ()Hover, touch, or use the arrow keys on the chart
46810 −10−50510 Sine coefficient now 5

Variables and how each one contributes

R

Amplitude

Result ·

What the equation gives you. Everything else feeds it.

a

Sine coefficient

· typical −10 to 10

The coefficient of sin x, a plain number (or in any unit shared with b). Raises R, mostly when a is large compared with b. Raising it by 0.5 (to 3.5) moves the result by +6.3 %, from 5 to 5.315.

b

Cosine coefficient

· typical −10 to 10

The coefficient of cos x, in the same unit as a. Raises R, mostly when b is large compared with a. Raising it by 0.5 (to 4.5) moves the result by +8.17 %, from 5 to 5.408.

Worked example with the values above

  1. Squares: a² + b² = 9 + 16 = 25.
  2. Phase: φ = atan2(4, 3) = 0.9273 rad.
  3. R = √25 = 5.

Assumptions and limits

  • The inputs are the exact sine, cosine or tangent values of a real angle.
  • Where a square root is taken, the stated range of the angle fixes the sign.

Common mistakes

  • Using atan(b/a) in place of atan2(b, a), which puts the phase in the wrong quadrant when a is negative.
  • Adding the amplitudes a + b instead of combining them as a root of the sum of squares.
  • Mixing a sine form with a phase and a cosine form with a phase.

Statistics and uncertainty

The amplitude is a root of a sum of squares, so errors in the larger coefficient dominate, and the phase is poorly determined when both coefficients are small.

Where it is used

  • Simplifying expressions and solving trigonometric equations in mathematics and physics.
  • Combining two sinusoids of the same frequency into one wave, as in phasors, AC circuits and vibration.

Maths you need

  • Sine, cosine and tangent: ratios from a right triangle or the unit circle
  • Pythagorean identity: sin² + cos² = 1
  • Phase: the horizontal shift of a wave

Related formulas

Practise this formula