Class 12 Maths, Worked in Full Past papersGet updates
Chapter 9 · Differential Equations

Exercise 9.5 · Q10: Linear in xx⁠: (x+y)dydx=1(x + y)\frac{dy}{dx} = 1

Exercise 9.5Linear differential equations, the form dx/dy + P₁x = Q₁ · Section 9.4.3
The question

For each of the differential equations given in Exercises 1 to 12, find the general solution:

10. (x+y)dydx=1(x + y)\dfrac{dy}{dx} = 1

Exam answer

The equation can be written as

dxdy=x+y  ⇒  dxdy−x=y\frac{dx}{dy} = x + y \;\Rightarrow\; \frac{dx}{dy} - x = y

This is of the form dxdy+P1x=Q1\frac{dx}{dy} + P_1x = Q_1⁠, where P1=−1P_1 = -1 and Q1=yQ_1 = y⁠.

I.F.=e∫−1 dy=e−y\text{I.F.} = e^{\int -1\,dy} = e^{-y}

So the solution is given by

xe−y=∫y e−y dy+Cxe^{-y} = \int y\,e^{-y}\,dy + C

Integrating by parts with yy as the first function,

xe−y=y(−e−y)−∫1⋅(−e−y) dy+C=−ye−y+∫e−y dy+C=−ye−y−e−y+C\begin{aligned} xe^{-y} &= y(-e^{-y}) \\ &\quad - \int 1\cdot(-e^{-y})\,dy + C \\ &= -ye^{-y} + \int e^{-y}\,dy + C \\ &= -ye^{-y} - e^{-y} + C \end{aligned}

Multiplying by eye^{y}⁠,

x=−y−1+Ceyx = -y - 1 + Ce^{y}

∴\therefore x+y+1=Ceyx + y + 1 = Ce^{y} is the general solution.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

Solved for dydx\frac{dy}{dx}⁠, the equation is dydx=1x+y\frac{dy}{dx} = \frac{1}{x + y}⁠, which is not linear in yy (yy sits in a denominator). But turned upside down it is dxdy=x+y\frac{dx}{dy} = x + y⁠, in which xx appears only to the first power. So treat xx as the unknown function of yy and use the second linear form, dxdy+P1x=Q1\frac{dx}{dy} + P_1x = Q_1⁠, as in Example 16.

Given, to find, and the plan
Given
(x+y)dydx=1(x + y)\frac{dy}{dx} = 1⁠; this forces x+y≠0x + y \ne 0⁠.
To find
The general solution (one arbitrary constant).
Plan
(1) Write it as dxdy+P1x=Q1\frac{dx}{dy} + P_1x = Q_1⁠. (2) Read off P1P_1⁠, Q1Q_1⁠. (3) I.F. =e∫P1 dy= e^{\int P_1\,dy}⁠. (4) Multiply and integrate with respect to yy⁠, with one constant. (5) ∫y e−y dy\int y\,e^{-y}\,dy by parts. (6) Solve for xx⁠. (7) Check.

Basics you need

1Linear in xx

dxdy+P1x=Q1\frac{dx}{dy} + P_1x = Q_1⁠, where P1P_1⁠, Q1Q_1 are constants or functions of yy only, is also a first order linear equation. I.F. =e∫P1 dy= e^{\int P_1\,dy} and x (I.F.)=∫(Q1×I.F.) dy+Cx\,(\text{I.F.}) = \int(Q_1\times\text{I.F.})\,dy + C (Section 9.4.3). Lesson: linear equations, the integrating factor

2dxdy\frac{dx}{dy} and dydx\frac{dy}{dx}

(x+y)dydx=1(x + y)\frac{dy}{dx} = 1 is (x+y) dy=dx(x + y)\,dy = dx⁠; dividing by dydy gives dxdy=x+y\frac{dx}{dy} = x + y⁠. Where dydx≠0\frac{dy}{dx} \ne 0⁠, dxdy=1÷dydx\frac{dx}{dy} = 1 \div \frac{dy}{dx}⁠. Basics: derivatives

3Integration by parts

∫f g dy=f∫g dy−∫(f′∫g dy)dy\int f\,g\,dy = f\int g\,dy - \int\left(f'\int g\,dy\right)dy⁠, with the algebraic factor yy first (Section 7.6). Basics: every method ends with an integral

4Exponentials

ddye−y=−e−y\frac{d}{dy}e^{-y} = -e^{-y}⁠, so ∫e−y dy=−e−y\int e^{-y}\,dy = -e^{-y}⁠; and e−y⋅ey=1e^{-y}\cdot e^{y} = 1⁠. Basics: exponentials

Solution

  1. Write it with dxdy\frac{dx}{dy}

    dydx=1x+y,dxdy=x+y,dxdy−x=y.\begin{aligned} \frac{dy}{dx} &= \frac{1}{x + y}, \\ \frac{dx}{dy} &= x + y, \\ \frac{dx}{dy} - x &= y. \end{aligned}
    The given equation forces x+y≠0x + y \ne 0 (otherwise the left side is 00⁠, not 11⁠), so we may divide by x+yx + y⁠. Then dydx=1x+y≠0\frac{dy}{dx} = \frac{1}{x + y} \ne 0⁠, and dxdy\frac{dx}{dy} is its reciprocal. In this form xx and dxdy\frac{dx}{dy} appear only to the first power.
    Section 9.4.3: the form dxdy+P1x=Q1\frac{dx}{dy} + P_1x = Q_1⁠. Lesson: linear equations
  2. Read off P1P_1 and Q1Q_1

    P1=−1P_1 = -1 and Q1=yQ_1 = y⁠.

    Compare dxdy+P1x=Q1\frac{dx}{dy} + P_1x = Q_1 with dxdy+(−1) x=y\frac{dx}{dy} + (-1)\,x = y⁠. P1P_1 is a constant and Q1Q_1 depends on yy only, as this form requires. Keep the minus sign with P1P_1⁠.
    Section 9.4.3: P1P_1⁠, Q1Q_1 constants or functions of yy only. Lesson: linear equations
  3. The integrating factor: e−ye^{-y}

    I.F.=e∫P1 dy=e∫−1 dy=e−y.\text{I.F.} = e^{\int P_1\,dy} = e^{\int -1\,dy} = e^{-y}.
    Integrate P1P_1 with respect to yy⁠, the independent variable of this form.
    Section 9.4.3: I.F. =e∫P1 dy= e^{\int P_1\,dy}⁠. Basics: exponentials
  4. Multiply and integrate with respect to yy

    ddy(xe−y)=y e−y,xe−y=∫y e−y dy+C.\begin{aligned} \frac{d}{dy}\left(xe^{-y}\right) &= y\,e^{-y}, \\ xe^{-y} &= \int y\,e^{-y}\,dy + C. \end{aligned}
    By the product rule in the variable yy⁠, ddy(xe−y)=e−ydxdy−xe−y\frac{d}{dy}\left(xe^{-y}\right) = e^{-y}\frac{dx}{dy} - xe^{-y}⁠, which is the left side times e−ye^{-y}⁠. This is x (I.F.)=∫(Q1×I.F.) dy+Cx\,(\text{I.F.}) = \int(Q_1\times\text{I.F.})\,dy + C⁠, with the one constant CC⁠.
    Section 9.4.3: the solution of dxdy+P1x=Q1\frac{dx}{dy} + P_1x = Q_1⁠. Basics: (y · g)′ = g(y′ + Py)
  5. ∫y e−y dy\int y\,e^{-y}\,dy by parts

    Take yy as the first function and e−ye^{-y} as the second, so ∫e−y dy=−e−y\int e^{-y}\,dy = -e^{-y}⁠:

    ∫y e−y dy=y(−e−y)−∫1⋅(−e−y) dy=−ye−y−e−y.\begin{aligned} &\int y\,e^{-y}\,dy \\ &= y(-e^{-y}) - \int 1\cdot(-e^{-y})\,dy \\ &= -ye^{-y} - e^{-y}. \end{aligned}
    −∫(−e−y) dy=∫e−y dy=−e−y-\int(-e^{-y})\,dy = \int e^{-y}\,dy = -e^{-y}⁠. Check: the derivative of −ye−y−e−y-ye^{-y} - e^{-y} is −e−y+ye−y+e−y=y e−y-e^{-y} + ye^{-y} + e^{-y} = y\,e^{-y}⁠.
    Section 7.6, integration by parts. Basics: every method ends with an integral
  6. Solve for xx

    xe−y=−ye−y−e−y+Cx=−y−1+Ceyx+y+1=Cey.\begin{aligned} xe^{-y} &= -ye^{-y} - e^{-y} + C \\ x &= -y - 1 + Ce^{y} \\ x + y + 1 &= Ce^{y}. \end{aligned}
    Multiply by eye^{y} (never zero); CeyCe^{y} carries the constant. The last line is the book's form. C=0C = 0 gives the straight line x+y+1=0x + y + 1 = 0⁠, on which x+y=−1x + y = -1 and dydx=−1\frac{dy}{dx} = -1⁠, so (x+y)dydx=1(x + y)\frac{dy}{dx} = 1⁠: a genuine member of the family.
    Section 9.4.3: the general solution. Lesson: Exercise 9.5 player
  7. Check by substituting back

    From x=Cey−y−1x = Ce^{y} - y - 1⁠: dxdy=Cey−1=(x+y+1)−1=x+y\frac{dx}{dy} = Ce^{y} - 1 = (x + y + 1) - 1 = x + y⁠. So dydx=1x+y\frac{dy}{dx} = \frac{1}{x + y} wherever x+y≠0x + y \ne 0⁠, that is

    (x+y)dydx=1,(x + y)\frac{dy}{dx} = 1,

    for every CC⁠.

    Cey=x+y+1Ce^{y} = x + y + 1 on the curve. Where x+y=0x + y = 0 (possible when C>0C > 0⁠, at the point with Cey=1Ce^{y} = 1⁠) the curve has a vertical tangent and the equation in the form (x+y)dydx=1(x + y)\frac{dy}{dx} = 1 does not hold, so each solution lives on a piece with x+y≠0x + y \ne 0⁠.
    A solution makes L.H.S. = R.H.S. (Section 9.3). Lesson: general and particular solutions
Result

The general solution is x+y+1=Ceyx + y + 1 = Ce^{y}⁠, that is x=Cey−y−1x = Ce^{y} - y - 1⁠, where CC is an arbitrary constant (on pieces of the curve with x+y≠0x + y \ne 0⁠). (Textbook answer: (x+y+1)=Cey(x + y + 1) = Ce^{y}⁠.)

Check it with numbers

Take C=1C = 1 and y=1y = 1⁠: x=e−2≈0.7182818x = e - 2 \approx 0.7182818⁠, so x+y≈1.7182818x + y \approx 1.7182818⁠. The equation says dxdy=x+y≈1.7182818\frac{dx}{dy} = x + y \approx 1.7182818⁠, that is dydx=1x+y≈0.5819767\frac{dy}{dx} = \frac{1}{x + y} \approx 0.5819767⁠.

The curve itself, x=ey−y−1x = e^{y} - y - 1⁠: x(1.001)≈0.7200014699x(1.001) \approx 0.7200014699 and x(0.999)≈0.7165649053x(0.999) \approx 0.7165649053⁠, so

0.7200014699−0.71656490530.002≈1.71828.\begin{aligned} &\frac{0.7200014699 - 0.7165649053}{0.002} \\ &\approx 1.71828. \end{aligned}
Common mistakes
  1. Trying to force the dydx\frac{dy}{dx} form. dydx=1x+y\frac{dy}{dx} = \frac{1}{x + y} is not linear in yy⁠; turn it over to dxdy\frac{dx}{dy}⁠.
  2. Taking P1=1P_1 = 1: the equation is dxdy−x=y\frac{dx}{dy} - x = y⁠, so P1=−1P_1 = -1 and the I.F. is e−ye^{-y}⁠.
  3. Integrating with respect to xx: in this form everything is a function of yy⁠.
  4. Sign slips in ∫y e−y dy\int y\,e^{-y}\,dy: it is −ye−y−e−y-ye^{-y} - e^{-y}⁠.
What to take away
  1. If dydx\frac{dy}{dx} is 1 over something linear in xx⁠, try dxdy\frac{dx}{dy}⁠: it may be linear in xx⁠.
  2. For dxdy+P1x=Q1\frac{dx}{dy} + P_1x = Q_1⁠: I.F. =e∫P1 dy= e^{\int P_1\,dy}⁠, and x (I.F.)=∫(Q1×I.F.) dy+Cx\,(\text{I.F.}) = \int(Q_1\times\text{I.F.})\,dy + C⁠.
  3. The answer may give xx in terms of yy⁠; that is a perfectly good general solution.

Every fact used, and where it comes from

FactUsed inSource
The form dxdy+P1x=Q1\frac{dx}{dy} + P_1x = Q_1⁠; I.F. =e∫P1 dy= e^{\int P_1\,dy}⁠; x (I.F.)=∫(Q1×I.F.) dy+Cx\,(\text{I.F.}) = \int(Q_1\times\text{I.F.})\,dy + CSteps 1 to 4Section 9.4.3 (Lesson)
(x+y) dy=dx(x + y)\,dy = dx⁠, divided by dydy⁠, gives dxdy\frac{dx}{dy}Steps 1, 7Section 9.4.3, as in Example 16 (Basics)
Product rule; ddye−y=−e−y\frac{d}{dy}e^{-y} = -e^{-y}Steps 4, 5Chapter 5, Sections 5.3 and 5.4 (Basics)
Integration by partsStep 5Section 7.6 (Basics)
Substituting back into the equationStep 7Section 9.3 (Lesson)
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →