Exact Equations & Substitutions

Study Sheet

Exact Equations & Substitutions

Exactness tests, integrating factors, Bernoulli and homogeneous types

Exactness and the Great Substitutions

Tip
Exact equations: one function behind two coefficients

The form M(x,y)dx+N(x,y)dy=0M(x,y)\,dx + N(x,y)\,dy = 0 is EXACT when some FF has Fx=MF_x = M and Fy=NF_y = N — then solutions are simply the level curves F(x,y)=CF(x, y) = C. The test is Clairaut in disguise: exactness holds iff yM=xN\partial_y M = \partial_x N (both equal the mixed partial FxyF_{xy}).

To build FF: integrate MM in xx (adding an unknown g(y)g(y)), differentiate in yy, and match against NN to determine gg — the same construction as finding a potential for a conservative vector field, because it IS the same problem.

Tip
When the test fails: integrating factors

A non-exact equation can often be repaired by multiplying through by μ\mu. Try single-variable factors first: if MyNxN\dfrac{M_y - N_x}{N} depends on xx alone, μ=eMyNxNdx\mu = e^{\int\frac{M_y - N_x}{N}dx} works; if NxMyM\dfrac{N_x - M_y}{M} depends on yy alone, use the analogous μ(y)\mu(y).

Example: ydx+2xdyy\,dx + 2x\,dy has My=12=NxM_y = 1 \ne 2 = N_x, but μ=y\mu = y turns it into y2dx+2xydy=d(xy2)y^2dx + 2xy\,dy = d(xy^2) — exact. The linear-equation integrating factor from first-order theory is a special case of this idea.

Tip
Two substitutions that unlock whole families

HOMOGENEOUS type y=f ⁣(yx)y' = f\!\left(\tfrac yx\right): substitute v=yxv = \tfrac yx (so y=v+xvy' = v + xv') and the equation SEPARATES in vv and xx. BERNOULLI y+p(x)y=q(x)yny' + p(x)y = q(x)y^n: divide by yny^n and substitute v=y1nv = y^{1-n} — the equation becomes LINEAR in vv, solvable by integrating factor.

Both are one-line changes of viewpoint that convert something unsolvable-looking into a solved chapter; recognizing the pattern is the entire skill.

Side note
Significance: thermodynamics runs on exactness

In physics, "is Mdx+NdyM\,dx + N\,dy exact?" becomes "is this quantity a state function?" Energy and entropy are exact differentials (path-independent); heat and work are NOT — and integrating factors are precisely how temperature turns the inexact heat differential into exact entropy: dS=δQTdS = \tfrac{\delta Q}{T}. A chapter of calculus explaining a law of nature.

Try it
Try it: test, then decide

Is (y2+1)dx+2xydy=0(y^2 + 1)\,dx + 2xy\,dy = 0 exact? Work: y(y2+1)=2y=x(2xy)\partial_y(y^2 + 1) = 2y = \partial_x(2xy) ✓. Solve: F=xy2+xF = xy^2 + x; solutions x(y2+1)=Cx(y^2 + 1) = C. Verify by implicit differentiation: (y2+1)+2xyy=0(y^2+1) + 2xyy' = 0 ✓ — matches the original.

Proofs & Why It Matters

Tip
Proof: the exactness test

If FF exists with Fx=MF_x = M, Fy=NF_y = N and FF is twice continuously differentiable, then My=Fxy=Fyx=NxM_y = F_{xy} = F_{yx} = N_x by Clairaut's theorem — necessity.

Conversely, on a rectangle define F(x,y)=x0xM(t,y)dt+y0yN(x0,s)dsF(x,y) = \int_{x_0}^x M(t, y)\,dt + \int_{y_0}^y N(x_0, s)\,ds; then Fx=MF_x = M directly, and differentiating under the integral, Fy=x0xMydt+N(x0,y)=x0xNxdt+N(x0,y)=N(x,y)F_y = \int_{x_0}^x M_y\,dt + N(x_0, y) = \int_{x_0}^x N_x\,dt + N(x_0,y) = N(x, y), using My=NxM_y = N_x in the middle step. \blacksquare

Tip
Proof: the Bernoulli substitution linearizes

From v=y1nv = y^{1-n}: v=(1n)ynyv' = (1-n)y^{-n}y'. Multiply the equation y+py=qyny' + py = qy^n by (1n)yn(1-n)y^{-n}: (1n)yny+(1n)py1n=(1n)q(1-n)y^{-n}y' + (1-n)py^{1-n} = (1-n)q, which is exactly v+(1n)pv=(1n)qv' + (1-n)p\,v = (1-n)q — linear in vv with known coefficient functions. Every Bernoulli equation is therefore one substitution away from the integrating-factor method. \blacksquare

Going Deeper: Worked Problems

Example
Worked: repairing a non-exact equation

Solve (3xy+y2)dx+(x2+xy)dy=0(3xy + y^2)\,dx + (x^2 + xy)\,dy = 0.

Step 1 — test: My=3x+2yM_y = 3x + 2y, Nx=2x+yN_x = 2x + y — not exact.

Step 2 — try a factor in xx: MyNxN=x+yx(x+y)=1x\dfrac{M_y - N_x}{N} = \dfrac{x + y}{x(x + y)} = \dfrac1x, a function of xx alone, so μ=edx/x=x\mu = e^{\int dx/x} = x.

Step 3 — multiply: (3x2y+xy2)dx+(x3+x2y)dy=0(3x^2y + xy^2)\,dx + (x^3 + x^2y)\,dy = 0; now My=3x2+2xy=NxM_y = 3x^2 + 2xy = N_x ✓.

Step 4 — build FF: integrate MM in xx: F=x3y+12x2y2+g(y)F = x^3y + \tfrac12x^2y^2 + g(y); match Fy=x3+x2y+g(y)=NF_y = x^3 + x^2y + g'(y) = N, so g=0g' = 0. Solutions: x3y+12x2y2=Cx^3y + \tfrac12x^2y^2 = C.

Step 5 — implicit differentiation of the answer reproduces the original equation (after dividing by xx) ✓.

Example
Worked: a homogeneous-type equation to the end

Solve y=x2+y2xyy' = \dfrac{x^2 + y^2}{xy} with y(1)=2y(1) = 2.

Step 1 — every term has total degree 22 over degree 22: homogeneous type. Rewrite y=xy+yxy' = \dfrac xy + \dfrac yx and substitute v=yxv = \dfrac yx, so y=v+xvy' = v + xv'.

Step 2 — the equation becomes v+xv=1v+vv + xv' = \dfrac1v + v, i.e. xv=1vxv' = \dfrac1v: separable.

Step 3 — vdv=dxxv\,dv = \dfrac{dx}{x} gives v22=lnx+C\tfrac{v^2}{2} = \ln|x| + C.

Step 4 — back-substitute: y22x2=lnx+C\dfrac{y^2}{2x^2} = \ln|x| + C; the data y(1)=2y(1) = 2 give 2=0+C2 = 0 + C. Solution: y2=2x2(lnx+2)y^2 = 2x^2(\ln x + 2), i.e. y=x2lnx+4y = x\sqrt{2\ln x + 4} for x>0x > 0.

Step 5 — check at x=1x = 1: y=4=2y = \sqrt4 = 2 ✓.

Worked, Every Step

Example
Worked: an exact equation start to finish

Solve (2xy+3)dx+(x2+4y)dy=0(2xy + 3)\,dx + (x^2 + 4y)\,dy = 0.

Step 1 — test: y(2xy+3)=2x\partial_y(2xy + 3) = 2x and x(x2+4y)=2x\partial_x(x^2 + 4y) = 2x: exact.

Step 2 — integrate MM in xx: F=x2y+3x+g(y)F = x^2y + 3x + g(y).

Step 3 — match: Fy=x2+g(y)=!x2+4yF_y = x^2 + g'(y) \stackrel{!}{=} x^2 + 4y, so g(y)=4yg'(y) = 4y, g=2y2g = 2y^2.

Step 4 — solutions: x2y+3x+2y2=Cx^2y + 3x + 2y^2 = C, an implicit family; a point condition picks the curve.

Step 5 — verify by implicit differentiation: 2xy+x2y+3+4yy=02xy + x^2y' + 3 + 4yy' = 0 rearranges to the original equation ✓.

Example
Worked: a Bernoulli equation via v = 1/y

Solve y+y=y2y' + y = y^2, y(0)=12y(0) = \tfrac12.

Step 1 — divide by y2y^2: y2y+y1=1y^{-2}y' + y^{-1} = 1.

Step 2 — substitute v=y1v = y^{-1}, v=y2yv' = -y^{-2}y': v+v=1-v' + v = 1, i.e. vv=1v' - v = -1.

Step 3 — integrating factor exe^{-x}: (vex)=ex(ve^{-x})' = -e^{-x}, so vex=ex+Cve^{-x} = e^{-x} + C and v=1+Cexv = 1 + Ce^{x}.

Step 4 — data: v(0)=2v(0) = 2 gives C=1C = 1: y=11+exy = \dfrac{1}{1 + e^x}.

Step 5 — verify: y=ex(1+ex)2y' = \dfrac{-e^x}{(1+e^x)^2} and y2y=1(1+ex)(1+ex)2=ex(1+ex)2y^2 - y = \dfrac{1 - (1 + e^x)}{(1+e^x)^2} = \dfrac{-e^x}{(1+e^x)^2} ✓.