We often talk about mathematical beauty and how they end up describing incredible patterns or phenomena. But are there any mathematical equations that are extremely non-trivial and virtually unsolvable which have strong real-world applications?
Edit: I realized that to obtain appropriate answers, I must define the word "ugly." An equation is said to be ugly if it satisfies on or more conditions
1) Large Number of Variables.
2) Describes a trivial phenomena in a non-trivial manner.
3) Is derived using a brute force approach.
The following equation is an expression of the fact that matrix multiplication is associative: \begin{eqnarray*} \sum_{j=1}^{m}\left[a_{ij}\left(\sum_{k=1}^{n}b_{jk}c_{kl}\right)\right] & = & \sum_{k=1}^{n}\left[\left(\sum_{j=1}^{m}a_{ij}b_{jk}\right)c_{kl}\right] \end{eqnarray*}
I would say (and indeed, your criteria seem to agree) that the above equation is "ugly". However, the fourth point above is important: usually, ugly things can be rewritten in more elegant (though, in some situations, less useful) ways.
Another example that illustrates this last point especially well is the definition of the determinant of a matrix. The usual definition that students are introduced to is as some horrible summation involving cofactors etc., rather than the more elegant view as simply the volume scale factor of the unit cube (with a few terms and conditions).