• Welcome to the new Internet Infidels Discussion Board, formerly Talk Freethought.

The PI Thread

It's clear that trigonometric functions are related to exponential ones, and thus that pi is related to e. So for completeness,

exp(x) = e^x
exp(log(x)) = log(exp(x)) = x

d(exp(x))/dx = exp(x)
d(log(x))/dx = 1/x
 
Pi or tau?

Pi is (perimeter of circle) / (diameter of circle)
"Perimeter" and "diameter" go back to antiquity as Classical Greek perimetros "around measure" and diametros "across measure".

The first letter of "perimetros" in the Greek alphabet is "pi", and that's where we get that symbol from.

Pi is sometimes called Archimedes's constant.

 Pi (mathematical constant) gives its history, and notes that some mathematicians equivocated between 3.14... (perimeter/diameter) and 6.28... (perimeter/radius)

That latter one I've seen named "tau": tau = 2*pi. It is also called "turn" (360d angle in radians):  Turn (angle). One finds lots of 2*pi's, and tau would make them look nicer.

Like contour integrals:
f(x) = 1/(tau*i) * integral over y in a contour around x of f(y)/(y - x)

And Fourier transforms:
F(y) = integral over x from -oo to +oo of f(x)*exp(i*x*y)
f(x) = 1/tau * integral over y from -oo to +oo of F(y)*exp(-i*x*y)
 
2*pi = 360 degrees. In dynamic systems angular frequency is often expressed in radians per second instead of degrees per second, the math works our easier. Convert to degrees when necessary.

A sine wave can be imagined as a rotating unit vector in an xy coordinate
system with the vector a radius of 1 tracing out a circle. In terms of a
rotating unit vector the difference between a sine and cosine is two rotating vectors separated by a phase shift of pi/2 0r 90 degrees. Could be a rotating shaft on a machine or an electrical signal.

Imagine a a rotating shaft of radius 1 with xy ordinates imposed on the end. As it rotates a point on the edge traces out a sine wave, y(t) = sin(2* pi * f * t). In fact rotating electromagnetical devices were once used to create electrical sine waves.

1 Hertz or 1 cycle per second = 2*pi radians per second. = 360 deg/s

360 deg/2*pi rad = 57.3 deg/rad


This is why 2*pi shows up a lot. PI shows up in the math whenever a system is dynamic and periodic , electrical or mechanical. Also the Fourier Transform/series shows up whenever a frequency response is involved.

2*pi*f occurs so frequently it is given a tag, omega. y(t) = sin(w*t) don't have the Greek symbol

After a while you start thinking in radians instead of degrees.

clear
t = [0:.01:1] // time = 0-1 second
[m,n] = size(t)
t = t' // transpoeseow to col vector
x = t * 360
A = 1
freq = 1 // cycles per second Hertz
for i = 1:n yr(i) = A*sin(2*%pi*freq*t(i));end; // radians
for i = 1:n yc(i) = A*sin(2*%pi*freq*t(i) + %pi/2);end; //90d phase shift
for i = 1:n yd(i) = A*sind(360*freq*t(i));end; // degrees
clf
plot2d(x,yr)
plot2d(x,yd)
 
Though both e and pi are transcendental, they are also "computable numbers" ( Computable number).

A computable number is one that can be calculated to arbitrary precision with a finite-sized algorithm run for a finite number of steps.

The Wikipedia article states that every number that we can calculate or approximate is a computable number, and that includes all algebraic numbers, and such familiar transcendental numbers as e, and pi. Alan Turing on Computable Numbers discussed them, and also computable functions, functions that return computable numbers for computable numbers.

He showed that a converging infinite sequence {f(i) for i = 1 to infinity} has a computable number as its limit if the function f is computable.

This has some consequences:
  • A computable function of computable functions is also computable.
  • Every computable-function root is computable.
  • A derivative or an integral of a computable function is also computable.
One can go even further with "definable numbers" ( Definable real number). These ones have finite-sized descriptions.

An interesting curiosity is how many real computable and real definable numbers there are. The sets of them are countable, like the sets of positive integers, integers in general, rational numbers, and real algebraic numbers. That means that there are infinitely more real numbers than any of these kinds of numbers.
 
Passing the time with PI

Plotting real vs imaginary of e^*(it) traces out a circle fot t in multiples of 2PI. It is a rotating vector with an angular frequency of 360deg/s, 2*PI radians per second, or 1 Hz.

%e^(%i*x(j)*3) + %e^(%i*x(j)*1) is a summation of two sine waves.

While playing around with it I found plotting imag vs real of the summation created interesting patterns by varying the multiplier the exponent term.

https://en.wikipedia.org/wiki/Lissajous_curve



clear

x = [0:.01:10]
[m,n] = size(x)
x = x'
for j = 1:n
// y is complex
y(j) = %e^(%i*x(j)*3) + %e^(%i*x(j)*1)
m(j) = abs(y(j))
ph(j) = atan(imag(y(j))/real(y(j)))
end
plot(imag(y),real(y))
 
Yup. Spirograph patterns: hypotrochoids and epitrochoids.

x = sum of a*cos(w*t+p)
y = sum of a*sin(w*t+p)

For the curve to be a closed one, all the w's must be commensurable -- all of them must be rational multiples of any one of them.
 
Lissajous figures had practical use.

Before digital scopes with built in spectrum analyzers analog oscilloscopes with glass CRTs had an xy plot mode. You could plot a known signal against an unknown. People good at it could interpret spectral information.
 
Lissajous figure:

x = a1*sin(w1*t+p1)
y = a2*sin(w2*t+p2)

Epi/hypotrochoid (Spirograph):

x = a1*cos(w1*t+p1) + a2*cos(w2*t+p2)
y = a1*sin(w1*t+p1) + a2*sin(w2*t+p2)

(x+i*y) = a1*exp(i*(w1*t+p1)) + a2*exp(i*(w2*t+p2))

Epi: w1, w2 have the same sign
Hypo: w1, w2 have opposite signs

Epi/hypocycloid

a1*w1 = +- a2*w2

Curvature K:

x' = - a1*w1*sin(w1*t+p1) - a2*w2*sin(w2*t+p2)
y' = a1*w1*cos(w1*t+p1) + a2*w2*cos(w2*t+p2)

s'^2 = x'^2 + y'^2 = (a1*w1)^2 + (a2*w2)^2 + 2*(a1*w1)*(a2*w2)*cos((w1-w2)*t+(p1-p2))

x'' = - a1*w1^2*cos(w1*t+p1) - a2*w2^2*cos(w2*t+p2)
y'' = - a1*w1^2*sin(w1*t+p1) - a2*w2^2*sin(w2*t+p2)

K*s'^3 = x'*y'' - x''*y' = (a1^2*w1^3) + (a2^2*w2^3) + (a1*w1)*(a2*w2)*(w1+w2)*cos((w1-w2)*t+(p1-p2))
 
At a cusp, the curvature is infinite, and this happens for an epi/hypocycloid.

In that case, a2*w2 = a1*w2 *s, with s = +-1,

s'^2 = (a1*w1)^2*(2 + 2*cos(q))
where q = (w1-w2)*t+(p1-p2)

K*s^3 = (a1*w1)^2*(w1+w2)*(1+s*cos(q))

K = 1/(a1*w1) * (w1+w2)/(8*(1+s*cos(q)))^(1/2)

K is infinite if q = pi (s = 1) or q = 0 (s = -1)


Returning to the general case, the curvature is always zero if w2 = - w1 and a2 = a1 (or -a1). That makes a line segment. If w2 = - w1 for general a1 and a2, one gets an ellipse.
 
I'll simplify the Spirograph equations by setting a1 = w1 = 1 and p1 = p2 = 0, by scaling the position and the time, shifting the time, and rotating the position. Using a and w for a2 and w2, I find

x = cos(t) + a*cos(w*t)
y = sin(t) + a*sin(w*t)

Taking derivs,

x' = - sin(t) - a*w*sin(w*t)
y' = cos(t) + a*w*cos(w*t)

x'' = - cos(t) - a*w^2*cos(w*t)
y'' = - sin(t) - a*w^2*sin(w*t)

s'^2 = 1 + (a*w)^2 + 2*(a*w)*cos((w-1)*t)
K*s'^3 = 1 + (a^2*w^3) + a*w*(1+w)*cos((w-1)*t)

The cycloid case: the curve has cusps, points where s'=0 -- a*w=-1, t=2n*pi/(w-1) or a*w=+1, t=(2n+1)*pi/(w-1) for integer n

The curve has flat spots if it has points where K = 0 -- a*w^2=-1, t=2n*pi/(w-1) or a*w^2=+1, t=(2n+1)*pi/(w-1) for integer n
 
Trigonometric functions are related to exponential ones, and here is their explicit relationship:

sin(x) = (1/(2i)) * (exp(i*x) - exp(-i*x))
cos(x) = (1/2) * (exp(i*x) + exp(-i*x))
tan(x) = (1/(2i)) * (exp(i*x) - exp(-i*x)) / (exp(i*x) + exp(-i*x))

arcsin(x) = (1/i) * log(sqrt(1-x^2) + i*x)
arccos(x) = (1/i) * log(x + i*sqrt(1-x^2))
arctan(x) = (1/(2i)) * log( (1+i*x)/(1-i*x) )

There is a relative of the trigonometric functions called the hyperbolic functions:

sinh(x) = (1/2) * (exp(x) - exp(-x))
cosh(x) = (1/2) * (exp(x) + exp(-x))
tanh(x) = (1/2) * (exp(x) - exp(-x)) / (exp(x) + exp(-x))

arcsinh(x) = log(sqrt(1+x^2) + x)
arccosh(x) = log(x + sqrt(x^2-1))
arctanh(x) = (1/2) * log( (1+x)/(1-x) )

The two kinds of functions are related by

sin(x) = (1/i) * sinh(i*x), cos(x) = cosh(i*x), tan(x) = (1/i) * tanh(i*x)

For completeness, I note exp(x) = e^x .
 
With the limit of a1->infinity and w1->0 with a1*w1 finite, one gets a trochoid:

x = a*cos(t)
y = t + a*sin(t)

Or to use the more usual statement of the cycloid equation:
x = t - a*sin(t)
y = 1 - a*cos(t)

A cycloid is a trochoid with a = 1.


A roulette curve is made by a curve that rolls on another curve. Using X = x+i*y for the stationary curve and R (analogous) for the rolling curve, all as functions of some parameter, then the roulette curve is

X + (a - R)*(X'/R')

where a is a complex constant.

Let's try a circle on a line. X = t, R = e^(i*t), |X'| = |R'| = 1

Then the roulette curve is t + (a - e^(i*t))*(-i)*e^(-i*t)*1 = t - i*(a*e^(-i*t) - 1) = t + i - a*e^(-i*t)

A circle on a circle: X = e^(i*t), R = (1/w)*e^(i*w*t), |X'| = |R'| = 1
A trochoid.

Then the roulette curve is e^(i*t) + (a - (1/w)*e^(i*w*t))*e^(i*t - i*w*t) = (1 - 1/w)*e^(i*t) + a*e^(-i*(w-1)*t)
An epi/hypotrochoid.
 
Involute: imagine wrapping a string around a curve with the unwrapped part sticking out in the direction of the curve's tangent at its point of contact.

For curve X = X(t) for parameter t,

X - (X'/|X'|) * integral of |X(w)'| for w from w0 to t

Evolute: curve from the center of curvature of each point on the curve, the envelope formed by the curve normals.

(x,y) + (-y',x') * ( (x'^2 + y'^2) / (x'*y'' - x''*y') )

Taking the involute and the evolute of a curve are inverse operations. Each one undoes the other.

I generalized the evolute to be the envelope along the combination of tangent and normal: (a*x' - b*y', a*y' + b*x')

I find
(x,y) + (a*x' - b*y', a*y' + b*x') * ( (b * (x'^2+y'^2)) / ((a^2+b^2) * (x'*y''-y'*x'')) )
 
One may generalize the involute by finding for X = (x,y), V = (a*x'-b*y',a*y'+b*x') this:
X - V/|V| * (integral of |V|)

Though if one does so, one does not find in its first derivative the clean cancellation that one finds for the plain involute. One also finds that it is not the inverse of the generalized evolute.
 
Back
Top Bottom