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

Miscellaneous · Q12: (x+1)dydx=2e−y−1(x + 1)\frac{dy}{dx} = 2e^{-y} - 1⁠, y(0)=0y(0) = 0

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

12. Find a particular solution of the differential equation (x+1)dydx=2 e−y−1(x + 1)\dfrac{dy}{dx} = 2\,e^{-y} - 1⁠, given that y=0y = 0 when x=0x = 0⁠.

Exam answer

Here x≠−1x \ne -1⁠. Separating the variables,

dy2e−y−1=dxx+1\frac{dy}{2e^{-y} - 1} = \frac{dx}{x + 1}

Multiplying the numerator and denominator on the left by eye^y⁠,

ey dy2−ey=dxx+1…(i)\frac{e^y\,dy}{2 - e^y} = \frac{dx}{x + 1}\quad\ldots(\text{i})

Put 2−ey=t2 - e^y = t⁠. Then −ey dy=dt-e^y\,dy = dt⁠.

Integrating both sides of (i),

−∫dtt=∫dxx+1−log⁡∣t∣=log⁡∣x+1∣+C−log⁡∣2−ey∣=log⁡∣x+1∣+C…(ii)\begin{aligned} -\int\frac{dt}{t} &= \int\frac{dx}{x + 1} \\ -\log|t| &= \log|x + 1| + C \\ &-\log|2 - e^y| \\ &= \log|x + 1| + C\quad\ldots(\text{ii}) \end{aligned}

Putting x=0x = 0⁠, y=0y = 0 in (ii),

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

Putting C=0C = 0 in (ii),

log⁡∣x+1∣+log⁡∣2−ey∣=0∣(x+1)(2−ey)∣=1\begin{aligned} \log|x + 1| + \log|2 - e^y| &= 0 \\ |(x + 1)(2 - e^y)| &= 1 \end{aligned}

At (0,0)(0, 0) the product is 1⋅1=11\cdot1 = 1⁠, so

(x+1)(2−ey)=1ey=2−1x+1=2x+1x+1\begin{aligned} (x + 1)(2 - e^y) &= 1 \\ e^y &= 2 - \frac{1}{x + 1} \\ &= \frac{2x + 1}{x + 1} \end{aligned}

∴\therefore The particular solution is y=log⁡(2x+1x+1)y = \log\left(\dfrac{2x + 1}{x + 1}\right) (x>−12)\left(x > -\dfrac{1}{2}\right)⁠.

The answer key writes y=log⁡∣2x+1x+1∣y = \log\left|\frac{2x + 1}{x + 1}\right|⁠, x≠−1x \ne -1⁠; that form solves the equation only where 2x+1x+1>0\frac{2x + 1}{x + 1} > 0⁠, and the solution through (0,0)(0, 0) is defined for x>−12x > -\frac{1}{2}⁠.

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

The one idea this problem is built on

The slope dydx=2e−y−1x+1\frac{dy}{dx} = \frac{2e^{-y} - 1}{x + 1} is a function of yy times a function of xx⁠, so the variables separate. The yy-side, 12e−y−1\frac{1}{2e^{-y} - 1}⁠, becomes easy after multiplying top and bottom by eye^y⁠: ey2−ey\frac{e^y}{2 - e^y} has the derivative of its denominator (up to sign) on top, so it integrates to a logarithm. The point (0,0)(0, 0) then fixes the constant and also the signs inside the absolute values, which decides where the solution lives.

Given, to find, and the plan
Given
(x+1)dydx=2e−y−1(x + 1)\frac{dy}{dx} = 2e^{-y} - 1⁠, and y=0y = 0 when x=0x = 0⁠.
To find
The particular solution through (0,0)(0, 0)⁠.
Plan
(1) Read the equation: order, degree, separable. (2) Separate, and look at the constant solution lost by dividing. (3) Integrate, with t=2−eyt = 2 - e^y and one constant. (4) Use the condition. (5) Remove the logarithms and the absolute values, solve for yy⁠, and find the interval. (6) Compare with the textbook's form. (7) Check by substituting back, and see the curve.

Basics you need

1Variables separable

If dydx=g(x) h(y)\frac{dy}{dx} = g(x)\,h(y) with h(y)≠0h(y) \ne 0⁠, then dyh(y)=g(x) dx\frac{dy}{h(y)} = g(x)\,dx⁠; integrate both sides and add one constant (Section 9.4.1). Lesson: variables separable

2Integration by substitution

With t=2−eyt = 2 - e^y⁠, dt=−ey dydt = -e^y\,dy⁠, so ∫ey dy2−ey=−∫dtt=−log⁡∣t∣+C\int\frac{e^y\,dy}{2 - e^y} = -\int\frac{dt}{t} = -\log|t| + C (Section 7.3.1; Section 7.2, formula (xii)). Basics: every method ends with an integral

3Logarithm and exponential

log⁡a+log⁡b=log⁡(ab)\log a + \log b = \log(ab)⁠; log⁡∣u∣=0\log|u| = 0 exactly when ∣u∣=1|u| = 1⁠; ey>0e^y > 0 for every yy⁠, and y=log⁡uy = \log u needs u>0u > 0⁠. Basics: exponentials

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: separable

    dydx=1x+1⋅(2e−y−1)(x≠−1).\frac{dy}{dx} = \frac{1}{x + 1}\cdot\left(2e^{-y} - 1\right)\quad(x \ne -1).
    Divide by x+1x + 1⁠, which needs x≠−1x \ne -1⁠. The equation has order 1 and, as a polynomial in dydx\frac{dy}{dx}⁠, degree 1. The right side is a function of xx times a function of yy⁠, the separable form g(x) h(y)g(x)\,h(y) of Section 9.4.1. The given point has x=0x = 0⁠, so we work on an interval containing 0 that avoids x=−1x = -1⁠.
    Section 9.4.1, equation (2); Sections 9.2.1 and 9.2.2. Lesson: variables separable
  2. Separate the variables

    dy2e−y−1=dxx+1⇒ ey dy2−ey=dxx+1.\begin{aligned} \frac{dy}{2e^{-y} - 1} &= \frac{dx}{x + 1} \\ \Rightarrow\ \frac{e^y\,dy}{2 - e^y} &= \frac{dx}{x + 1}. \end{aligned}
    Dividing by 2e−y−12e^{-y} - 1 needs 2e−y≠12e^{-y} \ne 1⁠, that is y≠log⁡2y \ne \log 2⁠. Then multiply the top and bottom of the left side by eye^y⁠: ey(2e−y−1)=2−eye^y(2e^{-y} - 1) = 2 - e^y⁠. The case y=log⁡2y = \log 2 is a constant solution (both sides of the equation are 0), but it does not pass through (0,0)(0, 0)⁠, since log⁡2≠0\log 2 \ne 0⁠.
    Section 9.4.1, equation (3). Basics: dy = y′ dx
  3. Integrate both sides, with one constant

    On the left put 2−ey=t2 - e^y = t⁠, so −ey dy=dt-e^y\,dy = dt⁠:

    ∫ey dy2−ey=−∫dtt=−log⁡∣2−ey∣,∫dxx+1=log⁡∣x+1∣.\begin{aligned} \int\frac{e^y\,dy}{2 - e^y} &= -\int\frac{dt}{t} = -\log|2 - e^y|, \\ \int\frac{dx}{x + 1} &= \log|x + 1|. \end{aligned}

    So the general solution is

    −log⁡∣2−ey∣=log⁡∣x+1∣+C.…(1)\begin{aligned} &-\log|2 - e^y| \\ &= \log|x + 1| + C.\quad\ldots(1) \end{aligned}
    ddy(2−ey)=−ey\frac{d}{dy}(2 - e^y) = -e^y⁠, so the top ey dye^y\,dy is −dt-dt⁠. Both integrals are of the form ∫duu=log⁡∣u∣\int\frac{du}{u} = \log|u|⁠. The two constants of integration are collected into one, CC⁠.
    Section 9.4.1, equation (4); Section 7.3.1; Section 7.2, formula (xii). Basics: one constant for order 1
  4. Use the condition: y=0y = 0 when x=0x = 0

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

    −log⁡∣2−e0∣=log⁡∣0+1∣+C−log⁡1=log⁡1+CC=0.\begin{aligned} -\log|2 - e^0| &= \log|0 + 1| + C \\ -\log 1 &= \log 1 + C \\ C &= 0. \end{aligned}
    e0=1e^0 = 1⁠, so 2−e0=12 - e^0 = 1⁠, and log⁡1=0\log 1 = 0 on both sides.
    Section 9.3: a particular solution. Lesson: general and particular solutions
  5. Remove the logarithms and the absolute values

    With C=0C = 0⁠, (1) gives log⁡∣x+1∣+log⁡∣2−ey∣=0\log|x + 1| + \log|2 - e^y| = 0⁠, that is

    ∣(x+1)(2−ey)∣=1.|(x + 1)(2 - e^y)| = 1.

    The product (x+1)(2−ey)(x + 1)(2 - e^y) is continuous along the solution and has absolute value 1, so it cannot change sign; at (0,0)(0, 0) it equals 1⋅1=11\cdot1 = 1⁠. Hence

    (x+1)(2−ey)=1ey=2−1x+1=2x+1x+1y=log⁡(2x+1x+1).\begin{aligned} (x + 1)(2 - e^y) &= 1 \\ e^y &= 2 - \frac{1}{x + 1} = \frac{2x + 1}{x + 1} \\ y &= \log\left(\frac{2x + 1}{x + 1}\right). \end{aligned}
    To change sign, a continuous quantity would have to pass through 0, but here its absolute value is always 1. Taking log⁡\log needs 2x+1x+1>0\frac{2x + 1}{x + 1} > 0⁠. On the interval through x=0x = 0 we have x+1>0x + 1 > 0⁠, so we need 2x+1>02x + 1 > 0⁠, that is x>−12x > -\frac{1}{2}⁠. As x→−12+x \to -\frac{1}{2}^+⁠, the fraction tends to 0+0^+ and y→−∞y \to -\infty⁠: the solution cannot be continued further left. As x→∞x \to \infty⁠, y→log⁡2y \to \log 2⁠, the constant solution of Step 2.
    log⁡a+log⁡b=log⁡(ab)\log a + \log b = \log(ab)⁠; log⁡∣u∣=0  ⟺  ∣u∣=1\log|u| = 0 \iff |u| = 1⁠. Basics: exponentials
  6. Compare with the textbook's form

    The textbook gives y=log⁡∣2x+1x+1∣y = \log\left|\frac{2x + 1}{x + 1}\right|⁠, x≠−1x \ne -1⁠. For x>−12x > -\frac{1}{2} the fraction is positive, so this is our answer there. But on −1<x<−12-1 < x < -\frac{1}{2} the absolute value form does not solve the equation. Take x=−34x = -\frac{3}{4}⁠: the formula gives y=log⁡∣−1/21/4∣=log⁡2y = \log\left|\frac{-1/2}{1/4}\right| = \log 2⁠, so the right side is 2e−log⁡2−1=02e^{-\log 2} - 1 = 0⁠; but its slope there is 1(2x+1)(x+1)=−8\frac{1}{(2x + 1)(x + 1)} = -8⁠, so the left side is 14⋅(−8)=−2≠0\frac{1}{4}\cdot(-8) = -2 \ne 0⁠.

    Differentiating log⁡∣2x+1∣−log⁡∣x+1∣\log|2x + 1| - \log|x + 1| gives 22x+1−1x+1=1(2x+1)(x+1)\frac{2}{2x + 1} - \frac{1}{x + 1} = \frac{1}{(2x + 1)(x + 1)} wherever it is defined. Where the fraction is negative, e−ye^{-y} is −x+12x+1-\frac{x + 1}{2x + 1} instead of x+12x+1\frac{x + 1}{2x + 1}⁠, and the equation fails. The textbook's form is valid only where 2x+1x+1>0\frac{2x + 1}{x + 1} > 0⁠, and the solution through (0,0)(0, 0) is the piece x>−12x > -\frac{1}{2}⁠.
    ddxlog⁡∣x∣=1x\frac{d}{dx}\log|x| = \frac{1}{x} (Section 7.2, formula (xii)); a particular solution lives on one interval through the given point. Lesson: the Miscellaneous exercise player
  7. Check by substituting back, and see the curve

    From y=log⁡(2x+1)−log⁡(x+1)y = \log(2x + 1) - \log(x + 1)⁠, for x>−12x > -\frac{1}{2}⁠:

    (x+1)dydx=x+1(2x+1)(x+1)=12x+1,2e−y−1=2(x+1)2x+1−1=12x+1.\begin{aligned} (x + 1)\frac{dy}{dx} &= \frac{x + 1}{(2x + 1)(x + 1)} \\ &= \frac{1}{2x + 1}, \\ 2e^{-y} - 1 &= \frac{2(x + 1)}{2x + 1} - 1 \\ &= \frac{1}{2x + 1}. \end{aligned}

    The two sides agree, and at x=0x = 0⁠: y=log⁡1=0y = \log 1 = 0⁠.

    X Y Y′ (0, 0) x = −1/2 y = log 2 y = log((2x + 1)/(x + 1))
    Slope field of dydx=2e−y−1x+1\frac{dy}{dx} = \frac{2e^{-y} - 1}{x + 1} for x>−1x > -1⁠, with equal scales, and the particular solution y=log⁡2x+1x+1y = \log\frac{2x + 1}{x + 1} through (0,0)(0, 0)⁠. It plunges towards the dashed line x=−12x = -\frac{1}{2} and levels off towards the dashed constant solution y=log⁡2y = \log 2⁠.
    e−y=x+12x+1e^{-y} = \frac{x + 1}{2x + 1} because ey=2x+1x+1e^y = \frac{2x + 1}{x + 1}⁠. Substituting the answer back makes both sides equal to 12x+1\frac{1}{2x + 1}⁠, and the point satisfies it.
    A solution makes L.H.S. = R.H.S. (Section 9.3). Basics: a rule for slopes
Result

The general solution is −log⁡∣2−ey∣=log⁡∣x+1∣+C-\log|2 - e^y| = \log|x + 1| + C⁠, and the particular solution with y=0y = 0 when x=0x = 0 is y=log⁡(2x+1x+1)y = \log\left(\frac{2x + 1}{x + 1}\right)⁠, for x>−12x > -\frac{1}{2}⁠. (Textbook answer: y=log⁡∣2x+1x+1∣y = \log\left|\frac{2x + 1}{x + 1}\right|⁠, x≠−1x \ne -1⁠; the same for x>−12x > -\frac{1}{2}⁠, but the absolute value form does not solve the equation on −1<x<−12-1 < x < -\frac{1}{2}⁠, see Step 6.)

Check it with numbers

Take x=1x = 1⁠: y=log⁡32≈0.4054651y = \log\frac{3}{2} \approx 0.4054651⁠. The equation gives 2⋅23−1=132\cdot\frac{2}{3} - 1 = \frac{1}{3} for (x+1)dydx(x + 1)\frac{dy}{dx}⁠, so dydx=16≈0.1666667\frac{dy}{dx} = \frac{1}{6} \approx 0.1666667⁠.

The curve itself: y(1.001)≈0.4056316776y(1.001) \approx 0.4056316776 and y(0.999)≈0.4052983442y(0.999) \approx 0.4052983442⁠, a difference of 0.00033333340.0003333334⁠, so

0.00033333340.002≈0.1666667.\frac{0.0003333334}{0.002} \approx 0.1666667.
Common mistakes
  1. Integrating 12e−y−1\frac{1}{2e^{-y} - 1} directly. Multiply top and bottom by eye^y first; then it is ey2−ey\frac{e^y}{2 - e^y}⁠.
  2. Losing the minus sign: ddy(2−ey)=−ey\frac{d}{dy}(2 - e^y) = -e^y⁠, so ∫ey dy2−ey=−log⁡∣2−ey∣\int\frac{e^y\,dy}{2 - e^y} = -\log|2 - e^y|⁠.
  3. Keeping the absolute values to the end. The point fixes their signs; without that step the answer looks valid where it is not.
  4. Forgetting the interval. The solution through (0,0)(0, 0) stops at x=−12x = -\frac{1}{2}⁠, not at x=−1x = -1⁠.
What to take away
  1. For 1ae−y+b\frac{1}{a e^{-y} + b}⁠, multiply top and bottom by eye^y to get the derivative of the denominator on top.
  2. After using the point, settle the signs inside ∣…∣|\ldots|⁠; that also tells you the interval of the particular solution.
  3. Dividing by h(y)h(y) can lose constant solutions; here y=log⁡2y = \log 2⁠, which the curve approaches but never reaches.

Every fact used, and where it comes from

FactUsed inSource
Separable form; separating and integrating, one constantSteps 1, 2, 3Section 9.4.1, equations (2) to (4) (Lesson)
Order and degreeStep 1Sections 9.2.1 and 9.2.2 (Lesson)
Substitution t=2−eyt = 2 - e^y⁠; ∫duu=log⁡∣u∣+C\int\frac{du}{u} = \log|u| + CStep 3Section 7.3.1; Section 7.2, formula (xii) (Basics)
Particular solution from a pointStep 4Section 9.3 (Lesson)
Laws of logarithms; elog⁡u=ue^{\log u} = u for u>0u > 0Steps 5, 6, 7Chapter 5, Section 5.4 (Basics)
ddxlog⁡∣x∣=1x\frac{d}{dx}\log|x| = \frac{1}{x}⁠, with the chain rule; substituting backSteps 6, 7Section 7.2, formula (xii); Chapter 5, Section 5.3.1; Section 9.3 (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 →