Skip to content
Worked Examples · Example 4

Q.Find the general solution of the differential equation dydx=1+x2−y\frac{dy}{dx} = \frac{1+x}{2-y}, (y≠2)(y \neq 2).

Uttar Pradesh UpmspTextbookSubjective· 3mImportance★★★★★
23% · 51/222 Questions
✓ Free question

This is a first-order separable ODE. Separate the variables so that all yy terms are on one side and all xx terms on the other, then integrate both sides. The general solution is 2y−y22=x+x22+C2y - \frac{y^2}{2} = x + \frac{x^2}{2} + C, which can be rearranged to x2+2x+y2−4y+C=0x^2 + 2x + y^2 - 4y + C = 0.

The key idea here is Separation of Variables. When a differential equation can be written in the form dydx=f(x)⋅g(y)\frac{dy}{dx} = f(x) \cdot g(y), you can treat dydy and dxdx as differentials and rearrange so that each variable appears only on its own side of the equation. Then you integrate both sides — the left with respect to yy, the right with respect to xx — and add the constant of integration.

Let’s walk through it.

  1. Rewrite the equation to isolate the variables. We have

dydx=1+x2−y.\frac{dy}{dx} = \frac{1+x}{2-y}.

Multiply both sides by (2−y) dx(2-y) \, dx (valid since y≠2y \neq 2):

(2−y) dy=(1+x) dx.(2-y) \, dy = (1+x) \, dx.

Now the yy’s are on the left and the xx’s on the right — exactly what we want.

  1. Integrate both sides.

∫(2−y) dy=∫(1+x) dx.\int (2 - y) \, dy = \int (1 + x) \, dx.

Compute each integral:

∫2 dy−∫y dy=2y−y22+C1,\int 2 \, dy - \int y \, dy = 2y - \frac{y^2}{2} + C_1,

∫1 dx+∫x dx=x+x22+C2.\int 1 \, dx + \int x \, dx = x + \frac{x^2}{2} + C_2.

Combine the constants into a single constant C=C2−C1C = C_2 - C_1:

2y−y22=x+x22+C.2y - \frac{y^2}{2} = x + \frac{x^2}{2} + C.

  1. Simplify the result (optional but tidy). Multiply through by 2 to clear the fractions:

4y−y2=2x+x2+2C.4y - y^2 = 2x + x^2 + 2C.

Let 2C=K2C = K (another constant), then bring everything to one side:

x2+2x+y2−4y+K=0.x^2 + 2x + y^2 - 4y + K = 0.

This is the general solution in implicit form. You could complete the square to see it represents a circle, but that’s not necessary unless asked.

Watch out

A common mistake is forgetting the constant of integration or trying to combine the two constants incorrectly. Always write +C+C on one side only after integrating — don’t keep separate constants unless you plan to merge them.

Tip

If the problem had an initial condition (like y(0)=1y(0)=1), you’d plug it into the implicit equation to find CC. Without one, the general solution is a family of curves — here, a family of circles.

✓Final answer

The general solution is x2+2x+y2−4y+C=0x^2 + 2x + y^2 - 4y + C = 0, where CC is an arbitrary constant.

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.