Two Gaussian functions: f1,f2 of the form f1 = a1*Exp[-t^2/s1^2]. Total area, Atot of (f1+f2) is known. Height of each peak (a1 and a2) is known (experimental data). I don't want to experimentally determine FWHM, although it could be done. Integration gives:

Atot=Sqrt[2 π] (a1 s1 Erf[1/(Sqrt[2] s1)] + a2 s2 Erf[1/(Sqrt[2] s2)])

By plotting the function for Atot, I know this has four solutions for variables {s1,s2} for a given Atot, a1, and a2. However, constraint is that s1 and s2 both > 0, which yields one unique solution. (i.e. Atot = 1.1001, a1 = 0.382, a2 = 0.384)

How to solve in Mathematica?

  • 4
    $\begingroup$ Two unknowns require two equations. You need another one involving s1 and s2. $\endgroup$ – J. M.'s technical difficulties Mar 17 '19 at 12:38
  • 2
    $\begingroup$ In addition to what was noted by @J.M., it looks like the total area is not accounting for overlap. It is not obvious from the problem statement whether that is what you want. $\endgroup$ – Daniel Lichtblau Mar 17 '19 at 13:47

As stated in the comments, the solution is not unique!

This code gives a range of values where both $s_1$ and $s_2$ are positive (there are other ranges also).

Atot[a1_, a2_][s1_, s2_] := 
  Sqrt[2 \[Pi]] (a1 s1 Erf[1/(Sqrt[2] s1)] + a2 s2 Erf[1/(Sqrt[2] s2)]);
    {s1 = q}, FindRoot[Atot[.382, .384][s1, s2] - 1.01, {s2, 1}]
  ], {q, .255, .735}

For example ($s_1 = .255$ and $s_2 = 7.70763$) or ($s_1=0.5$ and $s_2=0.660332$), etc.

enter image description here

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.