Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Harmonic Addition Calculator (a sin θ + b cos θ as R sin(θ + α), with Max and Min)

Enter the coefficients a and b of the expression a sin θ + b cos θ. The formula below is linked to the input fields, so you can also edit the coefficients in it directly.

Decimals, negative numbers, fractions such as 3/4 and values with square roots such as √3, √3/2 or 2√3 are all fine (in the formula below, typing sqrt gives √). A blank coefficient counts as 1 (sin θ means 1 sin θ).
Result and graph
Enter the coefficients of sin θ and cos θ in the fields on the left and press "Calculate". The result and a graph will appear here.

What you can do on this page

  • Rewrites an expression of the form \(a\sin\theta + b\cos\theta\) as a single sine wave \(R\sin(\theta + \alpha)\) (harmonic addition)
  • The amplitude \(R = \sqrt{a^{2} + b^{2}}\) is shown both as a simplified exact value such as \(\sqrt{2}\) and as a decimal. The angle \(\alpha\) is shown as an exact fraction of π when it is a special angle such as \(\dfrac{\pi}{4}\). Otherwise it is shown by the exact values of \(\cos\alpha\) and \(\sin\alpha\), with approximate values in radians and degrees
  • The cosine form \(R\cos(\theta - \beta)\) is shown too (when to use which form is explained below)
  • Also finds the maximum \(R\) and the minimum \(-R\) and the values of \(\theta\) where they occur (a classic exam question)
  • Coefficients can be whole numbers, decimals, fractions, or values with square roots such as √3 or √3/2. A graph shows the two original waves, the combined wave and its amplitude
This works for \(\sin\theta\) and \(\cos\theta\) of the same angle \(\theta\), each to the first power (\(a\sin\theta + b\cos\theta\)). Terms with different angles, such as \(\sin 2\theta\) and \(\cos\theta\), or squared terms such as \(\sin^{2}\theta\), cannot be combined this way.

What is this calculation used for?

Combining voltage and current waves in AC circuits (electricity)

The alternating current at a household outlet in the US is a voltage that swings back and forth as a sine wave 60 times a second. In circuit calculations, coils and capacitors shift the waves, and their sum appears in the form \(a\sin\theta + b\cos\theta\). Combining it tells you what single wave you really have: its amplitude (the peak voltage) and how far its phase is shifted.
This calculation is a standard part of electrical engineering courses and exams such as the FE (Fundamentals of Engineering) exam.

Adding sounds of the same pitch (sound and acoustics)

Sound is a wave of vibrating air. When two sounds of the same pitch (the same frequency) overlap, the sum of their wave equations combines into one wave. The larger the combined amplitude \(R\), the louder the sound. When the waves are in step (in phase), they reinforce each other. When they are opposite, they cancel out.
Noise-canceling headphones reduce noise by playing a wave opposite to the noise, which is based on this idea of adding waves.

Analyzing the shaking of buildings and machines (earthquake and vibration engineering)

When analyzing earthquakes or machine vibrations, engineers often split the motion into a sine part and a cosine part, calculate each, and combine them at the end to find the actual size of the shaking (the amplitude). When the motion can be treated as a simple vibration with one period, the largest movement is estimated as the combined amplitude \(R\).
Real earthquake waves are a complex mix of many periods, but the basis of their analysis is this adding of sine waves.

Why cell signal strength changes from place to place (communications)

A smartphone receives the radio wave that comes straight from the cell tower overlapped with waves reflected off buildings and other objects. Waves of the same frequency combine into one wave, and depending on the difference in their paths they reinforce or weaken each other (this is called fading).
Moving just a little can change the number of signal bars because this combined amplitude is different from place to place.

Formulas and graphs

Harmonic addition (writing it as a sine)
Graph
Standard notation (the usual math form)
\(a\sin\theta\) \(+\) \(b\cos\theta\) \(=\) \(R\sin(\theta + \alpha)\)
In words (symbols replaced with words)
① \(a\sin\theta\): the \(\sin\theta\) term with coefficient \(a\) \(+\) ② \(b\cos\theta\): the \(\cos\theta\) term with coefficient \(b\) \(=\) ③ \(R\sin(\theta + \alpha)\): one sine wave with amplitude \(R\) and angle \(\alpha\)
The formula in words
① The sum of the \(\sin\theta\) term with coefficient \(a\)
② and the \(\cos\theta\) term with coefficient \(b\)
③ can be written as one sine wave with amplitude \(R\) and angle \(\alpha\)
Quick example
Combining \(\sin\theta + \cos\theta\) (\(a = 1,\ b = 1\)):
\(\sin\theta\) term (coefficient 1) \(+\) \(\cos\theta\) term (coefficient 1) \(=\) sine wave with amplitude \(\sqrt{2}\) and angle \(\dfrac{\pi}{4}\)
\(R = \sqrt{1^{2} + 1^{2}} = \sqrt{2}\)
\(\cos\alpha = \dfrac{1}{\sqrt{2}},\ \ \sin\alpha = \dfrac{1}{\sqrt{2}} \ \Rightarrow\ \alpha = \dfrac{\pi}{4}\)
\(\sin\theta + \cos\theta = \sqrt{2}\,\sin\left(\theta + \dfrac{\pi}{4}\right)\)
Key idea
When sin and cos are mixed in one expression, you cannot easily tell when it is largest or what range of values it takes. Harmonic addition rewrites the two waves as one sine wave with amplitude \(R\), shifted by the angle \(\alpha\), so you can see what the expression really is. It works because of the angle addition formula \(\sin(\theta + \alpha) = \sin\theta\cos\alpha + \cos\theta\sin\alpha\), used backward, from right to left. If you think of \(a\) in \(a\sin\theta + b\cos\theta\) as \(R\cos\alpha\) and \(b\) as \(R\sin\alpha\), the whole expression folds into \(R\sin(\theta + \alpha)\). You can also write it as a cosine, \(R\cos(\theta - \beta)\). Both are correct. Precalculus books often use the sine form, while physics and electrical engineering often use the cosine form. If a problem asks for "the form \(R\sin(\theta + \alpha)\)" or "the form \(R\cos(\theta - \beta)\)", use that form.
How to find the amplitude \(R\) and the angle \(\alpha\)
Standard notation (the usual math form)
\(R\) \(=\) \(\sqrt{a^{2} + b^{2}}\)
\(\cos\alpha\) \(=\) \(\dfrac{a}{R}\)
\(\sin\alpha\) \(=\) \(\dfrac{b}{R}\)
In words (symbols replaced with words)
② \(R\): amplitude (the height of the combined wave) \(=\) ① \(\sqrt{a^{2} + b^{2}}\): square root of the sum of the squares of \(a\) and \(b\)
\(\cos\alpha\): cosine of angle \(\alpha\) \(=\) ③ \(\dfrac{a}{R}\): coefficient \(a\) of \(\sin\theta\) divided by the amplitude \(R\)
\(\sin\alpha\): sine of angle \(\alpha\) \(=\) ④ \(\dfrac{b}{R}\): coefficient \(b\) of \(\cos\theta\) divided by the amplitude \(R\)
The formula in words
① Square the coefficients \(a\) and \(b\), add them and take the square root. This \(\sqrt{a^{2} + b^{2}}\)
② is the amplitude \(R\)
③ Then choose the angle \(\alpha\) so that the coefficient \(a\) divided by the amplitude \(R\) is its cosine
④ and the coefficient \(b\) divided by the amplitude \(R\) is its sine
Quick example
For \(\sqrt{3}\sin\theta + \cos\theta\) (\(a = \sqrt{3},\ b = 1\)):
amplitude \(R = 2\) \(=\) square root of the sum of the squares of \(\sqrt{3}\) and \(1\), \(\sqrt{4}\)
\(R = \sqrt{\left(\sqrt{3}\right)^{2} + 1^{2}} = \sqrt{3 + 1} = \sqrt{4} = 2\)
\(\cos\alpha = \dfrac{\sqrt{3}}{2},\ \ \sin\alpha = \dfrac{1}{2} \ \Rightarrow\ \alpha = \dfrac{\pi}{6}\)
\(\sqrt{3}\sin\theta + \cos\theta = 2\sin\left(\theta + \dfrac{\pi}{6}\right)\)
Key idea
The amplitude \(R = \sqrt{a^{2} + b^{2}}\) is the distance from the origin to the point \((a,\ b)\) on the coordinate plane, which is the Pythagorean theorem itself. If you plot the point \((a,\ b)\), \(\alpha\) is the angle between the \(x\)-axis and the arrow from the origin to \((a,\ b)\). If you are unsure, plot the point \((a,\ b)\) and read off the distance and the angle. It is important to check both \(\cos\alpha\) and \(\sin\alpha\). One alone does not pin down the angle (for example, \(\cos\alpha = \dfrac{1}{2}\) alone leaves two choices, \(\alpha = \dfrac{\pi}{3}\) and \(-\dfrac{\pi}{3}\)). \(\alpha\) is a special angle such as \(\dfrac{\pi}{6}\) or \(\dfrac{\pi}{4}\) only when the pair of coefficients has a special form, such as \((1,\ 1)\) or \((\sqrt{3},\ 1)\). If it is not a special angle, write it as a condition, such as "the angle \(\alpha\) with \(\cos\alpha = \dfrac{3}{5},\ \sin\alpha = \dfrac{4}{5}\)" (this calculator shows it the same way).
Maximum and minimum of the combined expression
Graph
Standard notation (the usual math form)
\(-R\) \(\le\) \(a\sin\theta + b\cos\theta\) \(\le\) \(R\)
In words (symbols replaced with words)
② \(-R\): minimum \(\le\) ① \(a\sin\theta + b\cos\theta\): the expression (\(= R\sin(\theta + \alpha)\)) \(\le\) ③ \(R\): maximum
The formula in words
① The value of the expression \(a\sin\theta + b\cos\theta\)
② moves between the minimum \(-R\)
③ and the maximum \(R\) (as \(\theta\) takes every real value)
Quick example
For \(3\sin\theta + 4\cos\theta\) (\(R = \sqrt{3^{2} + 4^{2}} = 5\)):
minimum \(-5\) \(\le\) \(3\sin\theta + 4\cos\theta\) \(\le\) maximum \(5\)
\(R = \sqrt{3^{2} + 4^{2}} = \sqrt{25} = 5\)
\(-5 \le 3\sin\theta + 4\cos\theta \le 5\)
Key idea
After combining, \(a\sin\theta + b\cos\theta = R\sin(\theta + \alpha)\). A sine is always between \(-1\) and \(1\), so the whole expression can only take values from \(-R\) to \(R\). The classic exam question "find the maximum and minimum of an expression that mixes sin and cos" is solved in this one line once you can combine. The maximum occurs when \(\sin(\theta + \alpha) = 1\), that is, when \(\theta + \alpha = \dfrac{\pi}{2} + 2n\pi\) (\(n\) is an integer), so \(\theta = \dfrac{\pi}{2} - \alpha + 2n\pi\). The minimum occurs where the sine is \(-1\), at \(\theta = -\dfrac{\pi}{2} - \alpha + 2n\pi\). If \(\theta\) is restricted (such as \(0 \le \theta < 2\pi\)), first find the range of \(\theta + \alpha\), then look for the angles in that range where the sine is largest and smallest. Note that the maximum or minimum can also occur at an end of the range.
Harmonic addition rewrites \(a\sin\theta + b\cos\theta\) as one sine wave \(R\sin(\theta + \alpha)\) with amplitude \(R = \sqrt{a^{2} + b^{2}}\) and angle \(\alpha\) (\(\cos\alpha = \dfrac{a}{R},\ \sin\alpha = \dfrac{b}{R}\)). Once combined, you can read off the maximum \(R\) and the minimum \(-R\) right away.

Symbols and terms

Symbols

\(a,\ b\) a, b The coefficients of the expression. \(a\) is the number in front of \(\sin\theta\), and \(b\) is the number in front of \(\cos\theta\). By custom, letters from the start of the alphabet, \(a,\ b,\ c\), are used for fixed numbers.
\(\theta\) theta A Greek letter often used for angles. It is not the Greek word for "angle"; it simply became the custom to use it for angles. On this page, it is the angle that varies in the expression.
\(R\) R The amplitude (height) of the combined sine wave. The letter is said to come from "radius". It equals \(\sqrt{a^{2} + b^{2}}\), the distance from the origin to the point \((a,\ b)\), and it is the maximum value of the expression.
\(\alpha\) alpha The angle of the shift in the sine form. It is the first letter of the Greek alphabet, following the custom of naming extra angles with Greek letters. It equals the angle between the \(x\)-axis and the arrow from the origin to the point \((a,\ b)\).
\(\beta\) beta The angle of the shift in the cosine form, the second letter of the Greek alphabet. \(\beta = \dfrac{\pi}{2} - \alpha\) (angles that differ by \(2\pi\), one full turn, are in the same position, so \(2\pi\) may be added or subtracted to keep \(-\pi < \beta \le \pi\)).
\(\sin\) sine One of the trig functions, short for sine. On the unit circle, \(\sin\theta\) is the \(y\)-coordinate of the point at angle \(\theta\).
\(\cos\) cosine One of the trig functions, short for cosine. On the unit circle, \(\cos\theta\) is the \(x\)-coordinate of the point at angle \(\theta\).
\(\pi\) pi Pi (about 3.14). In radians, \(\pi\) is exactly 180°, so \(\dfrac{\pi}{4}\) is 45° and \(\dfrac{\pi}{6}\) is 30°.
\(2n\pi\) two n pi A way to write "an integer multiple of \(2\pi\) (one full turn)". \(n\) is an integer (from "number"). An angle comes back to the same position after every full turn (\(2\pi\)), so there are infinitely many \(\theta\) that give the maximum or minimum, spaced \(2\pi\) apart.
\(\sqrt{\phantom{2}}\) square root The square root sign (radical sign). \(\sqrt{2}\) is the positive number whose square is 2. It appears in the amplitude \(R = \sqrt{a^{2} + b^{2}}\).
\(\le\) less than or equal to The inequality sign for "less than or equal to". \(-R \le f(\theta) \le R\) means that \(f(\theta)\) is at least \(-R\) and at most \(R\).

Terms

harmonic addition Rewriting an expression of the form \(a\sin\theta + b\cos\theta\) as one sine wave \(R\sin(\theta + \alpha)\). It works by using the angle addition formula backward. In the US, it usually comes up in Precalculus, often without a special name ("write as a single sine function").
sine wave A wave that rises and falls smoothly again and again, like the graph of \(y = \sin\theta\). Also called a sinusoid. Many waves around us, such as sound, light and alternating current, have this shape.
amplitude The "height" of a wave: the distance from the center of the wave (0 on this page) to its highest point. The amplitude of \(y = R\sin(\theta + \alpha)\) is \(R\), and the wave swings between \(-R\) and \(R\).
period The length it takes a wave to complete one full cycle and start over. The period of \(\sin\theta\) is \(2\pi\) (360°), and combining does not change it.
phase shift How far a wave is shifted sideways. \(R\sin(\theta + \alpha)\) is the wave \(R\sin\theta\) shifted \(\alpha\) to the left, and this shift is called the phase shift.
angle addition formula A formula such as \(\sin(\theta + \alpha) = \sin\theta\cos\alpha + \cos\theta\sin\alpha\) that writes a trig function of a sum of two angles in terms of trig functions of each angle. Also called the sum formula. Harmonic addition uses it backward, from right to left.
special angle An angle such as \(30°\) (\(\dfrac{\pi}{6}\)), \(45°\) (\(\dfrac{\pi}{4}\)) or \(60°\) (\(\dfrac{\pi}{3}\)) whose trig values are simple exact values such as \(\dfrac{1}{2}\) or \(\dfrac{\sqrt{3}}{2}\). Textbook and exam problems on this topic are almost always built so that \(\alpha\) is a special angle.
radian The unit that measures an angle by the arc length on a circle of radius 1. \(180° = \pi\) radians, so \(45°\) is \(\dfrac{\pi}{4}\). For trig functions from Precalculus on, radians are standard rather than degrees.
unit circle The circle of radius 1 centered at the origin. The point on it at angle \(\theta\) has coordinates \((\cos\theta,\ \sin\theta)\), which makes it a tool for seeing the values of trig functions.
maximum The largest value a function can take. In \(R\sin(\theta + \alpha)\), the sine goes no higher than \(1\), so the maximum \(R\) is clear right away.
minimum The smallest value a function can take. In \(R\sin(\theta + \alpha)\), the sine goes no lower than \(-1\), so the minimum \(-R\) is clear right away.
quadrant One of the four regions the \(x\)-axis and \(y\)-axis divide the coordinate plane into. The upper right is Quadrant I, and Quadrants II, III and IV follow counterclockwise. Which quadrant the angle (the point on the unit circle) is in decides the signs of \(\cos\) and \(\sin\).

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back to these topics is the fastest way forward.

Working with square roots (Grade 8 and Algebra 1)
  • Knowing that \(\sqrt{2}\) is the positive number whose square is 2, and being able to simplify, as in \(\sqrt{4} = 2\) and \(\sqrt{8} = 2\sqrt{2}\)
  • Being able to rationalize a denominator, as in \(\dfrac{1}{\sqrt{2}} = \dfrac{\sqrt{2}}{2}\)
The Pythagorean theorem (Grade 8)
  • Knowing that the hypotenuse of a right triangle is \(\sqrt{a^{2} + b^{2}}\) (the formula for the amplitude \(R\) is this theorem itself)
Right triangle trigonometry (Geometry)
  • Knowing what \(\sin\) and \(\cos\) are, and finding the values for special angles, such as \(\sin 30° = \dfrac{1}{2}\) and \(\cos 45° = \dfrac{\sqrt{2}}{2}\)
The unit circle and radians (Algebra 2 and Precalculus)
  • Knowing that a point on the unit circle has coordinates \((\cos\theta,\ \sin\theta)\), and reading trig values for negative angles and angles over 90°
  • Being able to give angles in radians (\(180° = \pi\)), for example \(45° = \dfrac{\pi}{4}\)
Graphs of trig functions (Algebra 2 and Precalculus)
  • Being able to sketch the graph of \(y = \sin\theta\) (its wave shape, amplitude 1 and period \(2\pi\))
  • Knowing that \(y = \sin(\theta + \alpha)\) is the graph of \(y = \sin\theta\) shifted sideways by \(\alpha\)
Angle addition formulas (Precalculus)
  • Remembering \(\sin(\theta + \alpha) = \sin\theta\cos\alpha + \cos\theta\sin\alpha\) and being able to go either way between the two sides (harmonic addition uses it backward)

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find the amplitude R and the angle α
Coefficient a of sin θ 1
Coefficient b of cos θ 1
Amplitude R =SQRT(B1^2+B2^2)
Angle α (radians) =ATAN2(B1,B2)
Angle α (degrees) =DEGREES(B4)
Table for the cosine form (angle β)
Coefficient a of sin θ 1
Coefficient b of cos θ 1
Amplitude R =SQRT(B1^2+B2^2)
Angle β (radians) =ATAN2(B2,B1)
Angle β (degrees) =DEGREES(B4)
Table to find the maximum, the minimum and the θ of the maximum
Coefficient a of sin θ 3
Coefficient b of cos θ 4
Amplitude R =SQRT(B1^2+B2^2)
Maximum =B3
Minimum =-B3
θ of the maximum (radians) =PI()/2-ATAN2(B1,B2)
After pasting, the top rows (the coefficients) are your inputs and the rows below are calculated automatically.
"^" is a power, SQRT is the square root, and ATAN2(x, y) returns the angle in the direction of the point (x, y). α is the direction of the point (a, b), so it is =ATAN2(B1,B2), while β is the direction of the point (b, a), so it is =ATAN2(B2,B1). Watch out for the swapped order of the arguments.
The first table is for sin θ + cos θ: R is 1.41421… (= √2) and α is 0.78539… (= π/4) = 45°.
The third table is for 3 sin θ + 4 cos θ: the maximum is 5, the minimum is −5, and the maximum occurs at θ = 0.64350… (radians).

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find the amplitude R and the angle α
Coefficient a of sin θ 1
Coefficient b of cos θ 1
Amplitude R =SQRT(B1^2+B2^2)
Angle α (radians) =ATAN2(B1,B2)
Angle α (degrees) =DEGREES(B4)
Table for the cosine form (angle β)
Coefficient a of sin θ 1
Coefficient b of cos θ 1
Amplitude R =SQRT(B1^2+B2^2)
Angle β (radians) =ATAN2(B2,B1)
Angle β (degrees) =DEGREES(B4)
Table to find the maximum, the minimum and the θ of the maximum
Coefficient a of sin θ 3
Coefficient b of cos θ 4
Amplitude R =SQRT(B1^2+B2^2)
Maximum =B3
Minimum =-B3
θ of the maximum (radians) =PI()/2-ATAN2(B1,B2)
The same formulas as in Excel work as is. Copy the whole table, paste it into cell A1, and replace the coefficients with your own numbers.

How to calculate it in Python

import math

sin_coefficient = 1   # a (coefficient of sin θ)
cos_coefficient = 1   # b (coefficient of cos θ)

# Amplitude R = √(a² + b²) (hypot returns the square root of the sum of squares)
amplitude = math.hypot(sin_coefficient, cos_coefficient)
# Angle α (the direction of the point (a, b), in radians)
alpha = math.atan2(cos_coefficient, sin_coefficient)

print(f"Amplitude R = {amplitude}")
print(f"Angle α = {alpha} radians = {math.degrees(alpha)} degrees")
print(f"Maximum = {amplitude}, minimum = {-amplitude}")
print(f"θ of the maximum = {math.pi / 2 - alpha} radians (+ 2nπ)")
Runs with just the math module from the standard library. This example combines sin θ + cos θ. Running it prints the amplitude 1.4142… (= √2) and the angle 0.7853… radians (= π/4 = 45 degrees). It cannot give exact values such as √2 themselves, so use the calculator on this page when you need the exact form. Change the coefficients and run it again.

How to write it in LaTeX and other math languages (copy and paste)

Harmonic addition (writing it as a sine)
a·sinθ + b·cosθ = R·sin(θ + α)
a\sin\theta + b\cos\theta = R\sin(\theta + \alpha)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>a</mi><mo>&#x2062;</mo><mi>sin</mi><mo>&#x2061;</mo><mi>&#x3B8;</mi>
    <mo>+</mo>
    <mi>b</mi><mo>&#x2062;</mo><mi>cos</mi><mo>&#x2061;</mo><mi>&#x3B8;</mi>
    <mo>=</mo>
    <mi>R</mi><mo>&#x2062;</mo><mi>sin</mi><mo>&#x2061;</mo>
    <mo>(</mo><mi>&#x3B8;</mi><mo>+</mo><mi>&#x3B1;</mi><mo>)</mo>
  </mrow>
</math>
a sin(theta) + b cos(theta) = R sin(theta + alpha)
a Sin[t] + b Cos[t] == Sqrt[a^2 + b^2] Sin[t + ArcTan[a, b]]
a*sin(theta) + b*cos(theta) = sqrt(a^2 + b^2)*sin(theta + arctan(b, a));
R = sqrt(a^2 + b^2); alpha = atan2(b, a); f = R*sin(theta + alpha);
a sin(θ) + b cos(θ) = R sin(θ + α)
How to find the amplitude \(R\) and the angle \(\alpha\)
R = √(a² + b²),  cosα = a/R,  sinα = b/R
R = \sqrt{a^{2} + b^{2}},\quad \cos\alpha = \frac{a}{R},\quad \sin\alpha = \frac{b}{R}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>R</mi><mo>=</mo>
    <msqrt><mrow><msup><mi>a</mi><mn>2</mn></msup><mo>+</mo><msup><mi>b</mi><mn>2</mn></msup></mrow></msqrt>
    <mo>,</mo>
    <mi>cos</mi><mo>&#x2061;</mo><mi>&#x3B1;</mi><mo>=</mo>
    <mfrac><mi>a</mi><mi>R</mi></mfrac>
    <mo>,</mo>
    <mi>sin</mi><mo>&#x2061;</mo><mi>&#x3B1;</mi><mo>=</mo>
    <mfrac><mi>b</mi><mi>R</mi></mfrac>
  </mrow>
</math>
R = sqrt(a^2 + b^2), cos(alpha) = a/R, sin(alpha) = b/R
R = Sqrt[a^2 + b^2]; alpha = ArcTan[a, b]
R := sqrt(a^2 + b^2); alpha := arctan(b, a);
R = sqrt(a^2 + b^2); alpha = atan2(b, a);
R = √(a^2 + b^2), cos(α) = a/R, sin(α) = b/R
Maximum and minimum of the combined expression
−R ≤ a·sinθ + b·cosθ ≤ R
-R \le a\sin\theta + b\cos\theta \le R
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mo>&#x2212;</mo><mi>R</mi>
    <mo>&#x2264;</mo>
    <mi>a</mi><mo>&#x2062;</mo><mi>sin</mi><mo>&#x2061;</mo><mi>&#x3B8;</mi>
    <mo>+</mo>
    <mi>b</mi><mo>&#x2062;</mo><mi>cos</mi><mo>&#x2061;</mo><mi>&#x3B8;</mi>
    <mo>&#x2264;</mo>
    <mi>R</mi>
  </mrow>
</math>
-R <= a sin(theta) + b cos(theta) <= R
MaxValue[a Sin[t] + b Cos[t], t]
maximize(a*sin(theta) + b*cos(theta), theta = 0 .. 2*Pi);
[tmin, fneg] = fminbnd(@(t) -(a*sin(t) + b*cos(t)), 0, 2*pi); fmax = -fneg;
−R ≤ a sin(θ) + b cos(θ) ≤ R

How to have ChatGPT  do the calculation

You are a math calculation assistant for trigonometric functions. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

Write 3 sin θ + 4 cos θ in the form R sin(θ + α).
Show each of the following:
1. The amplitude R (also as an exact value with a square root, if it can be written that way)
2. The values of cos α and sin α (as fractions), and approximate values of α (both in radians and degrees)
3. The maximum and minimum of this expression, and the θ where it is largest (in radians)

In Python, use math.hypot and math.atan2. Show the formulas you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.