A trigonometric function is a mathematical ratio that relates the angles of a right triangle to the lengths of its sides, used in electronics to model periodic waveforms, calculate phase shifts, and resolve AC power components. When you transition from simple DC circuits to alternating current, RF signals, or microcontroller waveform generation, trigonometry changes exactly how you calculate real power delivery, size reactive components like capacitors and inductors, and time your digital interrupts.
The Core Definition (and What It Actually Changes)
In mathematics, sine, cosine, and tangent map angles to side ratios. In electrical engineering, we map those angles to a rotating vector (a phasor) or a point in time on a periodic wave. The most common application is the AC sine wave, where the instantaneous voltage at any given millisecond is determined by the sine of the generator's rotational angle.
What it changes in a real circuit: Trigonometry dictates the difference between the power your utility bills you for (Real Power, measured in Watts) and the power your wires must actually carry (Apparent Power, measured in Volt-Amps). Without applying the cosine function to your voltage and current phase angles, you cannot accurately size breakers, calculate voltage drop, or correct power factor in industrial or heavy-residential loads.
Where You Meet Trigonometry in Practice
You will rarely sit down with a scientific calculator to find the hypotenuse of a physical triangle on the jobsite. Instead, you meet these functions in three specific electrical domains:
- AC Power Analysis (Power Factor): The cosine of the phase angle (θ) between voltage and current gives you the Power Factor (PF). A PF of 0.8 means cos(θ) = 0.8, indicating a 36.8-degree phase shift caused by inductive or capacitive loads.
- 3-Phase Motor Wiring: Three-phase systems are offset by exactly 120 electrical degrees. To calculate line-to-line voltage from line-to-neutral voltage (e.g., getting 208V from a 120V wye system), you use trigonometric vector addition: VL-L = 2 × VL-N × cos(30°).
- Microcontroller Signal Generation: If you are programming an ESP32 or STM32 to output a synthesized audio tone or a pure sine wave via PWM, you must populate a lookup table using the sine function to dictate the duty cycle at each time step.
Worked Example: Sizing a Power Factor Correction Capacitor
Let's apply trigonometry to a real-world problem: correcting the power factor of a single-phase induction motor to avoid utility penalty fees and reduce line current.
Step 1: Find Apparent and Real Power
Apparent Power (S) = 120V × 12A = 1440 VA.
Real Power (P) = S × cos(θ1) = 1440 × 0.75 = 1080 Watts.
Step 2: Calculate Original Reactive Power (Q1)
The original phase angle θ1 = arccos(0.75) = 41.4°.
Original Reactive Power (Q1) = S × sin(41.4°) = 1440 × 0.661 = 952 VAR.
Step 3: Calculate Target Reactive Power (Q2)
The target phase angle θ2 = arccos(0.95) = 18.2°.
Target Reactive Power (Q2) = P × tan(18.2°) = 1080 × 0.329 = 355 VAR.
Step 4: Size the Capacitor
The capacitor must supply the difference in reactive power: Qc = Q1 - Q2 = 952 - 355 = 597 VAR.
Capacitive Reactance (Xc) = V2 / Qc = 1202 / 597 = 24.1 Ω.
Capacitance (C) = 1 / (2 × π × f × Xc) = 1 / (377 × 24.1) = 0.000110 Farads.
The Concrete Pick: You need a 110μF, 250VAC motor run capacitor (such as a Genteq or Dayton brand oval run cap) wired in parallel with the motor windings. For a deep dive into the underlying AC formulas, refer to the Electronics Tutorials AC Formulas guide.
The Decision Tree: Which Function to Use When
When analyzing a circuit or writing firmware, use this decision path to select the correct mathematical tool and physical component.
| If you need to calculate... | Use this Function | Formula / Code Implementation | Concrete Pick / Tool |
|---|---|---|---|
| Instantaneous voltage at time t | Sine | v(t) = V_peak * sin(2 * pi * f * t) |
Rigol DS1054Z Oscilloscope (to verify the waveform) |
| Real Power (Watts) from Apparent Power (VA) | Cosine | P = V * I * cos(theta) |
Fluke 1730 Three-Phase Power Logger (measures PF directly) |
| Reactive Power (VAR) or sizing correction caps | Tangent / Sine | Q = P * tan(acos(PF)) |
110μF 250VAC Motor Run Capacitor (from worked example) |
| Generating a PWM sine lookup table in C++ | Sine (Radians) | sin(i * 2 * PI / TABLE_SIZE) |
ESP32 DevKit V1 using math.h and LEDC peripheral |
Common Confusions to Avoid on the Bench
Even experienced makers trip over specific trigonometric edge cases when moving from theory to the workbench.
sin() and cos() functions in math.h (used on Arduino, ESP32, and Raspberry Pi Pico) expect radians, not degrees. Passing sin(90) will not yield 1.0; it yields 0.893. You must convert using radians = degrees * (PI / 180.0).
Peak vs. RMS Confusion: People often confuse the amplitude of the trigonometric sine wave (Peak Voltage) with the effective heating value (RMS). A standard US wall outlet is 120V RMS. The trigonometric peak of that wave is actually 170V (120 × 1.414). If you are selecting a TVS diode or varistor for surge protection, you must size it based on the peak trigonometric value, not the RMS multimeter reading.
Leading vs. Lagging Phase: In AC theory, current can lead voltage (capacitive circuits) or lag voltage (inductive circuits). The mnemonic ELI the ICE man helps: in an inductor (L), Voltage (E) leads Current (I); in a capacitor (C), Current (I) leads Voltage (E). The cosine function yields a positive Power Factor for both, so you must track the sign of the phase angle (positive or negative) to know whether to add capacitance or inductance to correct it. For more on true, reactive, and apparent power relationships, see the All About Circuits AC Power chapter.
FAQ: Trigonometric Functions in Electronics
Why do we use RMS instead of the peak value of the sine wave for power calculations?
Because the average value of a pure sine wave over a full cycle is exactly zero (the positive and negative trigonometric halves cancel out). RMS (Root Mean Square) squares the values, averages them, and takes the square root, yielding a DC-equivalent value that accurately predicts resistive heating and real work done.
Do I need to memorize the unit circle for PCB layout?
No. For standard PCB layout, you rely on impedance calculators and CAD tools. However, if you are designing RF matching networks, antenna phasing lines, or active analog filters, you will frequently use the unit circle to calculate phase margins and ensure your op-amps do not oscillate due to a 180-degree phase shift at the unity-gain crossover frequency.
Can I just use a power meter instead of doing the trig math?
Yes, for verification. A tool like a Kill-A-Watt or a Fluke power analyzer will calculate the cosine of the phase angle internally and display the Power Factor directly. However, you still need the trigonometric math to calculate the exact microfarad rating of the capacitor required to fix a bad power factor reading.






