Skip to content
Tutorials Center
My learning

Topics

Lesson 26 of 68 ยท Multivariable Calculus

Homogeneous Functions and Euler's Theorem

Understand homogeneous functions of degree n, test for homogeneity, apply Euler's theorem for partial derivatives, and check results with sympy in Python.

Double every dimension of a box and its volume grows eightfold, its surface area fourfold, its diagonal twofold. Double the labour and capital in a factory and output may more than double, or less. In each case a quantity responds to scaling all inputs together by a clean power law. Functions with this property are homogeneous, and they obey a neat identity linking the function to its partial derivatives, called Euler's theorem.

You need Partial Derivatives and, for the last section, the idea of a gradient from Gradient and Directional Derivatives.

Definition

A function f(x, y) is homogeneous of degree n if, for every scaling factor t > 0 (in the domain),

f(t x, t y) = t**n f(x, y)

The same definition works with any number of variables. The degree n can be any real number: positive, zero, negative or fractional. Some examples:

Function Degree Why
x**2 + 3 x y 2 every term has total power 2
sqrt(x**2 + y**2) 1 the length of a vector scales with the vector
x**3 / y 2 3 - 1 = 2
x y / (x + y) 1 numerator degree 2, denominator degree 1
exp(x / y) 0 depends only on the ratio x / y
x**2 + y not homogeneous the terms have different degrees

For a polynomial, homogeneity just means that every term has the same total degree, and then the degree is that common value. For other functions, replace x by t x and y by t y and see whether you can pull out a pure power of t. A function of degree 0 depends only on the ratios of its inputs, which is the property used in dimensional analysis and in scale-free laws. A computer algebra system makes the test easy.

Python Testing homogeneity with sympy

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

When the ratio comes out as a pure power of t (t**2, t, or 1), the function is homogeneous of that degree. For x**2 + y the ratio still depends on x and y, so it is not homogeneous.

Euler's theorem

Euler's theorem on homogeneous functions. If f(x, y) is homogeneous of degree n and differentiable, then

x * (df/dx) + y * (df/dy) = n f

For k variables, x1 f_1 + x2 f_2 + ... + xk f_k = n f.

Why it is true

Differentiate the defining identity f(t x, t y) = t**n f(x, y) with respect to t, using the chain rule from The Chain Rule on the left side:

x f_x(t x, t y) + y f_y(t x, t y) = n t**(n - 1) f(x, y)

Now set t = 1. The left side becomes x f_x(x, y) + y f_y(x, y) and the right side n f(x, y), which is the theorem. The identity is just the statement that the derivative of the function along the ray from the origin is n times its value divided by distance: moving outward by a fraction dt changes f by n f dt.

Applying the same idea twice gives a second-order version for f of degree n with continuous second derivatives:

x**2 f_xx + 2 x y f_xy + y**2 f_yy = n (n - 1) f

Also, each first partial derivative f_x and f_y is itself homogeneous of degree n - 1. That follows from the chain rule applied to the same defining identity.

Python Verifying Euler's theorem symbolically

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The first five defects are 0, so Euler's relation holds. For the non-homogeneous x**2 + y the defect is -y, a clear sign that something is off. In the second-order check, both sides come out as 20 x**5 + 20 x**3 y**2, as the formula predicts.

Worked example by hand

Let u = x**3 + y**3 + x y**2, homogeneous of degree 3. Then u_x = 3x**2 + y**2 and u_y = 3y**2 + 2 x y, so

x u_x + y u_y = 3x**3 + x y**2 + 3 y**3 + 2 x y**2 = 3x**3 + 3y**3 + 3 x y**2 = 3 u.

Euler's theorem is useful the other way round too: if a problem asks you to show something like x u_x + y u_y = 3u for a complicated u, first check that u is homogeneous of degree 3 and quote the theorem, instead of differentiating.

A frequent exam pattern is a composite: if u = f(x/y) is homogeneous of degree 0, then x u_x + y u_y = 0. For functions that are not homogeneous but become so after a transformation (for instance u = tan^-1((x**3 + y**3)/(x - y))), apply Euler to the homogeneous inner part and use the chain rule on the outer function. That is why the theorem appears in many textbook problems.

Engineering uses

Returns to scale. A Cobb-Douglas production function Q = A L**a K**b is homogeneous of degree a + b. If a + b = 1, doubling both inputs doubles output (constant returns to scale); if it exceeds 1, you get increasing returns. Euler's theorem then reads L Q_L + K Q_K = (a + b) Q: when each input is paid its marginal product, total payments equal (a + b) times output.

Thermodynamics. Extensive quantities such as internal energy U(S, V, N) are homogeneous of degree 1 in their extensive arguments (double the system, double the energy), so Euler's theorem gives U = T S - p V + mu N.

Physics and geometry. Lengths, areas and volumes are homogeneous of degree 1, 2 and 3. Kinetic energy in the speed has degree 2, and power-law forces such as 1/r**2 are homogeneous of degree -2.

Scale-free optimisation. A degree-1 cost or norm, such as the Euclidean length, is positively homogeneous and its gradient is homogeneous of degree 0: its direction does not change if you scale the point.

Python Cobb-Douglas: scaling, Euler and the gradient

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

With a + b = 1.1, doubling both inputs multiplies output by 2**1.1 = 2.1435, a small increasing return. The numeric derivatives confirm Euler's relation to four decimals (205.7547 on both sides), and the partial derivatives themselves scale by 2**0.1 = 1.0718, because they are homogeneous of degree n - 1 = 0.1.

Common slips

  • Calling a function homogeneous because the highest terms look alike. Every term, and every constant, must have the same degree: x**2 + y**2 + 1 is not homogeneous.
  • Forgetting that the degree can be fractional or negative; sqrt(x**2 + y**2) has degree 1, not 2.
  • Applying Euler's theorem to a function that is homogeneous only after a substitution, without handling the outer function.
  • Confusing the degree n of f with the degree n - 1 of its partial derivatives.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the degree of homogeneity of f(x, y) = (x2 + y2) / (x y)?

    The numerator has degree 2 and the denominator degree 2, so f(tx, ty) = t**0 f(x, y).
  2. 2. Which statement is Euler's theorem for f(x, y) homogeneous of degree n?

    Differentiating f(tx, ty) = t**n f(x, y) with respect to t and setting t = 1 gives x f_x + y f_y = n f.
  3. 3. u = x2 y + y3 is homogeneous of degree 3. What is x u_x + y u_y?

    By Euler's theorem the result is n u = 3u. Directly: 2x2 y + x2 y + 3 y3 = 3 (x2 y + y**3).
  4. 4. If f is homogeneous of degree 4, what is the degree of its partial derivative f_x?

    Differentiating with respect to one variable lowers the degree by one, so f_x is homogeneous of degree 3.

Summary

  • f is homogeneous of degree n if f(t x, t y) = t**n f(x, y) for all t > 0; for polynomials, all terms have the same total degree.
  • Euler's theorem: x f_x + y f_y = n f (and the k-variable analogue); the second-order form gives n (n - 1) f.
  • The proof differentiates the defining identity with respect to t and sets t = 1.
  • Partial derivatives of a degree-n function have degree n - 1.
  • Applications include returns to scale, extensive thermodynamic quantities and scale-free laws.

Next: Gradient and Directional Derivatives.