1 Foundations – Angles, Degrees, Radians, Unit Circle
An angle measures rotation. Degrees are historical (360° = full turn). Radians are natural: one radian is the angle that subtends an arc equal to the radius. Therefore:
The unit circle is x2 + y2 = 1. For an angle θ from the positive x-axis, the point where the ray meets the circle is defined as:
Thus cos θ is the horizontal coordinate, sin θ is the vertical. The tangent is the slope: tan θ = sin θ / cos θ. Geometrically it is the length of the tangent segment at (1,0) up to the extended radius.
This definition works for any angle, not just acute triangles, and immediately gives periodicity and signs in quadrants.
% GNU Octave: unit circle
theta = linspace(0, 2*pi, 400);
plot(cos(theta), sin(theta), 'LineWidth', 2); axis equal; grid on;
xlabel('cos \theta'); ylabel('sin \theta'); title('Unit Circle');
2 Right Triangles – SOHCAHTOA
For a right triangle with acute angle θ:
Squaring and adding gives the first Pythagorean identity:
Drag the angle in the demo. The hypotenuse stays fixed, showing how sine grows as the angle opens.
% GNU Octave: solve right triangle
theta = 30 * pi/180; % radians
hyp = 1;
opp = hyp * sin(theta);
adj = hyp * cos(theta);
printf('sin=%.4f cos=%.4f tan=%.4f\n', opp/hyp, adj/hyp, opp/adj);
3 Graphs of Trig Functions
Sin and cos are waves of period 2π, amplitude 1. Tangent repeats every π with vertical asymptotes where cos=0. Sec = 1/cos, csc = 1/sin, cot = 1/tan inherit asymptotes.
General form
A scales height, B compresses horizontally (period = 2π/B for sin/cos), C shifts left/right.
| Function | Period | Zeros |
|---|---|---|
| sin x, cos x | 2π | sin at kπ, cos at π/2+kπ |
| tan x, cot x | π | tan at kπ |
| sec x, csc x | 2π | none (asymptotes) |
% GNU Octave: parameterized wave
x = -2*pi:0.01:2*pi;
A = 2; B = 1.5; C = pi/4;
y = A * sin(B*x + C);
plot(x,y); grid on; xlabel('x'); ylabel('y');
4 Identities
Pythagorean
- sin2a + cos2a = 1
- 1 + tan2a = sec2a
- 1 + cot2a = csc2a
Sum / Difference
- sin(a±b) = sin a cos b ± cos a sin b
- cos(a±b) = cos a cos b ∓ sin a sin b
- tan(a+b) = (tan a + tan b)/(1 - tan a tan b)
Double-angle
- sin 2a = 2 sin a cos a
- cos 2a = cos2a - sin2a
- cos 2a = 2cos2a -1 = 1-2sin2a
% GNU Octave: verify sum identity numerically
a = 0.7; b = 1.2;
lhs = sin(a+b);
rhs = sin(a)*cos(b) + cos(a)*sin(b);
abs(lhs - rhs) % ~1e-16
5 Inverse Trigonometric Functions
Since sin, cos, tan are periodic, we restrict domains to make inverses single-valued (principal branches):
- arcsin x: domain [-1,1], range [-π/2, π/2]
- arccos x: domain [-1,1], range [0, π]
- arctan x: domain ℝ, range (-π/2, π/2)
The diagram shows y = sin θ. For a given y, arcsin picks the unique θ in the right half of the unit circle. This restriction is why calculators return only one angle.
% GNU Octave: inverses
x = 0.5;
asin(x) % 0.5236
acos(x) % 1.0472
atan(10) % 1.4711
6 Calculus of Trig Functions
Derivatives
Using limh→0 sin h / h = 1 and lim (cos h -1)/h = 0:
Proof sketch for sin: sin(x+h)-sin x = sin x(cos h -1)+cos x sin h. Divide by h, take limits → cos x.
Integrals
Chain rule
% GNU Octave: symbolic calculus (pkg load symbolic)
pkg load symbolic
syms x
diff(sin(x)) % cos(x)
diff(cos(x)) % -sin(x)
diff(tan(x)) % 1 + tan(x)^2
int(sin(x)) % -cos(x)
int(cos(x)) % sin(x)
int(sec(x)^2) % tan(x)
7 Applications in Calculus – Harmonic Motion
Simple harmonic motion solves y'' + ω2y = 0. The characteristic equation r2+ω2=0 gives r=±iω, so:
Mass-spring systems, pendulums (small angles), AC circuits, and sound waves all follow this. Trig functions are eigenfunctions of the second derivative, which makes Fourier series possible.
For y'' + y = 0 with y(0)=1, y'(0)=0, the unique solution is y = cos t. Check: y' = -sin t, y'' = -cos t = -y.
% GNU Octave: solve y'' + y = 0 numerically
t = 0:0.01:10;
y = cos(t); % analytic
plot(t,y); grid on; title('Simple Harmonic Motion');
8 Mathematics and Cryptography of Trigonometry
Chebyshev polynomials
Define Tn(x) = cos(n·arccos x) for x∈[-1,1]. Then:
Key property – composition commutes:
This mimics exponentiation: (gn)m = gnm. In the 1990s, researchers proposed a Diffie-Hellman-like key exchange: public x, Alice sends A = Ta(x), Bob sends B = Tb(x), shared secret S = Ta(B)=Tb(A)=Tab(x).
Why it failed – Bergamo attack (2004)
Over real numbers, given x and y = cos(a·arccos x), an attacker computes a' = arccos y / arccos x (mod 2π). Because cosine is periodic and computable, the "discrete log" is easy. Over finite fields, variants reduce to linear algebra. Bergamo et al. showed the system is insecure in practice.
Modern trigonometric crypto
- Chaotic maps: xn+1 = sin(π r xn) or the sine logistic map generates pseudo-random sequences for image encryption. Sensitivity to initial k provides key space.
- Stream ciphers: lightweight IoT devices use |sin(k·i)| scaled to bytes as keystream: ci = mi XOR floor(255·|sin(k·i)|). Fast, no S-boxes, but needs good key management.
- DFT and lattices: The Discrete Fourier Transform uses complex exponentials e-i2πkn/N = cos - i sin. Lattice-based post-quantum schemes (Kyber, Dilithium) use the Number Theoretic Transform, an integer analogue of FFT, to multiply polynomials in O(n log n). The trig structure enables speed, not security directly.
Chebyshev Iteration
Trig Stream Cipher Demo
% GNU Octave: Chebyshev key exchange (insecure demo)
Tn = @(x,n) cos(n*acos(x));
x = 0.3; a = 123; b = 456;
A = Tn(x,a); B = Tn(x,b);
S1 = Tn(B,a); S2 = Tn(A,b);
printf('Shared equal? %d\n', abs(S1-S2) < 1e-12);
% GNU Octave: sine-based stream cipher
msg = 'HELLO'; k = 2.71828;
m = double(msg);
c = zeros(size(m));
for i = 1:length(m)
ks = floor(255 * abs(sin(k*i)));
c(i) = bitxor(m(i), ks);
endfor
% decrypt same loop