• Practice
  • About 16 min
  • 5 practice questions

Exact equations: the test ∂M/∂y = ∂N/∂x and the solution

Recognise an exact equation M dx + N dy = 0 by the test ∂M/∂y = ∂N/∂x, solve it by integrating M with respect to x and adding the y-only terms of N, and find a constant that makes an equation exact.

If something looks wrong, please tell us.

Some first-order equations are neither separable nor linear, yet they are the exact differential of a function. An equation M dx + N dy = 0 is called exact when M dx + N dy is the total differential dF of some function F(x, y). Then the solution is simply F(x, y) = C. This lesson gives the quick test, the solving routine and the usual exam traps.

The test

If F(x, y) has the total differential dF = (∂F/∂x) dx + (∂F/∂y) dy, then M = ∂F/∂x and N = ∂F/∂y. Differentiating M with respect to y and N with respect to x gives the same mixed second derivative of F. So a necessary and sufficient condition for exactness (on a region without holes) is ∂M/∂y = ∂N/∂x. Here a partial derivative treats the other variable as a constant.

M dx + N dy = 0 is exact ⇔ ∂M/∂y = ∂N/∂x. Then F = ∫M dx (y treated as a constant) + [terms of N that contain no x, integrated with respect to y], and the solution is F = C.

The routine

  • Write the equation as M dx + N dy = 0 and test ∂M/∂y = ∂N/∂x.
  • Integrate M with respect to x, treating y as a constant.
  • Look at N: the terms of N that do not contain x are not yet accounted for. Integrate them with respect to y and add.
  • Write the sum equal to C, and check that ∂F/∂x = M and ∂F/∂y = N.

Worked example 1: a polynomial equation

Solve (2xy + 3) dx + (x² + 4y) dy = 0. Here M = 2xy + 3 and N = x² + 4y. ∂M/∂y = 2x and ∂N/∂x = 2x, equal, so the equation is exact. ∫M dx = x²y + 3x. The terms of N with no x are 4y, whose integral is 2y². So the solution is x²y + 3x + 2y² = C. Check: ∂F/∂x = 2xy + 3 = M and ∂F/∂y = x² + 4y = N. With the condition y = 1 when x = 1, C = 1 + 3 + 2 = 6.

Worked example 2: trigonometric terms

Solve (sin y + y cos x) dx + (x cos y + sin x) dy = 0. ∂M/∂y = cos y + cos x and ∂N/∂x = cos y + cos x, so it is exact. ∫M dx = x sin y + y sin x. N has no term free of x (both terms contain x or sin x), so nothing is added. The solution is x sin y + y sin x = C. Check: ∂F/∂y = x cos y + sin x = N.

Worked example 3: another exact equation

Solve (2x + y) dx + (x + 2y) dy = 0. ∂M/∂y = 1 = ∂N/∂x. ∫M dx = x² + xy and the part of N with no x is 2y, giving y². The solution is x² + xy + y² = C. Note that the shortcut 'x² + 2xy + y²' would come from treating the two terms as a perfect square, which does not match: its derivative with respect to x is 2x + 2y, not 2x + y.

Worked example 4: finding the constant

For which k is (3x²y + ky²) dx + (x³ + 4xy) dy = 0 exact? ∂M/∂y = 3x² + 2ky and ∂N/∂x = 3x² + 4y. Equating, 2k = 4 and k = 2. Then ∫M dx = x³y + 2xy², and since N = x³ + 4xy contains x in every term, the solution is x³y + 2xy² = C.

Traps

  • Equations such as y dx − x dy = 0 fail the test (∂M/∂y = 1, ∂N/∂x = −1) and need another method, for example separation of variables.
  • Do not forget to add the y-only part of N; leaving it out gives a function whose ∂F/∂y is not N.
  • Integrate M with respect to x only, with y held constant; do not add a term that is already present.
  • Always check ∂F/∂x = M and ∂F/∂y = N.

Key takeaways: test ∂M/∂y = ∂N/∂x; build F from M and the x-free part of N; the solution is F = C. If the test fails, try another method. The same test finds the constant that makes an equation exact.

Check your understanding

  1. 1. Which of these equations is exact?

    1. (x + 2y) dx + (3x + y) dy = 0
    2. (2xy + 3) dx + (x² + 4y) dy = 0
    3. (y + 1) dx + (2x − y) dy = 0
    4. x dx + (x + y) dy = 0
    Show answer

    Answer: B. For (2xy + 3) dx + (x² + 4y) dy = 0, ∂M/∂y = 2x = ∂N/∂x. For the others the test fails: 2 ≠ 3, 1 ≠ 2 and 0 ≠ 1.

  2. 2. The solution of (sin y + y cos x) dx + (x cos y + sin x) dy = 0 is:

    1. x cos y + y cos x = C
    2. sin x sin y = C
    3. x sin y − y sin x = C
    4. x sin y + y sin x = C
    Show answer

    Answer: D. F = ∫M dx = x sin y + y sin x. Check ∂F/∂y = x cos y + sin x, which is N.

  3. 3. For which k is (3x²y + ky²) dx + (x³ + 4xy) dy = 0 exact?

    1. k = 2
    2. k = 4
    3. k = 1
    4. k = 3
    Show answer

    Answer: A. ∂M/∂y = 3x² + 2ky must equal ∂N/∂x = 3x² + 4y, so 2k = 4 and k = 2.

  4. 4. The solution of (2x + y) dx + (x + 2y) dy = 0 is:

    1. x² + 2xy + y² = C
    2. x² + xy + 2y² = C
    3. x² + xy + y² = C
    4. 2x² + xy + y² = C
    Show answer

    Answer: C. ∫(2x + y) dx = x² + xy, and the x-free part of N is 2y, contributing y². Check: ∂F/∂x = 2x + y and ∂F/∂y = x + 2y.

  5. 5. The solution of (2xy + 3) dx + (x² + 4y) dy = 0 through (1, 1) is x²y + 3x + 2y² = C with C equal to:

    1. 4
    2. 5
    3. 3
    4. 6
    Show answer

    Answer: D. Substituting x = 1, y = 1: 1 + 3 + 2 = 6.

Privacy · Terms · Refunds · Delivery