The formula
-
a sin x + b cos x = R sin(x + α), where R = √(a² + b²) and tan α = b/a
-
a sin x − b cos x = R sin(x − α), with the same R = √(a² + b²) and tan α = b/a, for a, b > 0
The relation tan α = b/a needs a ≠ 0. With a = 0, α = 90° if b > 0 and α = −90° if b < 0.
The expression 3 sin x + 4 cos x becomes
R = √(3² + 4²) = 5 and tan α = 4/3, so α ≈ 53.1°,
so 3 sin x + 4 cos x = 5 sin(x + 53.1°). The largest value the expression can take is therefore 5, which is not visible in the original form.
The formula is the sine addition formula read backwards: R sin(x + α) = R cos α · sin x + R sin α · cos x, so a = R cos α and b = R sin α.
When a is negative
What can go wrong is α. The equation tan α = b/a has two solutions half a turn apart, and the calculator’s arctan always gives the one between −90° and 90°. That is right when a is positive and wrong when a is negative.
Take −3 sin x + 4 cos x. R is still 5, and tan α = 4/(−3):
| Angle | Check: R cos α and R sin α | |
|---|---|---|
| α = arctan(−4/3) ≈ −53.1° | 3 and −4 | wrong: gives 3 sin x − 4 cos x |
| α = 180° − 53.1° ≈ 126.9° | −3 and 4 | right |
Always check that R cos α has the sign of a and R sin α the sign of b. With the wrong α the curve is the right one upside down, and it looks just as reasonable.
Solving an equation with it
sin x + √3 cos x = 1. Here R = √(1 + 3) = 2 and tan α = √3, α = 60°, so the equation becomes
2 sin(x + 60°) = 1, that is sin(x + 60°) = 1/2.
The general solution gives x + 60° = 30° + n · 360° or x + 60° = 150° + n · 360°, and so x = −30° + n · 360° or x = 90° + n · 360°.
Common mistakes
- Taking α straight from the calculator when a is negative. Add 180° and check the signs.
- Swapping a and b in tan α. It is b/a — the cosine’s coefficient over the sine’s.
- Forgetting the root in R. R is √(a² + b²), not a² + b² and not a + b.
Common questions
Can it be written as a cosine instead?
Yes. a sin x + b cos x = R cos(x − β) with tan β = a/b. Both forms have the same amplitude R.
Why is it called harmonic form?
A sine curve describes a harmonic oscillation, and the form says that two oscillations with the same
period add up to one.

