Synthesis is harder than analysis

azhenley1 pts0 comments

Synthesis is harder than analysis – Surfing Complexity

Skip to content

Lorin Hochstein

incidents, systems

July 3, 2026July 3, 2026

5 Minutes

Over the years, mathematicians, logicians and computer scientists have developed various calculi. If you have a background in computer science, you’ve likely heard of the lambda calculus, a model of computation that was developed by Alonzo Church. If databases are more your thing, then you’ve been exposed to the relational calculus without even knowing it, since SQL is based on the relational calculus. If you are into formal methods, then you’ve worked with the predicate calculus, better known as first-order logic. Finally, if you enjoy reading academic papers on programming languages, you’ve almost certainly run into the sequent calculus. However, when someone says "calculus" without modification (e.g., "I’m taking calculus next semester"), there’s no ambiguity about which calculus they are referring to: it’s always one particular calculus. Or, rather, two calculi that happen to be deeply related to each other: differential calculus and integral calculus.

Visually, you can think of differential calculus as being about calculating the slope of a function at a given point. For example, consider this graph:

You might ask, "how quickly is this curve changing when x=6?" In other words, what is the slope of this function right in a neighborhood very close to x=6?

Differential calculus enables you to compute the slope of a function at a given point

Integral calculus, on the other hand, is about the area under the graph over a particular interval. For example, you might ask "what is the area under this curve between x=2 and x=7?

Integral calculus enables you to compute the area under a function over a given interval

If you study calculus, you’ll first be taught differential calculus (sometimes referred to "Calculus 1" or "Cal 1") and then you’ll be taught integral calculus ("Cal 2"). When you study differential calculus, you learn the rules for calculating the derivative (slope-at-a-point) of a function. And it turns out that it’s quite straightforward to calculate a derivative, no matter what type of function it is. It’s just an algorithm, which means you can easily program a computer to compute derivatives if you wanted to. (As an aside, automatically computing derivatives is a fundamental element in the process of training LLMs. If you’re curious, look up automatic differentiation).

And then, you get to Cal 2, and you learn about how to compute an integral (area-under-a-curve). You will soon discover that, unlike in Cal 1, there is no algorithm for computing the integral of an arbitrary function. Instead, what you learn is a bag of tricks on how to compute integrals for different kinds of functions. You also learn that for some functions, there’s no closed-form solution at all for the integral! As an example, consider the Gaussian function, which shows up in the normal distribution. With zero mean and unit variance, it looks like this:

12πe−x22\frac{1}{\sqrt{2\pi}} e^{-\frac{x^2}{2}}

The infamous bell curve

Asking students to compute the derivative of this function would be a perfectly reasonable question on a Cal 1 final exam, the answer looks like this:

−x2πe−x22-\frac{x}{\sqrt{2\pi}}e^{-\frac{x^2}{2}}

But asking students to compute the integral of this function on a Cal 2 final exam would be unfair, because it’s not possible to do with the techniques they learned in class (at least, I didn’t learn the technique you’d need until Cal 3). Because the integral doesn’t have a closed-form solution, you need to express the solution as an infinite series, like:

12π∑n=0∞(−1)n2nn!(2n+1)x2n+1=12π(x−x36+x540−x7336+x93456−⋯)\frac{1}{\sqrt{2\pi}}

\sum_{n=0}^{\infty}

\frac{(-1)^n }{2^n n!(2n+1)}x^{2n+1} =<br>\frac{1}{\sqrt{2\pi}}<br>\left(<br>x-\frac{x^3}{6}+\frac{x^5}{40}-\frac{x^7}{336}+\frac{x^9}{3456}-\cdots<br>\right)

(Note: I asked AI for the integral of the Gaussian, I hope it got it right!)

It’s not obvious (at least, not to me) that differential calculus and integral calculus are related to each other. However, it turns out that these two calculi are opposite sides of the same coin, because integrals are anti-derivatives. That is, if f(x) is the derivative of F(x) , then F(x) is the integral of f(x) . This result is known as the Fundamental Theorem of Calculus.

This connection between differential and integral calculus raises an almost philosophical question: why is it so much easier to compute a derivative than it is to compute an integral? Back in 2011, somebody asked about this on the Mathematics Stack Exchange: Why is integration so much harder than differentiation? The top-voted answer was written by Qiaochu Yuan, and here’s the heart of it (emphasis mine):

Differentiation is a "local" operation: to compute the derivative of a function at a point you only have to know how it behaves in a neighborhood of that point. But integration is a "global" operation:...

calculus integral function frac compute differential

Related Articles