Intuition What this page is for
The parent note gave you the machinery: test ∂ M / ∂ y = ∂ N / ∂ x , then rebuild the hill F ( x , y ) and write F = c . Here we stress-test that machinery on every kind of equation you can meet : nice ones, sign-flipped ones, ones with a zero coefficient, ones that fail the test, ones that only become exact after a trick, and a real word problem.
Before we start, two reminders in plain words so no symbol is unearned:
M is the coefficient sitting in front of d x ; N is the coefficient in front of d y . Think of them as the two slopes of a hill F : how steep it climbs as you step east (M = F x ) and as you step north (N = F y ).
∂ M / ∂ y (read "the partial of M with respect to y ", written M y ) means: freeze x as if it were a fixed number, then differentiate M treating only y as the variable. That is the partial derivative .
Every exact-equation problem falls into one of these cells. The examples below are labelled with the cell they cover, so together they leave no gap.
#
Cell (scenario class)
What's tricky about it
Example
A
Polynomial, cleanly exact
baseline mechanics
Ex 1
B
Mixed transcendental (exp, trig, log)
integrating unusual functions
Ex 2
C
Negative / sign-flipped coefficients
signs must survive the test
Ex 3
D
One coefficient is a pure function of a single variable
a partial derivative is zero
Ex 4
E
Implicit-only solution (can't isolate y )
answer stays as F = c
Ex 5
F
Not exact — test fails
must refuse the method
Ex 6
G
Not exact but fixable by an [[Integrating Factors for ODEs
integrating factor]]
rescue then solve
H
Real-world word problem + initial condition
pin the constant c
Ex 8
We also cover the degenerate limit (what happens when M or N vanishes entirely) inside Ex 4, and the geometry (the solution as level curves ) in the figures for Ex 1 and Ex 8.
Solve ( 3 x 2 y + 2 x y ) d x + ( x 3 + x 2 + 2 y ) d y = 0.
Forecast: Guess before reading — does this pass the test? And will the answer contain an x 3 y term? Jot your guess.
Identify: M = 3 x 2 y + 2 x y , N = x 3 + x 2 + 2 y .
Step 1 — Test exactness. Why this step? There is no point rebuilding a hill that does not exist.
Freeze x , differentiate M in y : each term loses its y , giving M y = 3 x 2 + 2 x .
Freeze y , differentiate N in x : N x = 3 x 2 + 2 x .
They match ⟹ exact .
Step 2 — Integrate M in x . Why? F x = M , so undoing the x -derivative recovers F up to a y -only piece.
F = ∫ ( 3 x 2 y + 2 x y ) d x + g ( y ) = x 3 y + x 2 y + g ( y ) .
Step 3 — Differentiate in y and match N . Why? The leftover g ( y ) is invisible to M ; only F y = N can reveal it.
F y = x 3 + x 2 + g ′ ( y ) = ! x 3 + x 2 + 2 y ⇒ g ′ ( y ) = 2 y .
Notice the x 3 + x 2 part of N was already inside F — do not re-integrate it (that is the double-counting trap).
Step 4 — Integrate g ′ . g ( y ) = y 2 .
Answer: x 3 y + x 2 y + y 2 = c .
Verify: Take F = x 3 y + x 2 y + y 2 . Then F x = 3 x 2 y + 2 x y = M ✓ and F y = x 3 + x 2 + 2 y = N ✓. The differential d F rebuilds the original equation exactly.
The figure shows the contour lines F = c : the ODE says "move so height never changes," so every solution curve is one of these level curves.
Solve ( 2 x y + ln y ) d x + ( 1 x 2 + y x + e y ) d y = 0 , y > 0.
Forecast: There is a ln y against an x / y . Will the cross-derivatives really line up? Guess yes/no.
Identify: M = 2 x y + ln y , N = x 2 + y x + e y .
Step 1 — Test. Why? Same reason — check before working.
M y = 2 x + y 1 (since ∂ y ln y = 1/ y ). N x = 2 x + y 1 . Match ⟹ exact .
Step 2 — Integrate M in x (treat y constant, so ln y is just a number multiplying x ):
F = ∫ ( 2 x y + ln y ) d x + g ( y ) = x 2 y + x ln y + g ( y ) .
Step 3 — Match N : Why? F y must equal N .
F y = x 2 + y x + g ′ ( y ) = ! x 2 + y x + e y ⇒ g ′ ( y ) = e y .
Step 4 — Integrate: g ( y ) = e y .
Answer: x 2 y + x ln y + e y = c .
Verify: F x = 2 x y + ln y = M ✓. F y = x 2 + x / y + e y = N ✓.
Common mistake The sign trap this cell targets
When a coefficient carries a minus sign, students often lose it inside M y or N x and wrongly declare "not exact." The test cares about signs — carry them.
Solve ( 2 x − y sin ( x y )) d x − x sin ( x y ) d y = 0.
Forecast: N is negative. Does the negative sign break exactness? Guess.
Identify: M = 2 x − y sin ( x y ) , N = − x sin ( x y ) .
Step 1 — Test. Why? Signs matter; verify carefully.
M y : differentiate − y sin ( x y ) in y by the product rule (freeze x ):
M y = − [ sin ( x y ) + y cos ( x y ) ⋅ x ] = − sin ( x y ) − x y cos ( x y ) .
N x : differentiate − x sin ( x y ) in x (freeze y ):
N x = − [ sin ( x y ) + x cos ( x y ) ⋅ y ] = − sin ( x y ) − x y cos ( x y ) .
They match ⟹ exact — the minus sign survives on both sides.
Step 2 — Integrate N in y this time (it's simpler; the symmetric route is always allowed). Freeze x :
F = ∫ − x sin ( x y ) d y + h ( x ) = cos ( x y ) + h ( x ) ,
because ∂ y cos ( x y ) = − x sin ( x y ) .
Step 3 — Match M : Why? Now use F x = M to find h ( x ) .
F x = − y sin ( x y ) + h ′ ( x ) = ! 2 x − y sin ( x y ) ⇒ h ′ ( x ) = 2 x .
Step 4 — Integrate: h ( x ) = x 2 .
Answer: cos ( x y ) + x 2 = c .
Verify: F x = − y sin ( x y ) + 2 x = M ✓. F y = − x sin ( x y ) = N ✓.
Intuition The degenerate case
If M depends only on x , then M y = 0 . If N depends only on y , then N x = 0 . Then the test reads 0 = 0 — automatically exact . This is secretly a separable equation ! Exactness contains separability as a special limiting case.
Solve cos x d x + 1 + y 2 1 d y = 0.
Forecast: M has no y , N has no x . Guess what the test gives.
Identify: M = cos x , N = 1 + y 2 1 .
Step 1 — Test. Why? Always. M y = 0 (no y present), N x = 0 (no x present). 0 = 0 ⟹ exact (the degenerate cell).
Step 2 — Integrate M in x : F = sin x + g ( y ) .
Step 3 — Match N : F y = g ′ ( y ) = ! 1 + y 2 1 ⇒ g ′ ( y ) = 1 + y 2 1 .
Step 4 — Integrate: g ( y ) = arctan y (the angle whose tangent is y ; it is the antiderivative of 1/ ( 1 + y 2 ) ).
Answer: sin x + arctan y = c .
Verify: F x = cos x = M ✓, F y = 1/ ( 1 + y 2 ) = N ✓. And indeed the equation separated: cos x d x = − 1 + y 2 d y , same result.
Solve ( y cos x + 2 x y ) d x + ( sin x + x 2 − 3 ) d y = 0.
Forecast: After finding F = c , can you cleanly solve for y ? Guess yes/no before Step 5.
Identify: M = y cos x + 2 x y , N = sin x + x 2 − 3.
Step 1 — Test. M y = cos x + 2 x , N x = cos x + 2 x . Match ⟹ exact .
Step 2 — Integrate M in x : F = y sin x + x 2 y + g ( y ) .
Step 3 — Match N : F y = sin x + x 2 + g ′ ( y ) = ! sin x + x 2 − 3 ⇒ g ′ ( y ) = − 3.
Step 4 — Integrate: g ( y ) = − 3 y .
Answer: y sin x + x 2 y − 3 y = c .
Step 5 — Can we isolate y ? Factor: y ( sin x + x 2 − 3 ) = c , so here we can : y = sin x + x 2 − 3 c . (In many problems you cannot — then leaving F ( x , y ) = c is the final, correct answer.)
Verify: F x = y cos x + 2 x y = M ✓, F y = sin x + x 2 − 3 = N ✓.
Test ( 3 x 2 + y ) d x + ( x 2 y − x ) d y = 0.
Forecast: Does it pass? Guess before computing.
Identify: M = 3 x 2 + y , N = x 2 y − x .
Step 1 — Test. M y = 1. N x = 2 x y − 1. These are not equal (they only coincide if 2 x y = 2 , not identically). ⟹ not exact .
Conclusion: Do not integrate M and match N — there is no single hill F . You would need an integrating factor first.
Verify: M y − N x = 1 − ( 2 x y − 1 ) = 2 − 2 x y = 0 as a function ✓ (confirmed non-exact).
Intuition Why an integrating factor works
If M d x + N d y = 0 fails the test, we multiply the whole equation by a cleverly chosen μ ( x ) or μ ( y ) . Multiplying by μ doesn't change the solution curves (we've only scaled the "stay level" rule), but it can make the two coefficients into genuine partials of one F . A standard shortcut: if N M y − N x depends on x alone, then μ ( x ) = e ∫ N M y − N x d x .
Solve ( y 2 + 2 x y ) d x − x 2 d y = 0.
Forecast: Which variable will the integrating factor depend on? Guess x or y .
Identify: M = y 2 + 2 x y , N = − x 2 .
Step 1 — Test. M y = 2 y + 2 x , N x = − 2 x . Not equal ⟹ not exact.
Step 2 — Try μ ( x ) . Why? Check if the shortcut ratio is x -only.
N M y − N x = − x 2 ( 2 y + 2 x ) − ( − 2 x ) = − x 2 2 y + 4 x ,
which still has y — not x -only. So μ ( x ) fails; try μ ( y ) .
Step 3 — Try μ ( y ) . The mirror shortcut: M N x − M y should be y -only.
M N x − M y = y 2 + 2 x y − 2 x − ( 2 y + 2 x ) = y ( y + 2 x ) − 4 x − 2 y .
Hmm, still mixed. Instead spot the factor directly: multiply by μ = 1/ y 2 :
( 1 + y 2 x ) d x − y 2 x 2 d y = 0.
Re-test: new M ∗ = 1 + 2 x / y , new N ∗ = − x 2 / y 2 .
M y ∗ = − 2 x / y 2 , N x ∗ = − 2 x / y 2 . Match ⟹ now exact . Why 1/ y 2 ? Because − x 2 / y 2 is ∂ y of x 2 / y , hinting the potential.
Step 4 — Integrate M ∗ in x : F = x + y x 2 + g ( y ) .
Step 5 — Match N ∗ : F y = − y 2 x 2 + g ′ ( y ) = ! − y 2 x 2 ⇒ g ′ ( y ) = 0 ⇒ g = const .
Answer: x + y x 2 = c .
Verify: F x = 1 + 2 x / y = M ∗ ✓, F y = − x 2 / y 2 = N ∗ ✓. Multiplying back by y 2 returns the original equation, so solution curves are unchanged.
Worked example Example 8 — a conservative force field
A particle moves in the plane so that its motion always stays on a level curve of a hidden energy F ( x , y ) . Measurements give the differential relation
( 2 x + y ) d x + ( x + 2 y ) d y = 0 ,
and the particle passes through the point ( x , y ) = ( 1 , 2 ) (units: metres). Find the energy contour it rides on.
Forecast: This is a symmetric field (M and N swap roles under x ↔ y ). Guess whether F has an x y term.
Identify: M = 2 x + y , N = x + 2 y .
Step 1 — Test. Why? Confirm a potential/energy exists (a conservative field ). M y = 1 , N x = 1. Match ⟹ exact , so an energy F exists.
Step 2 — Integrate M in x : F = x 2 + x y + g ( y ) .
Step 3 — Match N : F y = x + g ′ ( y ) = ! x + 2 y ⇒ g ′ ( y ) = 2 y ⇒ g ( y ) = y 2 .
Step 4 — General energy: F = x 2 + x y + y 2 . General solution x 2 + x y + y 2 = c .
Step 5 — Apply the initial condition ( 1 , 2 ) : Why? To pin the specific contour, not the whole family (units: m²).
c = 1 2 + ( 1 ) ( 2 ) + 2 2 = 1 + 2 + 4 = 7.
Answer: x 2 + x y + y 2 = 7.
Verify: F x = 2 x + y = M ✓, F y = x + 2 y = N ✓. Plug ( 1 , 2 ) : 1 + 2 + 4 = 7 ✓ (units m² consistent as an energy contour).
The red dot is ( 1 , 2 ) ; the highlighted ellipse is the single contour x 2 + x y + y 2 = 7 the particle stays on. Nearby thin curves are other energy levels c .
Recall Which cell does each example cover?
Ex1 = A (poly) ::: Ex2 = B (transcendental)
Ex3 = C (signs) ::: Ex4 = D (degenerate / separable)
Ex5 = E (implicit-only) ::: Ex6 = F (non-exact refusal)
Ex7 = G (integrating factor rescue) ::: Ex8 = H (word problem + IC)
Mnemonic The universal drill
T-I-D-M-I-C : T est (M y = N x ), I ntegrate M , D ifferentiate in y , M atch N , I ntegrate g ′ , C onstant (apply any initial condition).