Let's say I have a collection of decaying exponentials of the form $$ A_i \exp(-x / d_i), $$ and I want their sum (actually the square of their sum) to approximate a 'peaked' function. For example, consider $$ A_1 = 1, \quad A_2 = -1, \quad d_1 = 432, \quad d_2 = 166, $$ over the range of $x \in [0, 1000]$.
This produces a result that looks like:
where the first plot shows the two exponentials and the second is the square of the sum. This is nice, but I'd really like more exponentials and a more 'peaked' function. In the ideal case, I'd have a top-hat function where I could control the centre of the hat.
I've found this paper that provides methods for complex exponentials, but I want all of mine to be real. Is this something that can be found analytically? If not, are there better methods than just trying a non-linear least-squares fit?
