Descartes & Leibniz

Two rationalists who rebuilt philosophy on mathematics — one with doubt and coordinates, the other with monads and calculus. This guide gives you their core ideas, real proofs, and working GNU Octave code you can run today.

René Descartes (1596–1650)

French philosopher, scientist, and mathematician, Descartes refused authority and sought certainty through method. He connected geometry and algebra into analytic geometry, and gave modern philosophy its starting point: "cogito, ergo sum" — I think, therefore I am.

Philosophy — Method and Foundations

Method of Doubt: In Discourse on Method (1637) he lays four rules: accept only what is clear and distinct; divide difficulties into parts; proceed from simple to complex; review completely.

Cogito: Even if deceived by an evil demon, the act of doubting proves a thinking thing exists. From this res cogitans (thinking substance) he argues to God (via trademark argument) and then to res extensa (extended substance). This is mind–body dualism.

Proof sketch: 1) I can doubt all bodies. 2) I cannot doubt that I doubt. 3) Doubting is thinking. 4) Therefore I exist as a thinking thing. No empirical premise needed — a pure rational intuition.

Mathematics — From curves to coordinates

La Géométrie (1637) introduced algebraic techniques for geometrical problems, blending algebra and geometry to revolutionize practice. The Cartesian coordinate system is named after him.

Logic — Mathesis Universalis

Descartes sought a universal mathematics of order and measure, where clear and distinct ideas function like axioms. Truth is recognized by natural light, not syllogism alone.

Gottfried Wilhelm Leibniz (1646–1716)

German polymath credited, together with Newton, with inventing calculus, and pioneering binary arithmetic. He also built a metaphysics of simple substances.

Philosophy — Principles and Monads

Leibniz worked from seven core principles:

Monads: The universe is made of infinite simple substances, "ultimate units of existence." Each monad is windowless, changes internally by appetition, mirrors the whole universe from its perspective, and is synchronized by God.

Why something rather than nothing? Leibniz answers: contingent things need a sufficient reason outside the series. That terminus is a necessary being bearing reason within itself — God.

Mathematics — Calculus and Binary

Logic — Calculate Disputes

Leibniz dreamed of a characteristica universalis — a universal symbolic language — and a calculus ratiocinator to resolve disputes by calculation: "Let us calculate, without further ado, to see who is right." He anticipated prime encoding (later Gödel numbering) and symbolic logic.

Compare: Descartes vs Leibniz

TopicDescartesLeibniz
Starting pointDoubt → cogitoPrinciple of sufficient reason
SubstanceTwo: mind and extended bodyInfinite immaterial monads
Space/timeAbsolute extensionRelational orders of phenomena
MethodAnalysis/synthesis via clear ideasUniversal characteristic + calculus
Math legacyAnalytic geometry, coordinatesCalculus notation, binary, determinants
God's roleGuarantor of clear and distinct ideasChooses best world, harmonizes monads
KnowledgeInnate ideas awakened by reasonAll predicates contained in subject (complete concepts)

GNU Octave — Working Examples

Copy these into Octave (.m files). They directly illustrate Descartes and Leibniz.

1. Descartes Folium

% folium.m — plot x^3 + y^3 = 3 a x y
a = 1;
t = linspace(-0.5, 5, 400);
% param form: x = 3 a t / (1+t^3), y = 3 a t^2 / (1+t^3)
x = 3*a*t ./ (1 + t.^3);
y = 3*a*t.^2 ./ (1 + t.^3);
plot(x, y, 'b-', 'LineWidth', 2); axis equal; grid on;
title('Folium of Descartes'); xlabel('x'); ylabel('y');

2. Descartes Rule of Signs

function r = descartes_rule(p)
  % p = coefficients highest to lowest
  s = sign(p(p~=0)); % drop zeros
  changes = sum(abs(diff(s))>0);
  r.pos_max = changes;
  r.pos_possible = changes:-2:mod(changes,2);
  q = p .* ((-1).^(length(p)-1:-1:0)); % p(-x)
  s2 = sign(q(q~=0));
  changes2 = sum(abs(diff(s2))>0);
  r.neg_max = changes2;
end
% example: p(x)=x^3 - 3x + 2
p = [1 0 -3 2]; descartes_rule(p)

3. Leibniz π series

% leibniz_pi.m
N = 1e6;
k = 0:N-1;
s = sum((-1).^k ./ (2*k+1));
pi_est = 4*s;
printf('N=%d → pi≈%.10f error=%.2e\n', N, pi_est, abs(pi-pi_est));

4. Leibniz derivative (numerical)

% leibniz_derivative.m — dy/dx via limit
f = @(x) x.^3 - 3*x;
x0 = 2; h = logspace(-1,-12,12);
d = (f(x0+h)-f(x0))./h;
[ h' d' ] % approaches 9

5. Binary conversion (Leibniz)

function b = to_binary(n)
  b = dec2bin(n); % Octave built-in mirrors Leibniz idea
end
to_binary(42) % → '101010'

6. Pre-established harmony simulation

% two "monads" with internal clocks, no interaction
t = 0:0.01:10;
m1 = sin(t); % monad 1
m2 = sin(t + 0); % monad 2 pre-programmed same phase
plot(t,m1,'r',t,m2,'b--'); legend('Monad A','Monad B');
title('Pre-established Harmony — synchronized without causal link');

Interactive Examples

1. Folium of Descartes — drag a

The loop size scales with parameter a. Descartes used this curve to challenge Fermat's tangent methods.

2. Leibniz π approximation

Proofs to Remember

Descartes — Cogito as intuition

Not a syllogism but immediate: thinking entails existence because existence is contained in the concept of thinking. Deny it and you perform it. From clear and distinct perception, Descartes builds mathematics as the model of certainty.

Leibniz — Calculus from continuity

Using law of continuity, $dy/dx$ is the ratio of infinitesimals where error is smaller than any assignable quantity. Product rule: $d(uv)=u dv+v du+du dv$, last term negligible by transcendental law of homogeneity → $d(uv)=u dv+v du$. This symbolic reasoning is why Leibniz notation won.

Common ground

Both sought a universal method: Descartes' Mathesis Universalis and Leibniz's Characteristica Universalis. Both believed reason discovers structure that God guarantees — Descartes through clear ideas, Leibniz through sufficient reason and best-world selection.