Euler: The Master of Us All

Leonhard Euler (1707–1783) – prolific Swiss mathematician who gave us modern notation, solved the Basel problem, founded graph theory, and linked analysis to geometry.

1. Introduction

Euler published over 850 works. He worked blind for the last 17 years of his life, yet produced nearly half his total output. This page explores eight of his enduring contributions with safe, robust interactive demonstrations — all running locally without external libraries.

2. Notation Revolution

Euler standardized mathematical language we still use today:

Uses Math functions: sin, cos, tan, exp, log, sqrt, abs, pow, PI, E. Example: exp(-x*x/2)

% GNU Octave – Notation: plot Euler's sinc
x = -10:0.01:10;
y = sin(x)./x; y(x==0) = 1;
plot(x, y, 'LineWidth', 2); grid on;
xlabel('x'); ylabel('f(x)'); title('f(x) = sin(x)/x');

3. Euler's Formula

e = cos θ + i sin θ

For θ = π, we get the identity: e + 1 = 0, linking five fundamental constants.

% GNU Octave – Euler's formula on unit circle
theta = 0:0.01:2*pi;
plot(cos(theta), sin(theta), 'b', 'LineWidth', 2);
axis equal; grid on; hold on;
t = pi/3;
plot([0 cos(t)], [0 sin(t)], 'r', 'LineWidth', 3);
title('e^{i\theta} = cos\theta + i sin\theta');

4. Basel Problem

Euler solved in 1734: the sum of reciprocals of squares converges exactly to π²/6.

n=1 1/n² = π²/6 ≈ 1.644934
Terms: 0
Partial sum: 0.0000000000
Error vs π²/6: 1.64493e+0
% GNU Octave – Basel problem
N = 10000;
s = sum(1 ./ (1:N).^2);
target = pi^2/6;
fprintf('Sum = %.10f\nTarget = %.10f\nError = %g\n', s, target, abs(s-target));

5. Seven Bridges of Königsberg

Euler founded graph theory in 1735 by proving no walk could cross each of the seven bridges exactly once. A graph has an Eulerian trail iff it has 0 or 2 vertices of odd degree. Königsberg had 4 odd vertices (degrees 5, 3, 3, 3).

A (5) D (3) B North (3) C South (3)
% GNU Octave – Königsberg degrees
% Vertices: 1=A, 2=B, 3=C, 4=D
Adj = [0 2 2 1; 2 0 0 1; 2 0 0 1; 1 1 1 0];
degrees = sum(Adj, 2);
disp('Degrees [A B C D]:'); disp(degrees');
odd = sum(mod(degrees,2)==1);
if odd==0 || odd==2
  disp('Eulerian trail exists');
else
  disp('No Eulerian trail - 4 odd vertices');
endif

6. Euler Characteristic V − E + F = 2

For any convex polyhedron, Vertices minus Edges plus Faces equals 2.

% GNU Octave – Euler characteristic
solids = struct('name',{'cube','tetrahedron','octahedron'}, ...
  'V',{8,4,6}, 'E',{12,6,12}, 'F',{6,4,8});
for i=1:length(solids)
  chi = solids(i).V - solids(i).E + solids(i).F;
  printf('%s: V-E+F = %d\n', solids(i).name, chi);
endfor

7. Euler's Method

Numerical integration: yn+1 = yn + h·f(tn,yn). For dy/dt = y, y(0)=1, exact solution is et.

% GNU Octave – Euler's method
h = 0.2; t = 0:h:2; y = zeros(size(t)); y(1)=1;
for i = 2:length(t)
  y(i) = y(i-1) + h * y(i-1); % dy/dt = y
endfor
plot(t, y, 'o-', t, exp(t), '--', 'LineWidth', 2);
legend('Euler', 'exact e^t'); grid on;

8. Euler's Totient Function φ(n)

φ(n) counts integers 1 ≤ k ≤ n coprime to n. Euler used it to generalize Fermat's theorem.

% GNU Octave – Euler's totient
function phi = euler_phi(n)
  phi = sum(gcd(1:n, n) == 1);
endfunction
euler_phi(36)   % returns 12