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

Exercise 9.5 · Q16: Curve through the origin with slope x+yx + y

Exercise 9.5Linear differential equations, a curve from its slope · Section 9.4.3
The question

16. Find the equation of a curve passing through the origin given that the slope of the tangent to the curve at any point (x,y)(x, y) is equal to the sum of the coordinates of the point.

Exam answer

The slope of the tangent at (x,y)(x, y) is dydx\frac{dy}{dx}⁠, so

dydx=x+ydydx−y=x\begin{aligned} \frac{dy}{dx} &= x + y \\ \frac{dy}{dx} - y &= x \end{aligned}

This is of the form dydx+Py=Q\frac{dy}{dx} + Py = Q⁠, where P=−1P = -1 and Q=xQ = x⁠.

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

So the solution is given by

y e−x=∫x e−x dx+C…(i)y\,e^{-x} = \int x\,e^{-x}\,dx + C\quad\ldots(\text{i})

Integrating by parts with xx as the first function,

∫x e−x dx=x(−e−x)−∫1⋅(−e−x) dx=−x e−x−e−x\begin{aligned} &\int x\,e^{-x}\,dx \\ &= x(-e^{-x}) - \int 1\cdot(-e^{-x})\,dx \\ &= -x\,e^{-x} - e^{-x} \end{aligned}

Putting this in (i),

y e−x=−x e−x−e−x+Cy=−x−1+Cex…(ii)\begin{aligned} y\,e^{-x} &= -x\,e^{-x} - e^{-x} + C \\ y &= -x - 1 + Ce^x\quad\ldots(\text{ii}) \end{aligned}

The curve passes through the origin. Putting x=0x = 0⁠, y=0y = 0 in (ii),

0=0−1+C⋅e0C=1\begin{aligned} 0 &= 0 - 1 + C\cdot e^0 \\ C &= 1 \end{aligned}

Putting C=1C = 1 in (ii), y=−x−1+exy = -x - 1 + e^x⁠, that is,

∴\therefore The equation of the curve is x+y+1=exx + y + 1 = e^x⁠.

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

The one idea this problem is built on

Translate the sentence into an equation: "the slope of the tangent at (x,y)(x, y)" is dydx\frac{dy}{dx}⁠, and "the sum of the coordinates" is x+yx + y⁠. The equation dydx−y=x\frac{dy}{dx} - y = x is linear with P=−1P = -1⁠, so the integrating factor is e−xe^{-x}⁠; the remaining integral ∫x e−x dx\int x\,e^{-x}\,dx is done by parts. Solving gives a family of curves, and the origin picks one.

Given, to find, and the plan
Given
At every point (x,y)(x, y) of the curve, the slope of the tangent is x+yx + y⁠; the curve passes through (0,0)(0, 0)⁠.
To find
The equation of the curve.
Plan
(1) Write the differential equation. (2) Put it in the form dydx+Py=Q\frac{dy}{dx} + Py = Q⁠. (3) I.F. (4) Multiply and see the product rule. (5) Integrate, with one constant. (6) Find the integral by parts. (7) Solve for yy⁠. (8) Use the origin. (9) Check, and see the curve.

Basics you need

1Slope of a tangent

At (x,y)(x, y) the slope of the tangent is dydx\frac{dy}{dx}⁠; a rule for it is a differential equation. Basics: a rule for slopes

2First order linear equations

dydx+Py=Q\frac{dy}{dx} + Py = Q⁠; I.F. =e∫P dx= e^{\int P\,dx}⁠; y (I.F.)=∫(Q×I.F.) dx+Cy\,(\text{I.F.}) = \int(Q\times\text{I.F.})\,dx + C (Section 9.4.3). Lesson: linear equations, the integrating factor

3Integration by parts

∫f g dx=f∫g dx−∫(f′∫g dx)dx\int f\,g\,dx = f\int g\,dx - \int\left(f'\int g\,dx\right)dx⁠, with ff the first function (Section 7.6); here ∫e−x dx=−e−x\int e^{-x}\,dx = -e^{-x}⁠. Basics: every method ends with an integral

4Exponentials

e0=1e^0 = 1 and ex⋅e−x=1e^{x}\cdot e^{-x} = 1⁠. Basics: exponentials

Solution

  1. Write the slope condition as an equation

    dydx=x+y.\frac{dy}{dx} = x + y.
    "The slope of the tangent to the curve at (x,y)(x, y)" is dydx\frac{dy}{dx}⁠; "the sum of the coordinates of the point" is x+yx + y⁠.
    The slope of the tangent is dydx\frac{dy}{dx}⁠, as used in Section 9.4.1, Example 8. Basics: a rule for slopes
  2. The linear form: P=−1P = -1⁠, Q=xQ = x

    dydx−y=x.…(1)\frac{dy}{dx} - y = x.\quad\ldots(1)
    Move yy to the left. Compared with dydx+Py=Q\frac{dy}{dx} + Py = Q⁠: P=−1P = -1 (a constant, which is allowed) and Q=xQ = x⁠. The equation has order 1 and degree 1. It is not separable, since x+yx + y is not a product of a function of xx and a function of yy⁠.
    Section 9.4.3, step (i). Lesson: linear equations
  3. The integrating factor: e−xe^{-x}

    I.F.=e∫−1 dx=e−x.\text{I.F.} = e^{\int -1\,dx} = e^{-x}.
    ∫−1 dx=−x\int -1\,dx = -x⁠; one antiderivative is enough, since an added constant would only multiply the I.F. by a nonzero constant.
    Section 9.4.3, step (ii). Basics: exponentials
  4. Multiply by e−xe^{-x}⁠: the left side is one derivative

    e−xdydx−e−xy=x e−xddx(y e−x)=x e−x.\begin{aligned} e^{-x}\frac{dy}{dx} - e^{-x}y &= x\,e^{-x} \\ \frac{d}{dx}\left(y\,e^{-x}\right) &= x\,e^{-x}. \end{aligned}
    ddxe−x=−e−x\frac{d}{dx}e^{-x} = -e^{-x}⁠, so by the product rule ddx(y e−x)=e−xdydx−e−xy\frac{d}{dx}\left(y\,e^{-x}\right) = e^{-x}\frac{dy}{dx} - e^{-x}y⁠, exactly the left side.
    Product and chain rules (Chapter 5, Sections 5.3 and 5.3.1). Basics: (y · g)′ = g(y′ + Py)
  5. Integrate, with one constant

    y e−x=∫x e−x dx+C.…(2)y\,e^{-x} = \int x\,e^{-x}\,dx + C.\quad\ldots(2)
    This is y (I.F.)=∫(Q×I.F.) dx+Cy\,(\text{I.F.}) = \int(Q\times\text{I.F.})\,dx + C⁠. The CC is the one arbitrary constant; the integral below gets none of its own.
    Section 9.4.3, step (iii). Basics: one constant for order 1
  6. The integral, by parts

    Take xx as the first function and e−xe^{-x} as the second, so ∫e−x dx=−e−x\int e^{-x}\,dx = -e^{-x}⁠:

    ∫x e−x dx=x(−e−x)−∫1⋅(−e−x) dx=−x e−x+∫e−x dx=−x e−x−e−x.\begin{aligned} &\int x\,e^{-x}\,dx \\ &= x(-e^{-x}) - \int 1\cdot(-e^{-x})\,dx \\ &= -x\,e^{-x} + \int e^{-x}\,dx \\ &= -x\,e^{-x} - e^{-x}. \end{aligned}
    Differentiating xx makes it 1, so the new integral is easy. (ILATE: algebraic before exponential.) Check: ddx(−x e−x−e−x)\frac{d}{dx}\left(-x\,e^{-x} - e^{-x}\right) is −e−x+x e−x+e−x-e^{-x} + x\,e^{-x} + e^{-x}⁠, which equals x e−xx\,e^{-x}⁠.
    Section 7.6, integration by parts. Basics: every method ends with an integral
  7. Solve for yy⁠: the general solution

    y e−x=−x e−x−e−x+Cy=−x−1+Cex.…(3)\begin{aligned} y\,e^{-x} &= -x\,e^{-x} - e^{-x} + C \\ y &= -x - 1 + Ce^x.\quad\ldots(3) \end{aligned}
    Put the integral into (2), then multiply by exe^x⁠: e−x⋅ex=1e^{-x}\cdot e^x = 1⁠, and CC becomes CexCe^x⁠. This is the family of all solution curves.
    Section 9.4.3: the general solution. Lesson: Exercise 9.5 player
  8. Use the origin: C=1C = 1

    Putting x=0x = 0⁠, y=0y = 0 in (3): 0=0−1+C⋅e0=−1+C0 = 0 - 1 + C\cdot e^0 = -1 + C⁠, so C=1C = 1⁠. The curve is

    y=ex−x−1,that isx+y+1=ex.\begin{aligned} &y = e^x - x - 1, \\ &\text{that is}\quad x + y + 1 = e^x. \end{aligned}
    e0=1e^0 = 1⁠. The point (0,0)(0, 0) picks one member of the family (3).
    Section 9.3: a particular solution. Lesson: general and particular solutions
  9. Check by substituting back, and see the curve

    From y=ex−x−1y = e^x - x - 1⁠: dydx=ex−1\frac{dy}{dx} = e^x - 1⁠, and x+y=x+ex−x−1=ex−1x + y = x + e^x - x - 1 = e^x - 1⁠. So dydx=x+y\frac{dy}{dx} = x + y at every point. At x=0x = 0⁠: y=1−0−1=0y = 1 - 0 - 1 = 0⁠.

    X Y X′ Y′ (0, 0) y = −x − 1
    Slope field of dydx=x+y\frac{dy}{dx} = x + y⁠, with equal scales, and the curve y=ex−x−1y = e^x - x - 1 through the origin. It touches the xx-axis there (slope 0+0=00 + 0 = 0⁠) and lies above it elsewhere. The dashed line y=−x−1y = -x - 1 is the member C=0C = 0 of the family.
    Both sides equal ex−1e^x - 1⁠, so the curve has the required slope everywhere, and it passes through the origin. The line y=−x−1y = -x - 1 is also a solution (its slope −1-1 equals x+yx + y on it), but it misses the origin.
    A solution makes L.H.S. = R.H.S. (Section 9.3). Basics: a rule for slopes
Result

The general solution is y=−x−1+Cexy = -x - 1 + Ce^x⁠, and the curve through the origin is y=ex−x−1y = e^x - x - 1⁠, that is x+y+1=exx + y + 1 = e^x⁠. (Textbook answer: x+y+1=exx + y + 1 = e^x⁠.)

Check it with numbers

Take x=1x = 1⁠: y=e−2≈0.7182818y = e - 2 \approx 0.7182818⁠. The rule says the slope is x+y≈1.7182818x + y \approx 1.7182818⁠.

The curve itself: y(1.001)≈0.7200014699y(1.001) \approx 0.7200014699 and y(0.999)≈0.7165649053y(0.999) \approx 0.7165649053⁠. They differ by 0.00343656460.0034365646⁠, so

0.00343656460.002≈1.71828.\frac{0.0034365646}{0.002} \approx 1.71828.
Common mistakes
  1. Taking P=1P = 1⁠. The equation is dydx−y=x\frac{dy}{dx} - y = x⁠, so P=−1P = -1 and the I.F. is e−xe^{-x}⁠, not exe^{x}⁠.
  2. Sign slips in the by-parts step: ∫e−x dx=−e−x\int e^{-x}\,dx = -e^{-x}⁠, so ∫x e−x dx=−x e−x−e−x\int x\,e^{-x}\,dx = -x\,e^{-x} - e^{-x}⁠.
  3. Using the point before solving. Find the general solution with CC first; then put (0,0)(0, 0) in.
  4. Writing CC instead of CexCe^x after multiplying by exe^x⁠.
What to take away
  1. "Slope of the tangent" means dydx\frac{dy}{dx}⁠; a slope rule in xx and yy is a differential equation.
  2. P=kP = k (a constant) gives I.F. ekxe^{kx}⁠.
  3. ∫x e−x dx=−(x+1)e−x\int x\,e^{-x}\,dx = -(x + 1)e^{-x}⁠: by parts with xx first.

Every fact used, and where it comes from

FactUsed inSource
Slope of the tangent =dydx= \frac{dy}{dx}Step 1Section 9.4.1, Example 8 (Basics)
Linear equation; I.F. =e∫P dx= e^{\int P\,dx}⁠; y (I.F.)=∫(Q×I.F.) dx+Cy\,(\text{I.F.}) = \int(Q\times\text{I.F.})\,dx + CSteps 2, 3, 5Section 9.4.3, steps (i) to (iii) (Lesson)
Order and degreeStep 2Sections 9.2.1 and 9.2.2 (Lesson)
Product and chain rules; ddxe−x=−e−x\frac{d}{dx}e^{-x} = -e^{-x}Steps 4, 6Chapter 5, Sections 5.3, 5.3.1 and 5.4 (Basics)
Integration by parts; ∫e−x dx=−e−x\int e^{-x}\,dx = -e^{-x}Step 6Section 7.6; Section 7.2, formula (xi) with Section 7.3.1 (Basics)
Particular solution from a given point; e0=1e^0 = 1Step 8Section 9.3 (Lesson)
Substituting back into the equationStep 9Section 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 →