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 maximum

A 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.

f±1 = f(x0) / 2.

The width of the peak is then defined to be the distance between these two points:

FWHM = x1x−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 case

Now suppose f is a quadratic function

f(x) = ax² + 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²/(4a).

Now we have to find two solutions to

f(x) = k f(x0)

which means

ax² + bx + ck(c − b²/(4a)) = 0.

This is a quadratic equation with constant term

c‘ = ck(cb²/(4a))

and so from the quadratic formula, the difference between the two roots is

√( b² − 4ac‘ ) / |a| = √( b² − 4a(1-k)c − kb² ) / |a|

When k = 1/2, this reduces to

FWHM = √(b²/2 − 2ac) / |a|.

Examples

Let’s try this on a couple examples to see if this checks out.

Maximum example

Let

f(x) = 20 − (x − 2)² = −x² + 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 2√10.

If we use the formula for FWHM above we get

√( 4²/(2) + 32) = √40 = 2√10.

Minimum example

Let’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² − 4ac‘ ) / |a| = √( b² − 4a(1 − k)c − kb² ) / |a|

above reduces to

√(4acb²) / |a|.

Let

f(x) = 3x² + 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 2√2 / 3.

If we plug a = 3, b = 2, and c = 1 into

√(4acb²) / |a|

we get the same result

One thought on “FWHM for a quadratic

Comments are closed.