What is the difference between an "analytical solution" and a "numerical solution"?

191 Views Asked by At

I'm reading a science fiction novel called "The Three Body Problem." The title refers to a common problem in physics about the difficulty in calculating the trajectories of three orbiting objects.

In all the research I've done about the titular problem, this is commonly noted.

the resulting dynamical system is chaotic for most initial conditions, and numerical methods are generally required.

That quote is from Wikipedia. In the text of the novel, a character even states:

I don’t think an analytical solution is possible, only a numerical one

I am not a mathematician. Can someone provide a metaphor here to explain the difference for a lay-person?

2

There are 2 best solutions below

2
On

Assuming no knowledge of mathematics let me use this metaphor.

You wish to open a lock.

One approach (your numerical) is to lockpick it. You insert a relevant tool to the lock, you do a bit of trial and error "feeling" when and where progress is made, and with a bit of luck you open it (find the solution).

The other (your analytical) approach is to use an imaging tool trying to fully understand the inns and outs of the lock mechanism, and thus create an exact key that will fit it and open the door (a direct solution) on a single try.

Analytic is the more elegant but depending on the case it might be unfeasible (the inner workings of your lock cannot be seen or a key just can't be made) or just too time consuming to be of practical value.

2
On

Generally speaking, finding an analytical solution to a problem means being able to express the solution as some kind of function of its inputs, usually one that is a combination of established, well-known functions. For example, $x = \sqrt{2}$ is an analytic solution to the equation $x^2 = 2$ (along with its companion $x = -\sqrt{2}$, and $y = Ae^{-kx}$ is an analytic solution to the differential equation $\frac{dy}{dx} = -ky$.

On the other hand, finding a numeric solution means that we can find approximate numeric values through some kind of procedure. For example, $x = 1.414...$ is a numeric solution to $x^2 = 2$, and there are various algorithms that let us calculate $x$ to an arbitrary number of decimal places. Similarly, if we had the differential equation $\frac{dy}{dx} = -0.5 y$ and the initial condition $y(0) = 1$, then a numeric solution might look something like:

$t$ 0 1 2 3 4 5
$y$ 1 0.586 0.343 0.201 0.118 0.069

where I've again used some kind of algorithm to find suitable approximate values (for those playing at home, this came from Euler forward integration using a step size of 0.25).