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 *x*_{0} where *f* takes on its maximum, and find two points, *x*_{−1} to the left and *x*_{1} to the right, where *f* drops to half its peak value, i.e.

*f*_{±1} = *f*(*x*_{0}) / 2.

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

FWHM = *x*_{1} − *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 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

2*ax* + *b* = 0

and so

*x*_{0} = −*b*/(2*a*).

and

*f*(*x*_{0}) = c − *b*²/(4*a*).

Now we have to find two solutions to

*f*(*x*) = *k* *f*(x_{0})

which means

*ax² + bx* + *c* – *k*(c − *b*²/(4*a*)) = 0.

This is a quadratic equation with constant term

*c*‘ = *c* − *k*(*c* − *b*²/(4*a*))

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

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

When *k* = 1/2, this reduces to

FWHM = √(*b*²/2 − 2*ac*) / |*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*² + 4*x* + 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*² − 4*ac*‘ ) / |*a*| = √( *b*² − 4*a*(1 − *k*)*c* − *kb²* ) / |*a*|

above reduces to

√(4*ac* − *b*²) / |*a*|.

Let

*f*(*x*) = 3*x*² + 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

√(4*ac* − *b*²) / |*a*|

we get the same result

This article would be in my opinion more accessible with a few plots.