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

Miscellaneous · Q9: (x−y)(dx+dy)=dx−dy(x - y)(dx + dy) = dx - dy⁠, y(0)=−1y(0) = -1

Miscellaneous ExerciseVariables separable after a substitution, particular solution · Sections 9.3 and 9.4.1
The question

9. Find a particular solution of the differential equation (x−y) (dx+dy)=dx−dy(x - y)\,(dx + dy) = dx - dy⁠, given that y=−1y = -1⁠, when x=0x = 0⁠. (Hint: put x−y=tx - y = t⁠)

Exam answer

Put x−y=tx - y = t⁠. Then dx−dy=dtdx - dy = dt⁠, so dy=dx−dtdy = dx - dt and dx+dy=2 dx−dtdx + dy = 2\,dx - dt⁠.

The equation becomes

t(2 dx−dt)=dt2t dx=(1+t) dt\begin{aligned} t(2\,dx - dt) &= dt \\ 2t\,dx &= (1 + t)\,dt \end{aligned}

Separating the variables (t≠0t \ne 0⁠),

2 dx=(1+1t)dt2\,dx = \left(1 + \frac{1}{t}\right)dt

Integrating both sides,

2x=t+log⁡∣t∣+C2x=x−y+log⁡∣x−y∣+C\begin{aligned} 2x &= t + \log|t| + C \\ 2x &= x - y + \log|x - y| + C \end{aligned}

Since 2x−(x−y)=x+y2x - (x - y) = x + y⁠,

log⁡∣x−y∣=x+y−C…(i)\log|x - y| = x + y - C\quad\ldots(\text{i})

Putting x=0x = 0⁠, y=−1y = -1 in (i),

log⁡∣0+1∣=0−1−C0=−1−CC=−1\begin{aligned} \log|0 + 1| &= 0 - 1 - C \\ 0 &= -1 - C \\ C &= -1 \end{aligned}

Putting C=−1C = -1 in (i),

∴\therefore The particular solution is log⁡∣x−y∣=x+y+1\log|x - y| = x + y + 1⁠, for every real xx⁠.

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

The one idea this problem is built on

The equation only "sees" xx and yy through the difference x−yx - y⁠: solved for the slope it reads dydx=1−(x−y)1+(x−y)\frac{dy}{dx} = \frac{1 - (x - y)}{1 + (x - y)}⁠. So the hint names that difference tt⁠. Since dt=dx−dydt = dx - dy⁠, both brackets of the equation are written with dxdx and dtdt⁠, and the new equation 2t dx=(1+t) dt2t\,dx = (1 + t)\,dt separates. Integrate, put t=x−yt = x - y back, and let the point (0,−1)(0, -1) fix the constant.

Given, to find, and the plan
Given
(x−y)(dx+dy)=dx−dy(x - y)(dx + dy) = dx - dy⁠, and y=−1y = -1 when x=0x = 0⁠. Hint: put x−y=tx - y = t⁠.
To find
The particular solution through (0,−1)(0, -1)⁠.
Plan
(1) Read the equation: order, degree, and why it needs the hint. (2) Put x−y=tx - y = t and rewrite both sides. (3) Separate the variables tt and xx⁠. (4) Integrate, with one constant. (5) Put t=x−yt = x - y back: the general solution. (6) Use the condition. (7) See where the solution lives. (8) Check by substituting back, and see the curve.

Basics you need

1Variables separable

If the equation can be arranged as g(t) dt=f(x) dxg(t)\,dt = f(x)\,dx⁠, integrate both sides and add one constant (Section 9.4.1). Lesson: variables separable

2Differentials of a substitution

If t=x−yt = x - y⁠, then dt=dx−dydt = dx - dy⁠: the differential of a difference is the difference of the differentials. Basics: dy = y′ dx

3∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + C

Section 7.2, formula (xii); and ∫1 dt=t\int 1\,dt = t⁠. Basics: every method ends with an integral

4Particular solutions

Put the given point into the general solution to find the constant (Section 9.3). Lesson: general and particular solutions

Solution

  1. Read the equation, and why the hint helps

    Divide both sides by dxdx and write y′=dydxy' = \frac{dy}{dx}⁠: (x−y)(1+y′)=1−y′(x - y)(1 + y') = 1 - y'⁠. Collecting the y′y' terms, y′(x−y+1)=1−(x−y)y'(x - y + 1) = 1 - (x - y)⁠, so

    dydx=1−(x−y)1+(x−y)(x−y≠−1).\frac{dy}{dx} = \frac{1 - (x - y)}{1 + (x - y)}\quad(x - y \ne -1).
    The highest derivative is dydx\frac{dy}{dx} and the equation is a polynomial in it, of power 1: order 1, degree 1. The right side is not a product g(x) h(y)g(x)\,h(y)⁠, so the variables do not separate as they stand. But it depends on xx and yy only through x−yx - y⁠, which is why the book suggests calling x−yx - y a new variable.
    Sections 9.2.1 and 9.2.2: order and degree. Lesson: order and degree
  2. Put x−y=tx - y = t and rewrite both sides

    From t=x−yt = x - y⁠: dt=dx−dydt = dx - dy⁠, so dy=dx−dtdy = dx - dt and

    dx+dy=dx+(dx−dt)=2 dx−dt.dx + dy = dx + (dx - dt) = 2\,dx - dt.

    The equation (x−y)(dx+dy)=dx−dy(x - y)(dx + dy) = dx - dy becomes

    t(2 dx−dt)=dt2t dx−t dt=dt2t dx=(1+t) dt.\begin{aligned} t(2\,dx - dt) &= dt \\ 2t\,dx - t\,dt &= dt \\ 2t\,dx &= (1 + t)\,dt. \end{aligned}
    The right side dx−dydx - dy is exactly dtdt⁠, and the factor x−yx - y is tt⁠. Only dx+dydx + dy needs work: replace dydy by dx−dtdx - dt⁠. Now every term involves only tt⁠, dtdt and dxdx⁠.
    The differential of t=x−yt = x - y⁠. Basics: dy = y′ dx
  3. Separate the variables tt and xx

    Divide by tt (for t≠0t \ne 0⁠):

    2 dx=1+tt dt=(1+1t)dt.2\,dx = \frac{1 + t}{t}\,dt = \left(1 + \frac{1}{t}\right)dt.
    The left side has only xx⁠, the right side only tt⁠: the variables are separated. Dividing by tt needs t≠0t \ne 0⁠. The case t=0t = 0 is the line y=xy = x⁠: there dy=dxdy = dx⁠, so both sides of the given equation are 0 and the line is a solution too. It does not pass through (0,−1)(0, -1)⁠, where t=0−(−1)=1t = 0 - (-1) = 1⁠, so it is not the solution we want.
    Section 9.4.1, equation (3). Lesson: variables separable
  4. Integrate both sides, with one constant

    ∫2 dx=∫(1+1t)dt2x=t+log⁡∣t∣+C.\begin{aligned} \int 2\,dx &= \int\left(1 + \frac{1}{t}\right)dt \\ 2x &= t + \log|t| + C. \end{aligned}
    ∫2 dx=2x\int 2\,dx = 2x⁠, ∫1 dt=t\int 1\,dt = t and ∫dtt=log⁡∣t∣\int\frac{dt}{t} = \log|t|⁠. The two constants of integration are collected into one, CC⁠: a first order equation has one arbitrary constant.
    Section 9.4.1, equation (4); Section 7.2, formula (xii). Basics: one constant for order 1
  5. Put t=x−yt = x - y back: the general solution

    2x=x−y+log⁡∣x−y∣+Clog⁡∣x−y∣=x+y−C.…(1)\begin{aligned} 2x &= x - y + \log|x - y| + C \\ \log|x - y| &= x + y - C.\quad\ldots(1) \end{aligned}
    Subtract x−yx - y from both sides: 2x−(x−y)=x+y2x - (x - y) = x + y⁠. The answer is wanted in xx and yy⁠, so the helper variable tt is removed. This is the general solution (for t≠0t \ne 0⁠), one curve for each CC⁠.
    Section 9.3: the general solution. Lesson: the Miscellaneous exercise player
  6. Use the condition: y=−1y = -1 when x=0x = 0

    Putting x=0x = 0⁠, y=−1y = -1 in (1):

    log⁡∣0−(−1)∣=0+(−1)−Clog⁡1=0=−1−CC=−1.\begin{aligned} \log|0 - (-1)| &= 0 + (-1) - C \\ \log 1 = 0 &= -1 - C \\ C &= -1. \end{aligned}

    So the particular solution is

    log⁡∣x−y∣=x+y+1.\log|x - y| = x + y + 1.
    log⁡1=0\log 1 = 0⁠. Putting C=−1C = -1 in (1) gives −C=+1-C = +1⁠. This picks the one curve of the family through (0,−1)(0, -1)⁠.
    Section 9.3: a particular solution. Lesson: general and particular solutions
  7. Where the solution lives

    At (0,−1)(0, -1)⁠, t=x−y=1>0t = x - y = 1 > 0⁠. Along the curve tt can never become 0, because then log⁡∣t∣→−∞\log|t| \to -\infty while 2x=t+log⁡∣t∣−12x = t + \log|t| - 1 is finite. So t>0t > 0 on the whole curve, and ∣x−y∣=x−y|x - y| = x - y⁠:

    log⁡(x−y)=x+y+1,that is,  x−y=ex+y+1.\begin{aligned} &\log(x - y) = x + y + 1, \\ &\text{that is, }\ x - y = e^{x + y + 1}. \end{aligned}

    For each real xx⁠, the function t+log⁡tt + \log t increases from −∞-\infty to ∞\infty as tt runs over t>0t > 0⁠, so t+log⁡t=2x+1t + \log t = 2x + 1 has exactly one solution t>0t > 0⁠, and y=x−ty = x - t⁠. The solution is defined for every real xx⁠.

    ddt(t+log⁡t)=1+1t>0\frac{d}{dt}(t + \log t) = 1 + \frac{1}{t} > 0 for t>0t > 0⁠, so it is increasing and takes every real value once. Also t>0t > 0 keeps tt away from −1-1⁠, where the slope 1−t1+t\frac{1 - t}{1 + t} of Step 1 would not exist. The slope is 0 exactly when t=1t = 1⁠, at (0,−1)(0, -1)⁠: since tt grows with xx⁠, the curve rises for x<0x < 0 and falls for x>0x > 0⁠, so (0,−1)(0, -1) is its highest point.
    An increasing function takes each value once. Basics: a rule for slopes
  8. Check by substituting back, and see the curve

    Differentiate log⁡(x−y)=x+y+1\log(x - y) = x + y + 1 with respect to xx⁠, using the chain rule on the left:

    1−y′x−y=1+y′(x−y)(1+y′)=1−y′,\begin{aligned} \frac{1 - y'}{x - y} &= 1 + y' \\ (x - y)(1 + y') &= 1 - y', \end{aligned}

    which is the given equation divided by dxdx⁠. At (0,−1)(0, -1)⁠: log⁡1=0\log 1 = 0 and 0+(−1)+1=00 + (-1) + 1 = 0⁠.

    X Y Y′ (0, −1) y = x log(x − y) = x + y + 1 O
    Slope field of dydx=1−(x−y)1+(x−y)\frac{dy}{dx} = \frac{1 - (x - y)}{1 + (x - y)}⁠, with equal scales, and the particular solution log⁡(x−y)=x+y+1\log(x - y) = x + y + 1 through (0,−1)(0, -1)⁠, its highest point. The dashed line y=xy = x is the other solution (t=0t = 0⁠); the curve creeps up to it on the left but never meets it.
    Differentiating the answer gives back the equation, and the point satisfies it. The picture agrees with Step 7: one curve over the whole xx-axis, staying below y=xy = x⁠.
    A solution makes L.H.S. = R.H.S. (Section 9.3). Basics: a rule for slopes
Result

The general solution is log⁡∣x−y∣=x+y−C\log|x - y| = x + y - C⁠, and the particular solution with y=−1y = -1 when x=0x = 0 is log⁡∣x−y∣=x+y+1\log|x - y| = x + y + 1 (on it x−y>0x - y > 0⁠, so this is x−y=ex+y+1x - y = e^{x + y + 1}⁠), defined for every real xx⁠. (Textbook answer: log⁡∣x−y∣=x+y+1\log|x - y| = x + y + 1⁠.)

Check it with numbers

Take x=1x = 1⁠. Then t+log⁡t=3t + \log t = 3 gives t≈2.2079400t \approx 2.2079400⁠, so y=1−t≈−1.2079400y = 1 - t \approx -1.2079400⁠. The equation gives the slope 1−t1+t≈−0.376547\frac{1 - t}{1 + t} \approx -0.376547⁠.

The curve itself (solving t+log⁡t=2x+1t + \log t = 2x + 1 again): y(1.001)≈−1.2083167123y(1.001) \approx -1.2083167123 and y(0.999)≈−1.2075636184y(0.999) \approx -1.2075636184⁠, a difference of −0.0007530939-0.0007530939⁠, so

−0.00075309390.002≈−0.376547.\frac{-0.0007530939}{0.002} \approx -0.376547.
Common mistakes
  1. Writing dx+dy=dtdx + dy = dt⁠. It is dx−dydx - dy that equals dtdt⁠; dx+dy=2 dx−dtdx + dy = 2\,dx - dt⁠.
  2. Leaving tt in the answer. Put t=x−yt = x - y back before using the condition.
  3. Sign slip with the constant: 0=−1−C0 = -1 - C gives C=−1C = -1⁠, and then x+y−C=x+y+1x + y - C = x + y + 1⁠.
  4. Using t=−1t = -1 at the point. At (0,−1)(0, -1)⁠, t=x−y=0−(−1)=1t = x - y = 0 - (-1) = 1⁠.
What to take away
  1. When an equation depends on xx and yy only through one combination such as x−yx - y or x+yx + y⁠, call that combination tt⁠; the new equation often separates.
  2. Write every differential in the new variables: t=x−yt = x - y gives dt=dx−dydt = dx - dy⁠.
  3. Dividing by tt can lose the solution t=0t = 0⁠; check it separately.

Every fact used, and where it comes from

FactUsed inSource
Order and degreeStep 1Sections 9.2.1 and 9.2.2 (Lesson)
Substitution t=x−yt = x - y⁠, dt=dx−dydt = dx - dyStep 2The book's hint; differentials (Basics)
Separating the variables and integrating, one constantSteps 3, 4Section 9.4.1, equations (3) and (4) (Lesson)
∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + CStep 4Section 7.2, formula (xii) (Basics)
General and particular solutionsSteps 5, 6Section 9.3 (Lesson)
Chain rule; ddxlog⁡u=u′u\frac{d}{dx}\log u = \frac{u'}{u}Step 8Chapter 5, Sections 5.3.1 and 5.4 (Basics)
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 →