Numeric vs. symbolic evaluation
A numeric calculator evaluates sin(π/3) and returns 0.866025… — a floating-point approximation. A symbolic evaluator keeps the expression alive: it knows sin(π/3) = √3/2 exactly, converting to a decimal only if you explicitly ask for it.
Symbolic engines represent the entire expression tree as a first-class data structure. The tree isn't consumed by evaluation — it can be rewritten, differentiated, integrated, simplified, or factored. The same infrastructure that evaluates x² + 2x + 1 can also factor it to (x+1)².
Differentiation as tree transformation
Symbolic differentiation works by applying rules to the expression tree — not by performing numerical calculus. The derivative of a sum is the sum of derivatives, so d/dx(f + g) becomes two recursive calls on the tree's children. The product rule is another structural transformation.
This means a symbolic calculator can differentiate x³·sin(x) + e^x by traversing its tree and applying known rules at each node, without ever approximating anything numerically.
Parse
Build symbolic tree
Variables remain as symbols — x, θ, n. The tree is a data structure, not an evaluation queue.
Rewrite
Apply algebraic rules
Simplification, factoring, expansion — each is a set of rewriting rules applied until a normal form is reached.
Transform
Differentiate / integrate
Calculus operations are structural — the tree is recursively transformed using differentiation rules, producing a new tree.
Emit
Symbolic or numeric output
The result can stay symbolic (exact form) or be evaluated numerically at a specific value of x.
Symbolic expression examples
d/dx [ x³ · sin(x) ]→3x²sin(x) + x³cos(x)Product rule applied structurally to the AST — exact, no approximation
∫ 2x dx→x² + CAnti-differentiation rule applied to the power node in the tree
simplify( (x²−1) / (x−1) )→x + 1Algebraic rewriting: factor numerator, cancel common term — pure tree manipulation
The leap: Once expressions are first-class data structures rather than evaluation pipelines, a calculator becomes a reasoning system. The same engine that computes an answer can prove equivalences, find critical points, and solve systems of equations — all by manipulating trees.