Two directions, two difficulties
By now you know the spirit of this rung: a computer algebra system computes with exact symbols rather than approximate numbers, so its answers carry no round-off and its real enemy is not error but expression swell. Calculus is where that spirit shines brightest, because here a machine can do something a numerical method simply cannot — hand you back a formula. Compute the derivative of x^3 and you do not get 'about 12 at x=2'; you get the exact function 3*x^2, valid everywhere at once. That is the promise of symbolic calculus, and it splits sharply into two halves with wildly different temperaments.
Differentiation is the tame half. The derivative is defined by a small, closed set of rules — the power rule, product rule, quotient rule, chain rule — and crucially, every rule is compositional: the derivative of a whole is built mechanically from the derivatives of its parts. There are no clever choices to make and no dead ends to fall into. Feed any elementary expression in and a finite, predictable amount of bookkeeping comes out. This is exactly why differentiation never surprises a student the way integration does.
Integration is the wild half. There is no chain rule running backwards, no compositional recipe, and — the part that startles everyone — there are perfectly innocent elementary functions whose antiderivative is not elementary at all. The integral of exp(-x^2), the heart of the bell curve, simply cannot be written with any finite combination of polynomials, roots, exponentials, logarithms, and trig functions. It is not that we have failed to be clever enough; it provably does not exist in elementary form. So the deep question of symbolic integration is not merely 'find the answer' but the far stranger 'decide whether an answer of this kind exists at all.'
Differentiation: rote, exact, and quietly explosive
Let us watch the easy half work, because even here there is an honest twist worth meeting. To differentiate a symbolic expression, the system walks its tree from the top down, applying one rule per node and recursing into the children. A product node fires the product rule; a composition fires the chain rule; a leaf like x or a constant has a one-line derivative. The recursion always terminates because each step strips away one layer, so the whole process is guaranteed to finish — there is genuinely no way for symbolic differentiation to get stuck.
diff( f(x) * g(x) ) -> diff(f)*g + f*diff(g) (product rule) diff( f(g(x)) ) -> diff(f)(g(x)) * diff(g) (chain rule) diff( x ) -> 1 diff( constant ) -> 0 The product rule turns ONE node into a SUM of TWO products, each still containing a near-copy of f and g.
Here is the honest twist promised in the last guide on swell, now made concrete. Look closely at the product rule: it turns a single product node into a sum of two products, and each of those still carries a near-copy of f and of g. Differentiate a long product of n factors and the raw result has on the order of n^2 terms before any cleanup; differentiate again and it balloons further. A textbook function like (x^2 + 1)^10 * sin(x) yields a derivative that is correct but visually monstrous until it is simplified. So even the tame half breeds expression swell — the answer is exact, but it can arrive enormous, and the cost of taming it falls on simplification, not on the differentiation itself.
Integration as a decision problem
Now the deep half. Before the 1960s, symbolic integration by computer was a bag of heuristics — try this substitution, pattern-match against a table, attempt integration by parts, and if nothing works, give up and report 'no answer found.' That last message is unsatisfying because it is ambiguous: did the antiderivative not exist, or did the program merely fail to find one that does? A bag of tricks can never tell those two apart, and that ambiguity is exactly what made the problem feel like an art rather than a science.
The right way to frame integration is as a decision problem, and this reframing is the whole intellectual leap. Fix what 'elementary' means precisely — the functions you can build from rationals by finitely many additions, multiplications, divisions, roots, exponentials, and logarithms (trig functions are exponentials in disguise, via complex numbers). Then the question becomes razor-sharp: given an elementary function f, does an elementary function F exist with F'(x) = f(x)? A genuine algorithm must answer yes-with-the-formula or a definite, provable no — never a wishy-washy 'I could not find one.'
This is a profoundly different ambition. Solving a decision problem in full means proving a non-existence result whenever the answer is no — you must rule out every conceivable elementary antiderivative, not just the ones you happened to try. That this is even possible, that the question of elementary integrability is decidable at all, is one of the quiet triumphs of twentieth-century mathematics. It is the difference between a clever student who knows many integrals and a theorem that knows the boundary of what integrals can be.
The Risch algorithm: deciding the undecidable-looking
The instrument that turns integration into a decision procedure is the Risch algorithm, published by Robert Risch in 1969. Its governing idea is beautiful and surprising: build the field of functions that already appear in f as a tower of layers, each layer adding one new exponential or logarithm on top of the rationals below it. Then prove a structure theorem — if an elementary antiderivative exists at all, it must live in essentially that same tower, perhaps with one extra logarithm allowed and only specific new constants. The search space, which felt infinite, is suddenly pinned down to a finite, describable shape.
- Build the tower. Express f using a fixed list of building blocks x, then layered exponentials and logarithms, treating each new layer as a fresh variable sitting on the algebra below it. This records the exact 'kind' of function you are integrating.
- Apply the structure theorem. It guarantees that any elementary antiderivative is a member of that same tower plus at most a sum of constant-multiples of logarithms — so the unknown F has a known TEMPLATE with only finitely many unknown pieces.
- Reduce to algebra. Match the template against f by differentiating it symbolically; the matching conditions collapse into solving systems of polynomial and rational equations for the unknown coefficients — exactly the kind of task the earlier guides on GCDs and Groebner bases prepared.
- Decide. If those equations have a solution, assemble it into the antiderivative F and return it — exact, guaranteed correct (you can differentiate to check). If they provably have no solution, return a definite NO: f has no elementary antiderivative, and this is a theorem, not a shrug.
This is why a real system can tell you, with certainty, that exp(-x^2) has no elementary antiderivative — it is not giving up, it has run the decision and proven the negative. The reliance on polynomial machinery in step three is not incidental: those rational-and-polynomial equations are solved with the very polynomial GCD and factorization tools from the previous guide, which is why Groebner bases and GCDs are the bedrock beneath symbolic calculus rather than a side topic.
What this buys you, and what to remember
Step back and feel the asymmetry. Differentiation is so easy that we hand it to first-year students as a mechanical drill; integration is so hard that deciding it required a deep field-theoretic theorem and a decade of work after the question was even posed correctly. That gap is not laziness in the textbooks — it is a real structural fact about these two operations, and meeting it head-on is one of the genuine pleasures of computer algebra.
And remember the recurring shadow: even when an answer exists, it can arrive swollen. A modest integrand can have an antiderivative whose printed form fills a page, and the intermediate expressions inside the Risch procedure can be larger still before they cancel. This loops you straight back to the theme of this entire rung — symbolic methods are exact but do not scale, and expression swell is the price of refusing to round. The next and final guide of this rung makes that limitation the headline: why exact computation, for all its beauty, hits a wall that approximate computation simply walks around.
So when should you reach for symbolic calculus at all? When you need the formula — a derivative to plug into a stability analysis, an exact antiderivative for a definite integral, a closed form to read structure off — and when the expressions stay small enough to stay sane. The moment you only need a number, a fast and accurate one, numerical methods win on speed and on robustness: numerical differentiation and quadrature give you an approximate answer in microseconds where the symbolic route might give you an exact answer the size of a phone book, or none at all. Knowing which lane you are in is the whole skill.