A trigonometric function is a mathematical rule that relates the angles of a right triangle to the ratios of its side lengths, which in electrical theory translates directly into calculating alternating current (AC) waveforms, phase shifts, and power factor. When you move from DC to AC, voltage and current stop being flat lines and become rotating vectors; trig functions are the engine that tells you exactly where those vectors are at any given millisecond. In a real circuit, applying a trigonometric function changes how you calculate actual usable power, bridging the gap between the apparent power your breaker sees and the real power your motor turns into mechanical work.
The Core Mechanics: Sine, Cosine, and the AC Waveform
To understand the definition of a trigonometric function on the workbench, forget static triangles for a moment and think about a spinning wheel. Imagine a crankshaft rotating at 60 Hz (3,600 RPM). If you shine a light on the crank pin and project its shadow onto a wall, the shadow moves up and down in a smooth, continuous curve. That shadow's vertical position at any exact degree of rotation is defined by the sine function. Its horizontal position is defined by the cosine function.
In AC theory, we use this exact concept to map out voltage and current over time. A standard 120V RMS wall outlet isn't outputting a constant 120V; it's peaking at roughly 170V and sweeping through zero twice every cycle. The instantaneous voltage at any moment is calculated as:
V(t) = V_peak × sin(ωt + θ)
Here, the trigonometric function (sin) scales the peak voltage down to the exact instantaneous value based on the angle (ωt + θ). This is where the math meets the copper: if you are building a solid-state relay or an AC dimmer using an ESP32, you must use these functions to calculate the exact microsecond to trigger a TRIAC.
angle * (PI / 180) before passing it to sin() or cos(), or your firing angles will be completely wrong.
Standard Trig Values in AC Power
| Phase Angle (θ) | Sine (Reactive Ratio) | Cosine (Real Power Ratio) | Common Circuit Scenario |
|---|---|---|---|
| 0° | 0.000 | 1.000 | Pure resistive load (space heater, incandescent bulb) |
| 30° | 0.500 | 0.866 | Typical lightly loaded induction motor |
| 45° | 0.707 | 0.707 | Equal resistance and reactance (R = X_L) |
| 60° | 0.866 | 0.500 | Heavily loaded motor or large transformer inrush |
| 90° | 1.000 | 0.000 | Pure inductive/capacitive load (zero real work done) |
Worked Numeric Example: Calculating Real Power with Power Factor
Let's look at what the definition of a trigonometric function actually changes in a real installation. Suppose you are wiring a 1/2 HP pool pump motor. You clamp your meter around the hot wire and read 10 Amps. Your multimeter reads 120V RMS at the receptacle.
If this were a DC circuit, you'd multiply 120V × 10A and assume the motor is consuming 1,200 Watts. But this is an AC inductive load. The motor's magnetic field causes the current waveform to lag behind the voltage waveform. Let's say your power analyzer shows a phase angle (θ) of 30 degrees.
Here is where the cosine function does the heavy lifting:
- Apparent Power (S): 120V × 10A = 1,200 VA (Volt-Amps). This is what the breaker and wire sizing must handle.
- Power Factor (PF): We use the cosine function.
cos(30°) = 0.866. This means only 86.6% of the current is doing actual work. - Real Power (P): Apparent Power × cos(θ).
1,200 VA × 0.866 = 1,039.2 Watts. This is the actual mechanical work and heat generated. - Reactive Power (Q): We use the sine function to find the power sloshing back and forth in the magnetic field.
sin(30°) = 0.5.1,200 VA × 0.5 = 600 VAR(Volt-Amps Reactive).
Without the trigonometric function, you would have oversized your thermal management and misunderstood the motor's true efficiency. For a deeper dive into how these vectors interact, the All About Circuits textbook on AC power provides excellent phasor diagrams.
Where You Meet This in Practice
You might think trigonometry is confined to textbooks, but on the jobsite or the workbench, it dictates hardware choices constantly:
- Power Factor Correction (PFC): If an industrial facility is penalized by the utility for a low power factor (e.g., cos(θ) = 0.70), engineers use trig functions to calculate the exact microfarad (µF) rating of capacitor banks needed to shift the phase angle back toward zero, canceling out the inductive reactive power.
- AC Phase-Control Dimming: When programming a microcontroller to dim an AC light bulb using a TRIAC, you must calculate the "firing angle." If you want 50% power, you can't just trigger the TRIAC at the 90° mark of the sine wave. Because power is proportional to the square of the voltage, you must use the inverse trigonometric function (
acos) to find the exact RMS-equivalent delay time in microseconds. - Impedance Triangles: When designing an audio crossover filter, you use the tangent function (
tan) to calculate the phase shift introduced by capacitors and inductors at specific frequencies, ensuring the tweeter and woofer sum flatly at the crossover point.
Common Confusions: Angles vs. Functions and DC vs. AC Scaling
When learning the definition of a trigonometric function, hobbyists frequently trip over two specific conceptual hurdles.
Confusion 1: The Angle vs. The Function Output. Beginners often confuse the phase angle itself (e.g., 45°) with the result of the trig function (e.g., 0.707). The angle is just a position on the circle; the function output is the actual scaling ratio applied to your voltage or current. A 60° phase shift doesn't mean you lose 60% of your power; it means your power factor is cos(60°) = 0.50, so you lose 50% of your real power capacity.
Confusion 2: Linear DC Scaling vs. AC Trigonometry. In DC, if you want half the power, you halve the voltage (Ohm's Law). In AC, because the waveform is a curve defined by a trigonometric function, halving the conduction angle does not halve the RMS power. The area under a sine curve is non-linear. This is why simple AC dimmer code requires integral calculus or pre-calculated lookup tables based on trig functions, rather than simple linear mapping. For more on how AC waveforms map to real-world RMS values, see this guide on AC waveforms and RMS voltage.
Frequently Asked Questions
What is the definition of a trigonometric function when coding an ESP32 for AC dimming?
In embedded C++ for the ESP32 or Arduino, a trigonometric function is a built-in math library method (like sin(), cos(), or asin()) that takes a radian value and returns a floating-point ratio between -1.0 and 1.0. When coding an AC dimmer, you use the inverse cosine function (acos()) to translate a desired RMS power percentage into a specific phase angle, which you then convert to a microsecond delay to trigger your TRIAC gate. You can review the specific syntax in the official Arduino math reference.
How does the definition of a trigonometric function explain power factor in industrial motors?
The definition explains power factor by defining the cosine of the phase angle (θ) between the voltage and current waveforms. In an industrial motor, the inductive windings cause the current to lag the voltage. The cosine of this lag angle yields a decimal (e.g., 0.85) representing the fraction of the total apparent power (VA) that is actually converted into useful mechanical work (Watts). The remaining fraction, defined by the sine of the angle, is reactive power (VAR) that merely magnetizes the motor and heats up the utility's transmission lines.
Why do beginners confuse the definition of a trigonometric function with simple DC Ohm's law?
Beginners confuse them because DC circuits rely on linear, scalar math (V = I × R), where values are constant and directly proportional. The definition of a trigonometric function introduces non-linear, time-dependent vector math. In AC circuits, resistance becomes impedance (Z), and you cannot simply add resistive and inductive loads together arithmetically. You must use trigonometric functions to resolve them geometrically on an X-Y plane (the impedance triangle), which is a massive conceptual leap from basic DC breadboarding.






