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

Miscellaneous · Q7: (1+e2x) dy+(1+y2)ex dx=0(1 + e^{2x})\,dy + (1 + y^2)e^x\,dx = 0⁠, y(0)=1y(0) = 1

Miscellaneous ExerciseVariables separable, particular solution · Section 9.4.1
The question

7. Find the particular solution of the differential equation (1+e2x) dy+(1+y2) ex dx=0(1 + e^{2x})\,dy + (1 + y^2)\,e^x\,dx = 0⁠, given that y=1y = 1 when x=0x = 0⁠.

Exam answer

Since 1+e2x>01 + e^{2x} > 0 and 1+y2>01 + y^2 > 0⁠, dividing by their product, the variables separate:

dy1+y2+ex dx1+e2x=0\frac{dy}{1 + y^2} + \frac{e^x\,dx}{1 + e^{2x}} = 0

Integrating both sides,

∫dy1+y2+∫ex dx1+e2x=C\int\frac{dy}{1 + y^2} + \int\frac{e^x\,dx}{1 + e^{2x}} = C

In the second integral, put ex=te^x = t⁠. Then ex dx=dte^x\,dx = dt⁠.

tan⁡−1y+∫dt1+t2=Ctan⁡−1y+tan⁡−1t=Ctan⁡−1y+tan⁡−1(ex)=C …(i)\begin{aligned} \tan^{-1}y + \int\frac{dt}{1 + t^2} &= C \\ \tan^{-1}y + \tan^{-1}t &= C \\ \tan^{-1}y + \tan^{-1}(e^x) &= C\ \ldots(\text{i}) \end{aligned}

Putting x=0x = 0⁠, y=1y = 1 in (i): tan⁡−11+tan⁡−11=C\tan^{-1}1 + \tan^{-1}1 = C⁠, so C=π4+π4=π2C = \frac{\pi}{4} + \frac{\pi}{4} = \frac{\pi}{2}⁠.

∴\therefore The particular solution is tan⁡−1y+tan⁡−1(ex)=π2\tan^{-1}y + \tan^{-1}(e^x) = \dfrac{\pi}{2}⁠.

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

The one idea this problem is built on

The dydy term carries a factor in xx and the dxdx term a factor in yy⁠. Dividing by both factors, (1+e2x)(1+y2)(1 + e^{2x})(1 + y^2)⁠, separates the variables. The yy-integral is a standard inverse tangent, and the xx-integral becomes one too after ex=te^x = t⁠, because e2x=t2e^{2x} = t^2⁠. The condition y=1y = 1 at x=0x = 0 then fixes the constant; the answer even simplifies to y=e−xy = e^{-x}⁠.

Given, to find, and the plan
Given
(1+e2x) dy+(1+y2)ex dx=0(1 + e^{2x})\,dy + (1 + y^2)e^x\,dx = 0⁠, and y=1y = 1 when x=0x = 0⁠.
To find
The particular solution satisfying the condition.
Plan
(1) Separate the variables. (2) Integrate, with ex=te^x = t for the xx-part and one constant. (3) Put x=0x = 0⁠, y=1y = 1 to find CC⁠. (4) Simplify the particular solution. (5) Check by substituting back, and see the curve.

Basics you need

1Variables separable

Arrange the equation as (function of yy⁠) dydy ++ (function of xx⁠) dx=0dx = 0 and integrate each part (Section 9.4.1). Lesson: variables separable

2∫dt1+t2\int\frac{dt}{1 + t^2} and substitution

∫dt1+t2=tan⁡−1t+C\int\frac{dt}{1 + t^2} = \tan^{-1}t + C (Section 7.2, formula (x)); with ex=te^x = t⁠, ex dx=dte^x\,dx = dt (Section 7.3.1). Basics: every method ends with an integral

3Particular solution from a condition

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

4Inverse tangent values

tan⁡−11=π4\tan^{-1}1 = \frac{\pi}{4}⁠; tan⁡−1\tan^{-1} takes values in (−π2,π2)\left(-\frac{\pi}{2}, \frac{\pi}{2}\right) (Chapter 2, Section 2.2); tan⁡(π2−θ)=cot⁡θ\tan\left(\frac{\pi}{2} - \theta\right) = \cot\theta (Class XI). Basics: e^{kt} and its rate

Solution

  1. Separate the variables

    Both 1+e2x1 + e^{2x} and 1+y21 + y^2 are always positive. Divide every term by (1+e2x)(1+y2)(1 + e^{2x})(1 + y^2)⁠:

    dy1+y2+ex dx1+e2x=0.\frac{dy}{1 + y^2} + \frac{e^x\,dx}{1 + e^{2x}} = 0.
    In the first term 1+e2x1 + e^{2x} cancels, in the second 1+y21 + y^2 cancels, so each term has one variable. Because the divisor is never 0, no solution is lost and the equation is defined for all real xx and yy⁠.
    Section 9.4.1: separate, then integrate. Lesson: variables separable
  2. Integrate, with one constant

    The first integral is standard: ∫dy1+y2=tan⁡−1y\int\frac{dy}{1 + y^2} = \tan^{-1}y⁠. For the second, put ex=te^x = t⁠, so ex dx=dte^x\,dx = dt and e2x=t2e^{2x} = t^2⁠:

    ∫ex dx1+e2x=∫dt1+t2=tan⁡−1t=tan⁡−1(ex).\begin{aligned} \int\frac{e^x\,dx}{1 + e^{2x}} &= \int\frac{dt}{1 + t^2} \\ &= \tan^{-1}t = \tan^{-1}(e^x). \end{aligned}

    So the general solution is

    tan⁡−1y+tan⁡−1(ex)=C,…(1)\tan^{-1}y + \tan^{-1}(e^x) = C,\quad\ldots(1)

    where CC is an arbitrary constant.

    ex dxe^x\,dx is exactly the differential of exe^x⁠, and e2x=(ex)2e^{2x} = (e^x)^2⁠, so the substitution turns the xx-part into the same standard form as the yy-part. One constant suffices for a first order equation.
    Section 7.2, formula (x); substitution, Section 7.3.1. Basics: every method ends with an integral
  3. Use the condition y=1y = 1 when x=0x = 0

    Putting x=0x = 0⁠, y=1y = 1 in (1), with e0=1e^0 = 1⁠:

    tan⁡−11+tan⁡−11=C,C=π4+π4=π2.\begin{aligned} \tan^{-1}1 + \tan^{-1}1 &= C, \\ C = \frac{\pi}{4} + \frac{\pi}{4} &= \frac{\pi}{2}. \end{aligned}

    So the particular solution is

    tan⁡−1y+tan⁡−1(ex)=π2.\tan^{-1}y + \tan^{-1}(e^x) = \frac{\pi}{2}.
    Of all the curves (1), the condition picks the one through (0,1)(0, 1)⁠. tan⁡−11=π4\tan^{-1}1 = \frac{\pi}{4} because tan⁡π4=1\tan\frac{\pi}{4} = 1 and π4\frac{\pi}{4} lies in the principal range.
    Section 9.3: a particular solution from the general one. Lesson: Examples 4 to 9
  4. Simplify: the particular solution is y=e−xy = e^{-x}

    Let θ=tan⁡−1(ex)\theta = \tan^{-1}(e^x)⁠. Since ex>0e^x > 0⁠, 0<θ<π20 < \theta < \frac{\pi}{2}⁠, so π2−θ\frac{\pi}{2} - \theta also lies in (0,π2)\left(0, \frac{\pi}{2}\right)⁠, inside the principal range. The particular solution says tan⁡−1y=π2−θ\tan^{-1}y = \frac{\pi}{2} - \theta⁠, hence

    y=tan⁡(π2−θ)=cot⁡θ=1ex=e−x,y = \tan\left(\frac{\pi}{2} - \theta\right) = \cot\theta = \frac{1}{e^x} = e^{-x},

    for every real xx⁠.

    The key form with inverse tangents and the explicit form y=e−xy = e^{-x} are the same curve. The explicit form makes the check in Step 5 short and shows that the solution exists for all xx⁠.
    tan⁡(π2−θ)=cot⁡θ\tan\left(\frac{\pi}{2} - \theta\right) = \cot\theta (Class XI); principal range of tan⁡−1\tan^{-1} (Chapter 2, Section 2.2). Lesson: Miscellaneous exercise player
  5. Check by substituting back, and see the curve

    For y=e−xy = e^{-x}⁠, dy=−e−x dxdy = -e^{-x}\,dx and 1+y2=1+e−2x1 + y^2 = 1 + e^{-2x}⁠. The left side of the equation becomes

    (1+e2x)(−e−x) dx+(1+e−2x)ex dx=(−e−x−ex+ex+e−x) dx=0.\begin{aligned} &(1 + e^{2x})(-e^{-x})\,dx + (1 + e^{-2x})e^x\,dx \\ &= (-e^{-x} - e^x + e^x + e^{-x})\,dx = 0. \end{aligned}

    And y(0)=e0=1y(0) = e^0 = 1⁠. So the particular solution satisfies both the equation and the condition.

    X Y X′ Y′ (0, 1) y = e⁻ˣ C = 1.2 C = 0.6 O
    Slope field of dydx=−(1+y2)ex1+e2x\frac{dy}{dx} = -\frac{(1 + y^2)e^x}{1 + e^{2x}}⁠, with equal scales. The bold curve is the particular solution y=e−xy = e^{-x} through (0,1)(0, 1)⁠; the thin curves are the members C=1.2C = 1.2 and C=0.6C = 0.6 of tan⁡−1y+tan⁡−1(ex)=C\tan^{-1}y + \tan^{-1}(e^x) = C⁠.
    Every term cancels, so the curve really solves the equation. In the picture the slope marks are tangent to every member of the family, and only the bold one passes through (0,1)(0, 1)⁠.
    Section 9.3: check a solution by substituting it. Basics: a rule for slopes
Result

The general solution is tan⁡−1y+tan⁡−1(ex)=C\tan^{-1}y + \tan^{-1}(e^x) = C⁠, and the particular solution with y=1y = 1 when x=0x = 0 is

tan⁡−1y+tan⁡−1(ex)=π2,\tan^{-1}y + \tan^{-1}(e^x) = \frac{\pi}{2},

that is, y=e−xy = e^{-x}⁠.

(Textbook answer: tan⁡−1y+tan⁡−1(ex)=π2\tan^{-1}y + \tan^{-1}(e^x) = \dfrac{\pi}{2}⁠.)

Check it with numbers

At x=1x = 1⁠: y=e−1≈0.367879y = e^{-1} \approx 0.367879⁠. Then tan⁡−1(e)≈1.218283\tan^{-1}(e) \approx 1.218283 and tan⁡−1(e−1)≈0.352513\tan^{-1}(e^{-1}) \approx 0.352513⁠, whose sum 1.5707961.570796 is π2\frac{\pi}{2}⁠.

The equation gives the slope

−(1+e−2)e1+e2=−e+e−11+e2=−e−1≈−0.367879,\begin{aligned} &-\frac{(1 + e^{-2})e}{1 + e^2} \\ &= -\frac{e + e^{-1}}{1 + e^2} \\ &= -e^{-1} \approx -0.367879, \end{aligned}

and the curve y=e−xy = e^{-x} has slope −e−1-e^{-1} there. They agree.

Common mistakes
  1. Integrating ex1+e2x\frac{e^x}{1 + e^{2x}} as a logarithm. The top is the derivative of exe^x⁠, not of 1+e2x1 + e^{2x}⁠; the substitution ex=te^x = t gives tan⁡−1(ex)\tan^{-1}(e^x)⁠.
  2. Taking C=π4C = \frac{\pi}{4} by putting in only one of the two inverse tangents. Both terms give π4\frac{\pi}{4}⁠.
  3. Dividing by 1+y21 + y^2 with a worry about losing solutions: it is never 0, so nothing is lost.
What to take away
  1. Divide by the "wrong" factors to separate: here (1+e2x)(1+y2)(1 + e^{2x})(1 + y^2)⁠.
  2. ∫ex1+e2x dx=tan⁡−1(ex)+C\int\frac{e^x}{1 + e^{2x}}\,dx = \tan^{-1}(e^x) + C with ex=te^x = t⁠.
  3. An inverse-tangent answer can sometimes be simplified: here tan⁡−1y=π2−tan⁡−1(ex)\tan^{-1}y = \frac{\pi}{2} - \tan^{-1}(e^x) gives y=e−xy = e^{-x}⁠.

Every fact used, and where it comes from

FactUsed inSource
Separating the variables; integrate both sidesSteps 1, 2Section 9.4.1 (Lesson)
∫dt1+t2=tan⁡−1t+C\int\frac{dt}{1 + t^2} = \tan^{-1}t + CStep 2Section 7.2, formula (x) (Basics)
Substitution ex=te^x = t⁠, ex dx=dte^x\,dx = dtStep 2Section 7.3.1 (Basics)
Particular solution from a conditionStep 3Section 9.3 (Lesson)
tan⁡−11=π4\tan^{-1}1 = \frac{\pi}{4}⁠; principal range of tan⁡−1\tan^{-1}Steps 3, 4Chapter 2, Section 2.2
tan⁡(π2−θ)=cot⁡θ\tan\left(\frac{\pi}{2} - \theta\right) = \cot\thetaStep 4Class XI trigonometry
(e−x)′=−e−x(e^{-x})' = -e^{-x}Step 5Chapter 5, Section 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 →