Given a function *f*(*x*, *y*), how can you tell whether *f* can be factored into the product of a function *g*(*x*) of *x* alone and a function *h*(*y*) of *y* alone? Depending on how an expression for *f* is written, it may or may not be obvious whether *f*(*x*, *y*) can be separated into *g*(*x*) *h*(*y*).

There are several situations in which you might want to know whether a function is separable. For example, the ordinary differential equation

*y*′ = *f*(*x*, *y*)

can be solved easily when *f*(*x*, *y*) = *g*(*x*) *h*(*y*).

You might want to do something similar for a partial differential equation, using separation of variables, possibly choosing a coordinate system that allows the separation of variables trick to work.

Aside from applications to differential equations, you might want to know whether a polynomial in two variables can be factored into the product of polynomials in each variable separately.

In [1] David Scott gives a simple necessary condition for *f* to be separable:

*f* *f*_{xy} = *f*_{x} *f*_{y}

Here the subscripts indicate partial derivatives.

It’s easy to see this condition is necessary. Scott shows the condition is also sufficient under some mild technical assumptions.

As an example, determine the value of *k* such that the differential equation

*y*′ = 6*xy*² + 3*y*² −4*x* + *k*

is separable.

Scott’s equation

*f* *f*_{xy} = *f*_{x} *f*_{y}

becomes

(6*xy*² + 3*y*² −4*x* + *k*)(12*y*) = (6*y*² −4)(12*xy* + 6*y*)

which holds if and only if *k* = −2.

## Related posts

- Undetermined coefficients (PDF)
- Numerically solving the Van der Pol equation
- Heat equation and the normal distribution

[1] David Scott. When is an Ordinary Differential Equation Separable? The American Mathematical Monthly, Vol. 92, No. 6, pp. 422–423

The post When is a function of two variables separable? first appeared on John D. Cook.