Exact differential equation — test and solve (2xy + 3)dx + (x² - 1)dy = 0

medium JEE-MAIN JEE Main 2022 3 min read

Question

Test whether the differential equation (2xy+3)dx+(x21)dy=0(2xy + 3)dx + (x^2 - 1)dy = 0 is exact. If so, solve it.

(JEE Main 2022, similar pattern)


Solution — Step by Step

The equation is in the form Mdx+Ndy=0M\,dx + N\,dy = 0.

M=2xy+3M = 2xy + 3 and N=x21N = x^2 - 1.

A differential equation is exact if My=Nx\dfrac{\partial M}{\partial y} = \dfrac{\partial N}{\partial x}.

My=2x\frac{\partial M}{\partial y} = 2x Nx=2x\frac{\partial N}{\partial x} = 2x

Since My=Nx=2x\dfrac{\partial M}{\partial y} = \dfrac{\partial N}{\partial x} = 2x, the equation is exact.

We need FF such that Fx=M\dfrac{\partial F}{\partial x} = M and Fy=N\dfrac{\partial F}{\partial y} = N.

Integrate MM with respect to xx:

F=(2xy+3)dx=x2y+3x+g(y)F = \int (2xy + 3)\,dx = x^2 y + 3x + g(y)

where g(y)g(y) is an unknown function of yy only.

Fy=x2+g(y)=N=x21\frac{\partial F}{\partial y} = x^2 + g'(y) = N = x^2 - 1 g(y)=1    g(y)=yg'(y) = -1 \implies g(y) = -y F(x,y)=x2y+3xy=CF(x, y) = x^2 y + 3x - y = C x2y+3xy=C\mathbf{x^2 y + 3x - y = C}

where CC is an arbitrary constant.


Why This Works

An exact differential equation Mdx+Ndy=0M\,dx + N\,dy = 0 means there exists a function F(x,y)F(x,y) such that dF=Mdx+NdydF = M\,dx + N\,dy. The equation then simply says dF=0dF = 0, so F=constantF = \text{constant}.

The exactness condition M/y=N/x\partial M/\partial y = \partial N/\partial x comes from the equality of mixed partial derivatives: 2Fyx=2Fxy\frac{\partial^2 F}{\partial y \partial x} = \frac{\partial^2 F}{\partial x \partial y}.

The method reconstructs FF by integrating one partial derivative and using the other to pin down the arbitrary function.


Alternative Method

You can also integrate NN with respect to yy first: F=(x21)dy=x2yy+h(x)F = \int(x^2 - 1)\,dy = x^2 y - y + h(x). Then F/x=2xy+h(x)=2xy+3\partial F/\partial x = 2xy + h'(x) = 2xy + 3, so h(x)=3h'(x) = 3, h(x)=3xh(x) = 3x. Same result: F=x2yy+3x=CF = x^2 y - y + 3x = C.

When the equation is not exact, look for an integrating factor. If MyNxN\frac{M_y - N_x}{N} is a function of xx only, the integrating factor is eMyNxNdxe^{\int \frac{M_y - N_x}{N}\,dx}. If NxMyM\frac{N_x - M_y}{M} is a function of yy only, the integrating factor is eNxMyMdye^{\int \frac{N_x - M_y}{M}\,dy}.


Common Mistake

After integrating MM w.r.t. xx, students often write g(y)g(y) as a constant instead of a function of yy. The “constant of integration” when integrating a partial derivative is not a number — it is a function of the other variable. Missing this function g(y)g(y) means the solution will not satisfy F/y=N\partial F/\partial y = N.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next