# The World Can Be a Bit Too Complex: Closed-Form Expressions

The world is complex and depeding what we want to measure, describe or predict, and to which extent, we may need to use different mathematical tools. This topic invites us to have a look at concepts related to closed-form solutions in mathematics.

## Examples in the real world

Let’s make a classification of phenomena that have different mathematical properties, even if intuitively:

### Non-closed-form expressions

• Stock prices: Stock prices are influenced by a wide range of factors such as economic conditions, company performance, and investor sentiment. Modeling stock prices is a challenging task that requires dealing with non-linearity, volatility, and uncertainty. It’s not possible to represent stock prices with a closed-form expression.
• Climate systems: Climate systems are complex and dynamic systems that are influenced by a wide range of factors such as solar radiation, atmospheric circulation, and ocean currents. Modeling climate systems is a challenging task that requires dealing with non-linearity, variability, and uncertainty. It’s not possible to represent climate systems with a closed-form expression.
• Human behavior: Human behavior is influenced by a wide range of factors such as cognitive processes, emotions, and social interactions. Modeling human behavior is a challenging task that requires dealing with non-linearity, variability, and uncertainty. It’s not possible to represent human behavior with a closed-form expression.

### Closed-form expressions

• Mechanical systems: Mechanical systems such as a mass-spring system or a pendulum, can be modeled using Newton’s laws of motion and represented by a set of differential equations which can be solved using closed-form expressions.
• Electrical systems: Electrical systems such as a circuit, can be modeled using Ohm’s law and Kirchhoff’s laws and represented by a set of equations which can be solved using closed-form expressions.
• Chemical systems: Chemical systems such as a reaction kinetics, can be modeled using rate laws and represented by a set of equations which can be solved using closed-form expressions.

## Examples in the abstract world

### Non-closed-form expressions

• Neural network: Neural networks are a type of machine learning model that can be used to represent complex functions. The function represented by a neural network is not a closed-form expression because it is defined by a large number of parameters and non-linear operations.
• Fractal pattern: A fractal is a geometric shape that can be divided into smaller parts that are similar to the whole. The equation that generates a fractal pattern is not a closed-form expression because it requires an infinite number of iterations to generate the pattern.
• Chaotic system: A chaotic system is a system that is highly sensitive to initial conditions, and its behavior can be hard to predict. The equations that describe chaotic systems are not closed-form expressions because they involve non-linear operations and may require infinite summations or integrals.

### Closed-form expressions

• Polynomial function: A polynomial is a mathematical expression that is a sum of powers of x, with coefficients. For example, the expression $3x^2 + 2x - 1$ is a polynomial.
• Trigonometric function: Trigonometric functions such as sine and cosine are examples of closed-form expressions. They are defined by a set of elementary operations and elementary functions.
• Exponential function: Exponential functions such as $e^x$, are also examples of closed-form expressions.

There are many other examples and, even though a function may be represented in closed-form, it may still be difficult or computationally expensive to evaluate for certain inputs.

## Closed-form expressions

After some examples, it may make sense to introduce a more proper definition. That is, a closed-form expression is a mathematical expression that can be evaluated in a finite number of steps, without the need for infinite summations or integrals. It is a type of mathematical representation that can be evaluated symbolically, rather than being defined as a procedure or algorithm.

Closed-form expressions are often used to represent functions that can be expressed as a combination of elementary mathematical operations (such as addition, subtraction, multiplication, division, etc.) and elementary functions (such as polynomials, exponentials, logarithms, etc.). For example, the expression $3x^2 + 2x - 1$ is a closed-form expression because it can be evaluated for any value of $x$.

### Comments for machine learning and optimization

Thinking of machine learning, gradient descent is an optimization method that requires the gradient of the function to be optimized, which can be calculated via closed-form expression, if the function is differentiable and the gradient can be computed analytically.

On the other hand, if the function can’t be expressed in closed-form or its gradient is difficult or expensive to compute, other optimization techniques such as MCMC may be more appropriate.

It’s worth noting that closed-form expressions are not always the best way to represent a function, especially if the function is high-dimensional or non-smooth. In such cases, an alternative representation such as a neural network or a kernel-based model may be more appropriate.

## The thin line

### Example of celestial bodies and weather

As you may have guessed, this artificial classification is not perfect and there are plenty of instances where it may not be clear. One example of a natural phenomenon where the thin line between closed-form and non-closed-form solutions is visible is the motion of celestial bodies such as planets and moons. The motion of these bodies can be described by the laws of physics and Newton’s laws of motion, which are based on a closed-form mathematical formulation. However, the motion of celestial bodies is also affected by other factors such as the gravitational pull of other bodies, which can make the problem more complex and difficult to solve exactly.

For the solar system, Kepler scientists such as Kepler and Laplace have managed to find closed-form solutions that accurately describe the motion of the planets and moons with high precision. However, as the number of celestial bodies in a system increases, the problem becomes more complex, and it becomes increasingly difficult to find closed-form solutions that accurately describe the motion of all the bodies in the system.

In general, celestial mechanics are an example of a natural phenomenon where the line between closed-form and non-closed-form solutions is visible. The motion of celestial bodies can often be described by closed-form mathematical formulations, but the complexity of the problem and the number of bodies involved can make it difficult to find exact closed-form solutions. In many cases, it is only possible to approximate the motion of celestial bodies using numerical methods.

Another example is the study of weather forecasting, where the complexity of the problem and the number of variables involved makes it difficult to find closed-form solutions. Weather forecasting relies heavily on numerical methods to simulate the behavior of the atmosphere, and the results are often approximate, rather than exact.

### Generalization

There is often a thin line between what phenomena can or cannot be described with a closed-form expression. In some cases, it may be possible to find an exact closed-form solution for a problem, while in other cases, it may be possible to find an approximate closed-form solution. In other cases, it may not be possible to find an exact or approximate closed-form solution, but it may still be possible to approximate the solution using numerical methods. The ability to find a closed-form solution depends on the complexity of the problem and the mathematical tools available to solve it. In general, simple and well-defined problems with a limited number of variables and known mathematical structure tend to have closed-form solutions, while complex and ill-defined problems with a large number of variables and unknown mathematical structure tend to not have closed-form solutions.

It’s worth noting that, the definition of closed-form expressions can be somewhat ambiguous, as it can vary depending on the field of study, the context, and the level of rigor required. Some researchers might consider an expression to be closed-form if it can be evaluated in a finite number of steps using a fixed set of mathematical functions, while others might require that the expression be a combination of a finite number of algebraic operations and elementary functions.

## Summary

A closed-form expression is a mathematical formula or equation that can be evaluated in a finite number of steps using only basic mathematical operations (such as addition, subtraction, multiplication, and division) and a fixed set of mathematical functions (such as polynomials, exponentials, logarithms, and trigonometric functions). It’s a “closed” form because it allows you to find an explicit solution, rather than having to rely on numerical methods to approximate it. It’s a way of describing a mathematical concept or phenomenon using a clear and compact representation, which can be easily evaluated and understood, rather than having to resort to iterative or numerical methods to obtain an approximate solution.

## Key takeaways

• A closed-form solution is a mathematical formula or equation that can be evaluated in a finite number of steps using only basic mathematical operations and a fixed set of mathematical functions.
• The ability to find a closed-form solution depends on the complexity of the problem and the mathematical tools available to solve it.
• Simple and well-defined problems with a limited number of variables and known mathematical structure tend to have closed-form solutions.
• Complex and ill-defined problems with a large number of variables and unknown mathematical structure tend to not have closed-form solutions.
• The definition of closed-form expressions can be somewhat ambiguous, as it can vary depending on the field of study, the context, and the level of rigor required.
• The motion of celestial bodies, weather forecasting are examples of natural phenomena where the line between closed-form and non-closed-form solutions is visible.