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

Example 22: Linear in xx⁠: (tan⁡−1y−x) dy=(1+y2) dx(\tan^{-1}y - x)\,dy = (1 + y^2)\,dx

ExamplesMiscellaneous Examples: linear in x · Section 9.4.3
The question

Solve the differential equation (tan⁡−1y−x) dy=(1+y2) dx(\tan^{-1}y - x)\,dy = (1 + y^2)\,dx⁠.

Exam answer

The equation can be written as

dxdy+x1+y2=tan⁡−1y1+y2\frac{dx}{dy} + \frac{x}{1 + y^2} = \frac{\tan^{-1}y}{1 + y^2}

This is of the form dxdy+P1x=Q1\frac{dx}{dy} + P_1x = Q_1⁠, where P1=11+y2P_1 = \frac{1}{1 + y^2} and Q1=tan⁡−1y1+y2Q_1 = \frac{\tan^{-1}y}{1 + y^2}⁠.

I.F.=e∫11+y2dy=etan⁡−1y\text{I.F.} = e^{\int\frac{1}{1 + y^2}dy} = e^{\tan^{-1}y}

Let I=∫tan⁡−1y1+y2 etan⁡−1y dyI = \int\frac{\tan^{-1}y}{1 + y^2}\,e^{\tan^{-1}y}\,dy⁠. Then the solution is given by

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

Put tan⁡−1y=t\tan^{-1}y = t⁠. Then 11+y2 dy=dt\frac{1}{1 + y^2}\,dy = dt⁠.

I=∫t et dtI = \int t\,e^t\,dt

Integrating by parts with tt as the first function,

I=t et−∫1⋅et dt=t et−et=et(t−1)=etan⁡−1y(tan⁡−1y−1)\begin{aligned} I &= t\,e^t - \int 1\cdot e^t\,dt \\ &= t\,e^t - e^t = e^t(t - 1) \\ &= e^{\tan^{-1}y}(\tan^{-1}y - 1) \end{aligned}

Putting the value of II in (i),

x etan⁡−1y=etan⁡−1y(tan⁡−1y−1)+C\begin{aligned} x\,e^{\tan^{-1}y} &= e^{\tan^{-1}y}(\tan^{-1}y - 1) \\ &\quad + C \end{aligned}

Dividing by etan⁡−1ye^{\tan^{-1}y}⁠,

∴\therefore x=(tan⁡−1y−1)+Ce−tan⁡−1yx = (\tan^{-1}y - 1) + Ce^{-\tan^{-1}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=1+y2tan⁡−1y−x\frac{dy}{dx} = \frac{1 + y^2}{\tan^{-1}y - x}⁠, which is not linear in yy⁠. Solved for dxdy\frac{dx}{dy}⁠, it is dxdy=tan⁡−1y−x1+y2\frac{dx}{dy} = \frac{\tan^{-1}y - x}{1 + y^2}⁠, and xx appears only to the first power: it is linear in xx⁠. The integrating factor is etan⁡−1ye^{\tan^{-1}y}⁠, and the integral that remains becomes ∫tet dt\int te^t\,dt after putting t=tan⁡−1yt = \tan^{-1}y⁠.

Given, to find, and the plan
Given
(tan⁡−1y−x) dy=(1+y2) dx(\tan^{-1}y - x)\,dy = (1 + y^2)\,dx⁠, for all real yy⁠.
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 see the product rule. (5) Integrate, with one constant. (6) Find the integral by substitution and by parts. (7) Solve for xx⁠. (8) Check.

Basics you need

1Linear in xx

dxdy+P1x=Q1\frac{dx}{dy} + P_1x = Q_1⁠, with P1P_1⁠, Q1Q_1 functions of yy only: 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

2∫dy1+y2=tan⁡−1y\int\frac{dy}{1 + y^2} = \tan^{-1}y

Section 7.2, formula (x); and ddytan⁡−1y=11+y2\frac{d}{dy}\tan^{-1}y = \frac{1}{1 + y^2}⁠. Basics: every method ends with an integral

3Substitution, then by parts

With t=tan⁡−1yt = \tan^{-1}y⁠, dt=dy1+y2dt = \frac{dy}{1 + y^2} (Section 7.3.1); then ∫tet dt\int te^t\,dt by parts with tt first (Section 7.6). Basics: the product rule, read backwards

4Exponentials

ea⋅e−a=1e^{a}\cdot e^{-a} = 1⁠, and ea≠0e^a \ne 0 for every aa⁠. Basics: exponentials

Solution

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

    dxdy=tan⁡−1y−x1+y2dxdy+x1+y2=tan⁡−1y1+y2.…(1)\begin{aligned} \frac{dx}{dy} &= \frac{\tan^{-1}y - x}{1 + y^2} \\ \frac{dx}{dy} + \frac{x}{1 + y^2} &= \frac{\tan^{-1}y}{1 + y^2}.\quad\ldots(1) \end{aligned}
    Divide by (1+y2) dy(1 + y^2)\,dy⁠; 1+y2≥11 + y^2 \ge 1 is never 0. Then move the xx term to the left. In this form xx and dxdy\frac{dx}{dy} appear to the first power only, so the equation is linear in xx⁠.
    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=11+y2P_1 = \frac{1}{1 + y^2} and Q1=tan⁡−1y1+y2Q_1 = \frac{\tan^{-1}y}{1 + y^2}⁠.

    Both are functions of yy only, defined for every real yy⁠, as the form requires.
    Section 9.4.3: P1P_1⁠, Q1Q_1 constants or functions of yy only. Lesson: linear equations
  3. The integrating factor: etan⁡−1ye^{\tan^{-1}y}

    I.F.=e∫11+y2 dy=etan⁡−1y.\text{I.F.} = e^{\int\frac{1}{1 + y^2}\,dy} = e^{\tan^{-1}y}.
    ∫dy1+y2=tan⁡−1y\int\frac{dy}{1 + y^2} = \tan^{-1}y⁠; any one antiderivative will do, since an added constant would only multiply the I.F. by a nonzero constant.
    Section 9.4.3: I.F. =e∫P1 dy= e^{\int P_1\,dy}⁠; Section 7.2, formula (x). Basics: exponentials
  4. Multiply by the I.F.: the left side is one derivative

    ddy(x etan⁡−1y)=tan⁡−1y1+y2 etan⁡−1y.\frac{d}{dy}\left(x\,e^{\tan^{-1}y}\right) = \frac{\tan^{-1}y}{1 + y^2}\,e^{\tan^{-1}y}.
    By the product and chain rules, ddy(x etan⁡−1y)\frac{d}{dy}\left(x\,e^{\tan^{-1}y}\right) =etan⁡−1ydxdy+x⋅etan⁡−1y1+y2= e^{\tan^{-1}y}\frac{dx}{dy} + x\cdot\frac{e^{\tan^{-1}y}}{1 + y^2}⁠, which is the left side of (1) multiplied by etan⁡−1ye^{\tan^{-1}y}⁠.
    Product and chain rules (Chapter 5, Sections 5.3 and 5.3.1). Basics: (y · g)′ = g(y′ + Py)
  5. Integrate with respect to yy⁠, with one constant

    x etan⁡−1y=∫tan⁡−1y1+y2 etan⁡−1y dy+C.…(2)\begin{aligned} x\,e^{\tan^{-1}y} &= \int\frac{\tan^{-1}y}{1 + y^2}\,e^{\tan^{-1}y}\,dy \\ &\quad + C.\quad\ldots(2) \end{aligned}
    This is x (I.F.)=∫(Q1×I.F.) dy+Cx\,(\text{I.F.}) = \int(Q_1\times\text{I.F.})\,dy + C⁠. The CC here is the one arbitrary constant; the integral below gets none of its own.
    Section 9.4.3: the solution of dxdy+P1x=Q1\frac{dx}{dy} + P_1x = Q_1⁠. Basics: one constant for order 1
  6. The integral: substitute t=tan⁡−1yt = \tan^{-1}y⁠, then by parts

    Let I=∫tan⁡−1y1+y2 etan⁡−1y dyI = \int\frac{\tan^{-1}y}{1 + y^2}\,e^{\tan^{-1}y}\,dy⁠. Put tan⁡−1y=t\tan^{-1}y = t⁠; then 11+y2 dy=dt\frac{1}{1 + y^2}\,dy = dt⁠, and

    I=∫t et dt.I = \int t\,e^t\,dt.

    By parts, with tt as the first function and ete^t the second:

    I=t et−∫1⋅et dt=t et−et=et(t−1)=etan⁡−1y(tan⁡−1y−1).\begin{aligned} I &= t\,e^t - \int 1\cdot e^t\,dt \\ &= t\,e^t - e^t = e^t(t - 1) \\ &= e^{\tan^{-1}y}(\tan^{-1}y - 1). \end{aligned}
    tan⁡−1y\tan^{-1}y and its derivative 11+y2\frac{1}{1 + y^2} both appear in the integrand, which is what makes the substitution work; t=tan⁡−1yt = \tan^{-1}y takes every value in (−π2,π2)\left(-\frac{\pi}{2}, \frac{\pi}{2}\right) and is one-one, so the substitution is valid for all real yy⁠. In ∫tet dt\int te^t\,dt the algebraic factor tt is the first function (ILATE), because differentiating it gives 1.
    Section 7.3.1, substitution; Section 7.6, integration by parts. Basics: every method ends with an integral
  7. Solve for xx

    Putting II into (2):

    x etan⁡−1y=etan⁡−1y(tan⁡−1y−1)+Cx=(tan⁡−1y−1)+Ce−tan⁡−1y.\begin{aligned} x\,e^{\tan^{-1}y} &= e^{\tan^{-1}y}(\tan^{-1}y - 1) + C \\ x &= (\tan^{-1}y - 1) + Ce^{-\tan^{-1}y}. \end{aligned}
    Divide by etan⁡−1ye^{\tan^{-1}y}⁠, which is never 0; Cetan⁡−1y=Ce−tan⁡−1y\frac{C}{e^{\tan^{-1}y}} = Ce^{-\tan^{-1}y}⁠. The answer holds for every real yy⁠.
    Section 9.4.3: the general solution. Lesson: Examples 19 to 22
  8. Check by substituting back

    Write t=tan⁡−1yt = \tan^{-1}y⁠, so x=t−1+Ce−tx = t - 1 + Ce^{-t} and dtdy=11+y2\frac{dt}{dy} = \frac{1}{1 + y^2}⁠. Then

    dxdy=(1−Ce−t)11+y2,\frac{dx}{dy} = \left(1 - Ce^{-t}\right)\frac{1}{1 + y^2}, dxdy+x1+y2=1−Ce−t+t−1+Ce−t1+y2=t1+y2=tan⁡−1y1+y2,\begin{aligned} &\frac{dx}{dy} + \frac{x}{1 + y^2} \\ &= \frac{1 - Ce^{-t} + t - 1 + Ce^{-t}}{1 + y^2} \\ &= \frac{t}{1 + y^2} = \frac{\tan^{-1}y}{1 + y^2}, \end{aligned}

    which is (1), for every CC⁠.

    The CC terms cancel, as they must: Ce−tan⁡−1yCe^{-\tan^{-1}y} alone solves dxdy+x1+y2=0\frac{dx}{dy} + \frac{x}{1 + y^2} = 0⁠, and tan⁡−1y−1\tan^{-1}y - 1 supplies the right side.
    A solution makes L.H.S. = R.H.S. (Section 9.3); chain rule (Chapter 5, Section 5.3.1). Lesson: general and particular solutions
Result

The general solution is x=(tan⁡−1y−1)+Ce−tan⁡−1yx = (\tan^{-1}y - 1) + Ce^{-\tan^{-1}y}⁠, where CC is an arbitrary constant, for all real yy⁠. (Textbook answer: x=(tan⁡−1y−1)+Ce−tan⁡−1yx = (\tan^{-1}y - 1) + Ce^{-\tan^{-1}y}⁠.)

Check it with numbers

Take C=1C = 1 and y=1y = 1⁠: tan⁡−11=π4≈0.7853982\tan^{-1}1 = \frac{\pi}{4} \approx 0.7853982 and e−π/4≈0.4559381e^{-\pi/4} \approx 0.4559381⁠, so x≈0.2413363x \approx 0.2413363⁠. The equation gives dxdy=tan⁡−1y−x1+y2\frac{dx}{dy} = \frac{\tan^{-1}y - x}{1 + y^2} ≈0.7853982−0.24133632≈0.27203\approx \frac{0.7853982 - 0.2413363}{2} \approx 0.27203⁠.

The curve itself: x(1.001)≈0.2416082431x(1.001) \approx 0.2416082431 and x(0.999)≈0.2410641812x(0.999) \approx 0.2410641812⁠, so

0.2416082431−0.24106418120.002≈0.27203.\begin{aligned} &\frac{0.2416082431 - 0.2410641812}{0.002} \\ &\approx 0.27203. \end{aligned}
Common mistakes
  1. Trying to make it linear in yy⁠. dydx=1+y2tan⁡−1y−x\frac{dy}{dx} = \frac{1 + y^2}{\tan^{-1}y - x} is not linear in yy⁠; use dxdy\frac{dx}{dy}⁠.
  2. Taking P1=−11+y2P_1 = -\frac{1}{1 + y^2} by forgetting to move the xx term across: it is +x1+y2+\frac{x}{1 + y^2} on the left.
  3. Choosing ete^t as the first function in ∫tet dt\int te^t\,dt⁠, which makes the integral harder.
  4. Dividing CC wrongly: the answer is +Ce−tan⁡−1y+Ce^{-\tan^{-1}y}⁠, not +C+C⁠.
What to take away
  1. When yy appears inside a function like tan⁡−1y\tan^{-1}y but xx appears only linearly, try dxdy+P1x=Q1\frac{dx}{dy} + P_1x = Q_1⁠.
  2. P1=11+y2P_1 = \frac{1}{1 + y^2} gives I.F. etan⁡−1ye^{\tan^{-1}y}⁠; then t=tan⁡−1yt = \tan^{-1}y usually simplifies ∫Q1 (I.F.) dy\int Q_1\,(\text{I.F.})\,dy⁠.
  3. ∫tet dt=et(t−1)+C\int te^t\,dt = e^t(t - 1) + C is worth remembering.

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, 2, 3, 5Section 9.4.3 (Lesson)
∫dy1+y2=tan⁡−1y+C\int\frac{dy}{1 + y^2} = \tan^{-1}y + CStep 3Section 7.2, formula (x) (Basics)
Product and chain rules; ddytan⁡−1y=11+y2\frac{d}{dy}\tan^{-1}y = \frac{1}{1 + y^2}Steps 4, 8Chapter 5, Sections 5.3, 5.3.1 and 5.3.3 (Basics)
Substitution; integration by partsStep 6Sections 7.3.1 and 7.6 (Basics)
Substituting back into the equationStep 8Section 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 →