Which Math Problems Have Closed-Form Solutions and Why?

Published on October 10, 2025

We're all familiar with math problems of the form "solve for x". These are asking specifically for a closed-form solution. So, some scalar value (or some may prefer R-value) pops out after the terms are rearranged and then you can write something like, "x = 2". The formal definition for closed-form solution is an expression containing a finite number of standard operations (+, -, *, /, √, etc.).

But, it turns out that for many problems finding a closed-form solution is very difficult or even impossible. When no closed-form solution exists, we must resort to numerical methods for approximating solutions. This might sound a little weird the first time you hear it, that in a way there really are questions we cannot answer exactly; but, you may also recall learning about irrational numbers and how a circle's circumference cannot be measured exactly, but only with increasing precision.

In fact, a lot of math is about recognizing the limits of what we can know. Like how Gödel showed that in any axiomatic system there are true statements that cannot be proven, Abel, Ruffini, Galois, etc. showed that there are polynomials that cannot be solved in closed-form. Even stranger, these limitations while they sound discouraging have led to incredible progress. Constructing function approximators led to arguyably the greatest ... The exact criteria for determining whether a closed-form solution exists differs across problem types, so I broke this essay into sections for a few common categories of math problems.

A calculator, through a deterministic process, provides exact answers to questions that have closed-form solutions, such as "what is $2 + 2$?". But, when an LLM is asked a question, its response is generated using numerical methods, and so in some ways it is never exactly "solving" anything. It is instead searching a vast space of possibilities to find the most likely answer. It's hard to say where humans would fall on this spectrum.

Introduction

I first encountered a problem without a closed-form solution (outside of an academic setting) when I was building my Portfolio Optimizer program. In the simplest case of minimizing portfolio variance for a given return, the optimal weights can be solved for analytically. I used the Lagrange Multiplier method, which conceptually is just setting the gradient of the objective function to zero to find its minimum point. But, once you complicate the problem by, for example, introducing an inequality constraint such as disallowing short-selling (requiring weights ≥ 0%), the gradient becomes discontinuous and we can't express the weights explicitly anymore.

The way I think about it is that, for "nice" optimization problems (those with functions that are: convex, differentiable, and linear or quadratic), there are methods that allow you to do something similar to "solving for x". But, for more complex problems involving state-spaces that are more rugged, like those of non-convex functions, you must instead run an algorithm to iteratively search for the minimum. This process of iterative calculations is what we call a numerical method.

Convex vs Not Convex

I. Polynomial/algebraic equations

Consider the simple linear equation $2x + 3 = 7$.

Problem
$2x + 3 = 7$
Solution
\[x = \frac{7 - 3}{2} = 2\]
Result: $x = 2$

Nothing too surprising there. We were able to find a closed-solution by isolating $x$. But before investigating whether more complex equations have closed-solutions, how can we know whether a solution to a polynomial exists at all?
The Fundamental Theorem of Algebra states that every polynomial of degree n has exactly n complex roots.
It's easy to visualize the FTA for functions with real roots (the three plots below). You can see that for a degree 1 polynomial (a line), there is always one root (where it crosses the x-axis), for degree 2 (a parabola) there are always two roots, and for degree 3 (a cubic curve) there are always three roots.

So, we know for certain that: (i) there exists exact solutions to all polynomials and (ii) some polynomials can be directly solved for using algebraic manipulation. It turns out that polynomials of degree 1-4 have closed-form solutions, and you can express them in a general formula. For example, quadratic equations (polynomials of degree 2) have a closed-form solution (the quadratic formula) that is taught in school. By ordering the equation into standard form $ax^2 + bx + c = 0$, we can directly apply the quadratic formula to find the roots.
Problem
$x^2 + 5x + 6 = 0$
Solution
\[ \begin{aligned} x &= \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} = \frac{-5 \pm \sqrt{25 - 24}}{2} = \frac{-5 \pm 1}{2} \end{aligned} \]
Result: $x = -2, -3$
The quadratic formula was discovered thousands of years ago because you can actually visually complete the square. There are generalized formulas for polynomials of degrees 3 and 4 as well; but, for polynomials of degree 5 and higher, no such general formulas can possibly exist. Some polynomials actually can't be solved in closed-form at all and can only be approximated using numerical methods.


Completing the square diagram

By Krishnavedala - Own work, CC BY-SA 3.0, Link

This was discovered when some mathematicians, instead of rearranging terms of polynomials to solve for roots as we are used to, found ways to rearrange or "permute" the polynomial's roots themselves in a way that left the polynomial's coefficients unchanged. This might sound pretty abstract at first, but ultimately it is just a way of revealing the inherent structure of a polynomial by viewing it from different perspectives. To explain this further, we must introduce some additional terms and theory.

A symmetry of a system is a transformation that changes something about the system but leaves some other property unchanged, which we call an invariant. For example, rotating a perfect sphere changes its orientation but leaves its shape and size unchanged. A sphere has rotational symmetry that leave its shape invariant.
Like a sphere, a polynomial can also have symmetries. The set of all symmetries that permute the polynomial's roots but leave the polynomial's coefficients unchanged is called its Galois group, $G$. Let's look at a simple example to see how this works in practice.
Problem
Show that the substitution $x \mapsto -x$ is a symmetry of $f(x) = x^2 - 2$.
Solution
\[ \begin{aligned} &\text{Apply substitution to polynomial: } f(-x) = (-x)^2 - 2 \\ &\Rightarrow\ f(-x) = x^2 - 2 = f(x) \\ &\text{The polynomial expression is unchanged.} \\ \\ &\text{What happens to the roots?} \\ &\text{Original roots: } \sqrt{2} \text{ and } -\sqrt{2} \\ &\text{Under } x \mapsto -x\text{:} \\ &\sqrt{2} \mapsto -\sqrt{2} \\ &-\sqrt{2} \mapsto \sqrt{2} \\ &\text{So, we say the substitution swaps the roots.} \end{aligned} \]
This example might seem a little contrived because the symmetry is so simple, but it illustrates the concept. Let's do an example of cyclic symmetries with a cubic polynomial.
Problem
Show that the substitution \(x \mapsto \omega x\) is a symmetry of \(f(x)=x^3-1\), where \(\omega = e^{2\pi i/3}\).
Solution
\[ \begin{aligned} &\text{Step 1 — what is }\omega\text{:}\\ &\quad \omega = e^{2\pi i/3} = \cos\!\left(\tfrac{2\pi}{3}\right) + i\sin\!\left(\tfrac{2\pi}{3}\right). \\ &\quad\text{Numerically that's a point at }120^\circ\text{ on the unit circle.}\\[6pt] &\text{Step 2 — why }2\pi/3\text{?}\\ &\quad\text{A polynomial of degree 3 has 3 roots.}\\ &\quad\text{These roots are equally spaced around the unit circle in the complex plane.}\\ &\quad\text{A full rotation is }2\pi.\\ &\quad\text{So, the angle between consecutive roots is } \tfrac{2\pi}{3}\ (120^\circ).\\[6pt] &\text{Step 3 — apply the substitution to the polynomial:}\\ &\quad f(\omega x) = (\omega x)^3 - 1 = \omega^3 x^3 - 1.\\ &\quad\text{But }\omega^3 = \big(e^{2\pi i/3}\big)^3 = e^{2\pi i} = 1.\\ &\quad\Rightarrow\ f(\omega x) = 1\cdot x^3 - 1 = x^3 - 1 = f(x).\\[6pt] &\text{So the polynomial expression is unchanged by }x\mapsto \omega x.\\[6pt] &\text{Step 4 — what happens to the roots?}\\ &\quad\text{The roots of }x^3-1=0\text{ are }1,\ \omega,\ \omega^2.\\ &\quad\text{Now multiply each root by }\omega:\\ &\qquad 1 \mapsto \omega,\\ &\qquad \omega \mapsto \omega^2,\\ &\qquad \omega^2 \mapsto \omega^3 = 1.\\ &\quad\text{Thus, without changing the coefficients, }x\mapsto\omega x\text{ permutes the roots}\\ &\quad\text{in a 3-cycle }(1\ \omega\ \omega^2). \end{aligned} \]
Result: Multiplication by \(\omega=e^{2\pi i/3}\) rotates points by \(120^\circ\), leaves the polynomial \(x^3-1\) unchanged (because \(\omega^3=1\)), and cyclically permutes the three roots. That rotation is the cyclic symmetry of the polynomial.
So, we now know how to construct the Galois Group by collecting the symmetries of the polynomial. We can now analyze the structure of this group to determine whether it is a solvable group. Whether the group is solvable tells us whether the polynomial has a closed-form solution or not.

A solvable group is one whose symmetries can be broken down step-by-step until only the trivial symmetry (in this case, the identity) remains. Just a reminder, the identity symmetry can be represented as: $x \mapsto x$. Let's do a fully worked-out example using $f(x) = x^2 - 2$ again to see how this works.
Problem
Determine whether $f(x) = x^2 - 2$ has a closed-form solution using Galois theory.
Solution
\[ \begin{aligned} &\textbf{Step 1: Identify the roots and symmetries}\\ &\text{The polynomial } f(x) = x^2 - 2 \text{ has roots } \sqrt{2} \text{ and } -\sqrt{2}.\\ &\text{We already showed that } x \mapsto -x \text{ is a symmetry (swaps the roots).}\\ &\text{The identity } x \mapsto x \text{ is always a symmetry (leaves roots unchanged).}\\[8pt] &\textbf{Step 2: Form the Galois group}\\ &\text{The Galois group } G = \{\text{id}, \sigma\} \text{ where:}\\ &\quad \text{id}: x \mapsto x \text{ (identity)}\\ &\quad \sigma: x \mapsto -x \text{ (swap)}\\[8pt] &\textbf{Step 3: Find all subgroups}\\ &\text{A subgroup must contain the identity and be closed under composition.}\\ &\text{Possible subgroups:}\\ &\quad H_1 = \{\text{id}\} \quad \text{(trivial subgroup)}\\ &\quad H_2 = \{\text{id}, \sigma\} = G \quad \text{(the whole group)}\\ &\text{Note: } \{\sigma\} \text{ is NOT a subgroup because } \sigma \circ \sigma = \text{id} \notin \{\sigma\}.\\[8pt] &\textbf{Step 4: Check if } G \textbf{ is solvable}\\ &\text{A group is solvable if we can build a chain of normal subgroups:}\\ &\quad \{\text{id}\} \triangleleft G\\ &\text{where each quotient is abelian (commutative).}\\ &\text{Here, } G/\{\text{id}\} \cong G = \{\text{id}, \sigma\} \text{ is abelian because:}\\ &\quad \text{id} \circ \sigma = \sigma = \sigma \circ \text{id}\\ &\text{Therefore, } G \text{ is solvable!} \end{aligned} \]
Result: Since the Galois group is solvable, the polynomial $f(x) = x^2 - 2$ has a closed-form solution: $x = \pm\sqrt{2}$.

II. Systems of linear equations

We began by looking at single polynomial equations, but what about systems of equations? Let's look at a system of two linear equations with two unknowns:

Problem
\[ \begin{aligned} 2x + 3y &= 8 \\ 4x - y &= 2 \end{aligned} \]
Solution
\[ \begin{aligned} &\text{From the second equation: } y = 4x - 2 \\ &\text{Substitute into the first: } 2x + 3(4x - 2) = 8 \\ &\Rightarrow\ 2x + 12x - 6 = 8 \\ &\Rightarrow\ 14x = 14 \\ &\Rightarrow\ x = 1 \\ &\text{Then } y = 4(1) - 2 = 2 \end{aligned} \]
Result: $x = 1$, $y = 2$
Nothing surprising there. But, like we did with single polynomials, can we find a general rule for when systems of linear equations have closed-form solutions?

Well there are two requirements that guarantee a closed-form solution for linear systems. You can find other ways of stating these two requirements, but I find the most intuitive to be:

When to expect closed-form solutions for linear systems

  • System is determined: There are the same number of linear equations as unknown variables. In the above example there is one unknown, $x$, and one equation that contains that unknown.
  • System is linearly independent: One equation cannot be expressed as a linear combination of the others, meaning that the two equations encompass all the necessary information to find a unique solution in all of $\mathbb{R}^2$, or the coefficient vectors' "span" is equal to $\mathbb{R}^2$.
So if we consider the example above that has two equations
It has two unknowns and two equations (it is determined)
The equations are linearly independent, which you can show yourself by drawing their coefficient vectors $\mathbf{v_1} = \begin{pmatrix} 2 \\ 3 \end{pmatrix}$ and $\mathbf{v_2} = \begin{pmatrix} 4 \\ -1 \end{pmatrix}$ in 2D space and observing that they are not parallel.

II. Systems of non-linear equations

II. Numeric Solution Example

Now let's look at examples where there is no closed-form solution. Here is a very small numeric example that shows an iterative solver in action. We'll compute $\sqrt{2}$ by solving $x^2 = 2$ using Newton's method. This method produces a sequence of approximations $x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}$ which converges rapidly for this problem.

Problem
Find $x$ such that $f(x)=x^2 - 2 = 0$ (i.e. $x=\sqrt{2}$).
Solution (Newton's method — numeric iteration)
\[ x_{n+1} = x_n - \frac{x_n^2 - 2}{2x_n} = \frac{1}{2}\left(x_n + \frac{2}{x_n}\right) \]
Sample iterations (start $x_0 = 1$)
\[ \begin{aligned} x_0 &= 1 \quad\Rightarrow\quad x_1 = \tfrac{1}{2}(1 + 2/1) = 1.5 \\ x_2 &= \tfrac{1}{2}(1.5 + 2/1.5) = 1.416\overline{6} \\ x_3 &\approx 1.4142156862745099 \quad(\text{accurate to }6\text{ digits}) \end{aligned} \]
Result (approx): $x \approx 1.41421356$ — arrived at numerically by iteration.

Before going deeper, it helps to classify the kinds of problems we try to solve. One useful lens is that there are four common goal types in mathematics; this context makes it clearer when closed forms exist and when they usually do not.

Level I — Goal Type (What you’re trying to find)

Category Description Typical Form Closed-Form Chance
A. Equation / Root Finding Find $x$ such that $f(x)=0$. Polynomial, exponential, trigonometric equations. High for linear or low-degree polynomials; falls rapidly for general nonlinear equations.
B. Optimization Find $x$ minimizing or maximizing $f(x)$. Linear, quadratic, or nonlinear objectives (with constraints). Depends on convexity and constraints; closed form mostly for simple linear/quadratic with equality constraints.
C. Integration / Summation Compute an area or total, $\int f(x)\,dx$ or $\sum f(x)$. Integrals, series. Often no closed form; numeric approximation (e.g., Simpson’s rule, Gaussian quadrature, Monte Carlo) is standard.
D. Differential / Dynamic Systems Solve for a function $y(t)$ such that $F(y, y', t)=0$ (or systems/PDEs). ODEs, PDEs, state-space models. Rare closed forms; iterative or symbolic approximation dominates.
← Back to Home