Integrals and shapes
Is an integral easy to solve? It depends on the associated Riemann surface!
October 17, 2026
In most calculus courses, students are taught how to solve the integral \[\int\frac{dx}{\sqrt{1-x^2}}.\] However, the very similar looking integral \[\int\frac{dx}{\sqrt{x^3-2}}\] would given even an expert undergraduate calculus student trouble!
What makes the second integral so much harder than the first? It turns out that the answer comes from geometry. This might sound shocking the first time you hear it; the goal of this blogpost is to explain what we mean here.
A review of calculus
Let's start by recalling how to integrate rational functions. When mathematicians first started integrating, they were of course interested in knowing which classes of functions they could easily integrate.
One 'simple' class of functions are polynomials: functions like \(x^3 + 2x^2 - 5x + 3.\) These are fortunately easy to integrate: using the easy identities \[\int x^n dx = \frac{x^{n+1}}{n+1} + C,\] one can integrate any polynomial.
The next step up from polynomials is the class of rational functions. These are functions that arise as the quotient of two polynomials; for example, \[\frac{1+2x}{1-2x}\] is a rational function, as is \[\frac{x^3-5x+2}{x^{17} - x^6 + 8}.\]
It is harder to integrate rational functions, but with a trick called partial fraction decomposition, you can always integrate rational functions. We won't dwell on it here, but just remember that rational functions are 'easy' to integrate, at least in theory; it turns out that integrating them requires some tricky algebra (including factoring high degree polynomials) which can make it difficult to carry out in practice, but at least in theory there's a way to do it.
Trigonometric substitutions with circles
How might we solve the integral \[\int\frac{dx}{\sqrt{1-x^2}}?\]
In the previous section, we described how to integrate rational functions; so, it's natural to ask if we can do some clever substitution to turn this into the integral of a rational function.
Whenever you're doing mathematics -- and especially integration -- it is helpful to give things names. The scary part of this integral is the square root, so let's give it a name: put \[y = \sqrt{1-x^2}.\] In particular, \[y^2 = 1-x^2,\] or \[x^2 + y^2 = 1.\]
This equation defines a circle! The trigonometric substitution that is typically done now has some geometric meaning: our equation defining the circle has two variables, but the circle is a 1-dimensional object; trigonometric functions allow us to reduce the circle to a one variable object, which is easier to study.
There is a second way to do this integral, however: parametrize the circle by rational functions. As we know how to integrate all rational functions (as described in the previous section), this way is just as effective. However, this rational parametrization is much less well-known than the trigonometric parametrization, and has uses besides integrals, so we thought it would be fun to explain this rational function solutino of our integral.
A rational parametrization of the unit circle
One sort of silly way to parametrize the unit circle is via the parametric equation \[t \mapsto (t, \sqrt{1-t^2})\]
The reason this doesn't help is that this parametrization just turns our integral from \[\int \frac{dx}{\sqrt{1-x^2}}\] to \[\int\frac{dt}{\sqrt{1-t^2}},\] which of course isn't any easier!
What classes of functions do we know how to integrate? The 'easiest' type of function to integrate is polynomials. And it turns out that there is a way to parametrize the unit circle by functions which are almost polynomials.
The parametrization of the unit circle by trigonometric functions is obtained by thinking of a point on a circle as being determined by the angle it is at. There is another way to specify a point on a circle with one number, though.
This second way was first observed by the ancient Greek mathematician Diophantus. Start by taking the point \((1, 0)\) on our circle; then, draw the line with slope \(t\) at \((1, 0).\) This is dranw in the widget below. This line will always intersect the circle at \((1, 0)\) and one other point; in this way, we can describe points of the circle using only one number (the slope \(t\) of our line).
With a bit of algebra, we can find the exact coordinates \((x(t), y(t))\) of this intersection point. The line with slope \(t\) passing through \((1, 0)\) has equation \[y = t(x-1)\] (using point-slope form). We want to find where this line intersects the circle \[x^2 + y^2 = 1.\] Substituting \(y=t(x-1)\) into the circle equation, we get the quadratic \[x^2 + t^2(x-1)^2 = 1.\] This seems bad at first glance: we want \(x\) to be a rational function of \(t,\) but generally to solve quadratics requires taking square roots! However, there's a very clever simplification we can do here: we already know that one of the solutions is \(x=1,\) because our line intersects the circle at \((1, 0).\)
By Vieta's formulas, we know that the product of the solutions to \[x^2 + t^2(x-1)^2 = 1\] is \[\frac{t^2-1}{1+t^2}.\] As the two solutions multiply to \((t^2-1)/(1+t^2),\) and one solution is \(1,\) the other solution must be \[x(t) = \frac{t^2-1}{1+t^2}.\] Thus we solved this equation without using the quadratic formula, and found a rational function of \(t\) as our answer!
Using \(y=t(x-1),\) we find then that \[y(t) = \frac{-2t}{1+t^2},\] giving us the parametrization \[t \mapsto \left(\frac{t^2-1}{1+t^2}, \frac{-2t}{1+t^2}\right).\]
Back to our integral
We can now do our integral. Recall that we're trying to integrate \[\int\frac{dx}{y}.\] Substituting \[x = \frac{t^2-1}{1+t^2},\] \[y = \frac{-2t}{1+t^2},\] we find that \[\frac{dx}{y} = \frac{-2}{1+t^2} \, dt.\]
Thus our integral becomes \[\int \frac{-2}{1+t^2} \, dt,\] the integral of a rational function! Using the algorithm mentioned before for integrating rational functions, this integral is just \[\int \frac{-2 dt}{1+t^2} = -2\arctan(t) + C.\] We're not quite done yet, though: we still need to change this back to \(x,\) using the relationship \[x = \frac{t^2-1}{t^2+1}.\]
Remember that \(\arctan(t)\) is some angle \(\theta\) having the property that \(\tan(\theta) = t.\) Thus we can say \[x = \frac{\tan(\theta)^2 - 1}{\tan(\theta)^2 + 1}.\] Using that \(\tan(\theta) = \sin(\theta)/\cos(\theta),\) we find \[x = \frac{\sin(\theta)^2 - \cos(\theta)^2}{\sin(\theta)^2 +\cos(\theta)^2} = -\cos(2\theta),\] wher in the last step we use some common trigonometric identities. So, we can rewrite -2\arctan(t) = -2\theta = \arccos(-x),\] getting \[\int \frac{dx}{\sqrt{1-x^2}} = \arccos(-x) + C,\] which is the more standard answer. Using the identity \(\arccos(-x) = \arcsin(x) + \pi/2,\) and absorbing the \(\pi/2\) into the \(+C,\) you could also write the antiderivative as \(\arcsin(x) + C.\)
Another application: Pythagorean triples
Why bother using this rational parametrization of the unit circle, instead of just doing a trigonometric subsitution? One answer is that the rational parametrization can be used to solve other problems that the trigonometric parametrization cannot.
Recall that a Pythagorean triple is a triple of three whole numbers \(a,b,c\) such that \[a^2 + b^2 = c^2,\] meaning that \(a,b,c\) form the sides of a right triangle. Examples of Pythagorean triples are \(3,4,5\) and \(5,12,13.\)
How can we find all Pythagorean triples? It turns out our rational parametrization helps us out! First, instead of trying to find integer solutions to \(a^2+b^2=c^2,\) let's divide by \(c^2,\) to instead find rational number solutions to \[\left(\frac{a}{c}\right)^2 + \left(\frac{b}{c}\right)^2 = 1.\] Thus, we're just trying to find points on the unit circle both of whose coordinates are ratios of integers. This can be done with our rational parametrization: every point on the unit circle is of the form \[\left(\frac{t^2-1}{t^2+1}, \frac{-2t}{t^2+1}\right).\] The only way this point has both coordinates rational is when \(t\) is a rational number; all Pythagorean triples come from plugging in rational values of \(t\) to our parametrization! For example, plugging in \(t=-2\) gives \[(3/5, 4/5),\] recovering our \(3,4,5\) right triangle from earlier; plugging in \(t=-10\) gives \[(99/101, 20/101),\] which corresponds to the Pythagorean triple \(20,99,101,\) which you might not have seen before. In other words, just by plugging in different values of \(t,\) we can discover new Pythagorean triples!
The harder integral
Why is the integral \[\int\frac{dx}{\sqrt{x^3-2}}\] so hard to compute, then?
To understand why, let's substitute \[y = \sqrt{x^3-2}.\] Then \[y^2 = x^3 - 2.\]
When we graph this equation in the coordinate plane, we get a complicated looking curve:
The key to solving the integral \[\int\frac{dx}{\sqrt{1-x^2}}\] was finding a 1-variable parametrization of the curve \(x^2 + y^2 = 1\) by rational functions. Because rational functions are 'easy' to integrate, the resulting integral was easy to do.
So, can we find rational functions \(x(t)\) and \(y(t)\) parametrizing the curve \[y^2 = x^3 - 2?\]
Remarkably, this is impossible: there is no such parametrization by rational curves!
And even more remarkably, the easiest way to understand this non-existence result is to go to complex geometry.
Graphing equations over the complex numbers
To explain why \(y^2 = x^3 - 2\) cannot be parametrized by rational functions, let's start by discussing graphs in the complex plane.
Normally, when someone grpahs \(y^2 = x^3 - 2,\) they look for all pairs of real numbers \(x\) and \(y\) which solve that equation, and sketch all such pairs inside of the Euclidean plane. However, we could just as well ask for pairs of complex numbers satisfying this equation; for example, \((1, i)\) is a solution over the complex numbers. We can then plot these points inside of \(\mathbb{C} \times \mathbb{C},\) the product of two copies of the complex plane (in the same way the real number graphs are plotted in \(\mathbb{R} \times \mathbb{R}\)).
Unfortunately, it can be quite tricky to understand the graphs of functions over the complex numbers; while a graph over the real numbers produces a 1-dimensional curve inside of a 2-dimensional ambient space, the graph of a function over the complex numbers gives a 2-dimensional surfaces inside of an ambient 4-dimensional space; this is because the complex plane is 2-dimensional, and so graphs become 2-dimensional shapes inside of the 4-dimensional space \(\mathbb{C} \times \mathbb{C}.\)
The great geometers Poincare and Riemann made huge progress on understanding the possible shapes of these graphs, despite how geometrically inaccessible they first seem. Poincare, with his classification of surfaces, showed that -- while originally the graph is a 2-dimensional subset of 4-dimensional space -- you can always actually fit the graph inside of 3-dimensional space in some way, and the resulting shape looks like a donut with some number of holes:
In this widget, we animated the 0 hole, 1 hole, 2 hole, and 3 hole cases (called genus 0, 1, 2, and 3), but of course you could have as high a genus as you want; I just got bored of animating at genus 3.
Poincare's proof of this fact actually goes by classifying all possible 2-dimensional shapes, embedded inside of any higher dimension ambient space. Riemann observed that the possible graphs of polynomials over the complex numbers had a special property called orientability; if you go through Poincare's list of all possible 2-dimensional shapes, it turns out that all the orientable ones fit inside of 3-dimensions.
There's actually one small caveat here: in order for Poincare's classification to apply, we need to compactify our graphs. This means adding extra points 'at infinity' to close them up. We won't dwell too much on this procedure here, though. However, because of this caveat, Poincare's classification really can only be used to understand graphs of polynomials; otherwise the shapes are too complicated to say much about in general.
The degree-genus formula allows one to calculate the genus of the graph of any polynomial just from the degree of the polynomial equation; it is \[g = \frac{1}{2}(d-1)(d-2),\] where \(g\) is genus and \(d\) is the highest degree of a term in your polynomial. Plugging in \(d=3\), we find that our degree 3 equation \(y^2 = x^3 - 2\) has genus \(g=1.\) Thus this graph looks like a donut!
Rational functions and the Riemann sphere
OK, so now we know what shapes \(y^2 = x^3 - 2\) and \(x^2 + y^2 = 1\) make when we graph them over the complex numbers. But why is this important?
Let's think about what a parametrization by rational functions means. It means we have some bijective function \[t \mapsto (x(t), y(t))\] from one number \(t\) to pairs \((x, y)\) on our graph, such that \(x(t), y(t)\) are both rational functions.
The 'shape' of one complex number is the complex plane, \(\mathbb{C}.\) Compactifying this (recall the notion of compactification from the last section) gives the sphere, which in this context people call \(\mathbb{CP}^1\) (the 'complex projective line').
Thus a parametrization by rational functions is actually a bijective function \[\mathbb{CP}^1 \to \text{our graph}.\] Here, the fact that \(x(t), y(t)\) were rational functions is quite important: rational functions can always be extended to compactifications, but for more general functions you cannot always do this.
However, \(\mathbb{CP}^1\) is a sphere, and our graph \(y^2 = x^3 - 2\) was a torus! This are different shapes: there's no way to have the sphere map bijectively (and continuously) to the torus.
So, the fact that our graph was a torus (and not a sphere) forbids us from even parametrizing our curve by rational functions -- and this is why the integral is so hard: there's no substitution you can do to reduce it to an integral of rational functions!
Diophantine equations
When discussing the rational parametrization of the unit circle, we showed how one could use it to solve the Diophantine equation \(a^2 + b^2 = c^2,\) and thus find all Pythagorean triples.
In the same way that \(x^2 + y^2 = 1\) gave rise to that Diophantine equation \(a^2+b^2=c^2,\) the equation \[y^2 = x^3 - 2\] is related to the Diophantine equation \[a^3 + b^2c = 2c^3.\] This Diophantine equation is shockingly hard to solve! If you stare at it for a little, you might notice that \[25 = 27 - 2,\] or \(5^2 = 3^3 - 2,\) so \((3, 5)\) is one solution; similarly, \((3, -5)\) is a solution. These are in fact the only two solutions, but proving this is quite tricky unless you know some algebraic number theory!
It turns out that, whenever one is given a Diophantine equation (that is, a polynomial equation one wants integer or rational solutions for), the best 'first step' to solving it is to find the corresponding polynomial equation over the complex numbers, and get a feel for the geometry of the resulting shape.
This is one of the many subtle links between number theory and algebraic geometry over the complex numbers. To end this article, we'd like to just remark about how surprising this connection is: somehow, the geometry of an equation over the complex numbers tells you about the difficulty of solving a related equation over the integers. Somehow, these two very different number systems -- the complex numbers and the integers -- seem to be talking to each other.