FWHM for a quadratic
This post contains a derives a result I needed recently. The derivation is simple but a little tedious, so I wanted to save it in case I need it again.
Full width half maximumA common way to measure the width of a function peak in a function f(x) is to find the place x0 where f takes on its maximum, and find two points, x-1 to the left and x1 to the right, where f drops to half its peak value, i.e.
f1 = f(x0) / 2.
The width of the peak is then defined to be the distance between these two points:
FWHM = x1 - x-1
where FWHM stands for full width half maximum." I've mentioned FWHM a few times before, such as here.
It's also useful sometimes to find the full width at k times the maximum for values of k other than 1/2 and so we'll solve the more general problem.
Quadratic caseNow suppose f is a quadratic function
f(x) = ax^2 + bx + c.
where a is not zero. We want to find the FWHM of f, and more generally find the distance between two points where f takes on values k times its maximum (or minimum).
Taking the derivative of f shows that the vertex of the parabola occurs when
2ax + b = 0
and so
x0 = -b/(2a).
and
f(x0) = c - b^2/(4a).
Now we have to find two solutions to
f(x) = k f(x0)
which means
ax^2 + bx + c - k(c - b^2/(4a)) = 0.
This is a quadratic equation with constant term
c = c - k(c - b^2/(4a))
and so from the quadratic formula, the difference between the two roots is
( b^2 - 4ac ) / |a| = ( b^2 - 4a(1-k)c - kb^2 ) / |a|
When k = 1/2, this reduces to
FWHM = (b^2/2 - 2ac) / |a|.
ExamplesLet's try this on a couple examples to see if this checks out.
Maximum exampleLet
f(x) = 20 - (x - 2)^2 = -x^2 + 4x +16
Clearly the maximum is 20 and occurs at x = 2. The quadratic formula shows the two places where f takes half its maximum value are
x = 2 10
and so the FWHM equals 210.
If we use the formula for FWHM above we get
( 4^2/(2) + 32) = 40 = 210.
Minimum exampleLet's do another example, this time looking for where a convex parabola takes on twice its minimum value. So here we set k = 2 and so the expression
( b^2 - 4ac ) / |a| = ( b^2 - 4a(1-k)c - kb^2 ) / |a|
above reduces to
(4ac - b^2) / |a|.
Let
f(x) = 3x^2 + 2x + 1
Then the minimum of f occurs at -1/3 and the minimum equals 2/3. We want to find where f equals 4/3. The quadratic formula shows this occurs at
(-1 2)/3
and so the distance between these two points is 22 / 3.
If we plug a = 3, b = 2, and c = 1 into
(4ac - b^2) / |a|
we get the same result
The post FWHM for a quadratic first appeared on John D. Cook.