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

Example 18: Curve through (0,1)(0, 1) with slope x+xyx + xy

ExamplesLinear differential equations, a curve from its slope · Section 9.4.3
The question

Find the equation of a curve passing through the point (0,1)(0, 1)⁠. If the slope of the tangent to the curve at any point (x,y)(x, y) is equal to the sum of the xx coordinate (abscissa) and the product of the xx coordinate and yy coordinate (ordinate) of that point.

Exam answer

The slope of the tangent is dydx\frac{dy}{dx}⁠, so

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

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

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

So the solution is given by

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

Put −x22=t-\frac{x^2}{2} = t⁠. Then −x dx=dt-x\,dx = dt⁠, so x dx=−dtx\,dx = -dt⁠.

∫x e−x22 dx=−∫et dt=−et=−e−x22\begin{aligned} \int x\,e^{-\frac{x^2}{2}}\,dx &= -\int e^t\,dt \\ &= -e^t = -e^{-\frac{x^2}{2}} \end{aligned}

Putting this in (i),

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

Putting x=0x = 0⁠, y=1y = 1 in (ii): 1=−1+C⋅e01 = -1 + C\cdot e^0⁠, so C=2C = 2⁠.

∴\therefore The required curve is y=−1+2ex22y = -1 + 2e^{\dfrac{x^2}{2}}⁠.

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: "slope of the tangent" is dydx\frac{dy}{dx}⁠, and "the sum of xx and the product xyxy" is x+xyx + xy⁠. The equation dydx−xy=x\frac{dy}{dx} - xy = x is linear with P=−xP = -x⁠, so the integrating factor is e−x2/2e^{-x^2/2}⁠. Solving gives a family of curves; the point (0,1)(0, 1) 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+xyx + xy⁠; the curve passes through (0,1)(0, 1)⁠.
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 substitution. (7) Solve for yy⁠. (8) Use the point. (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

3Substitution

With t=−x22t = -\frac{x^2}{2}⁠, dt=−x dxdt = -x\,dx⁠, so ∫x e−x2/2 dx=−∫et dt\int x\,e^{-x^2/2}\,dx = -\int e^t\,dt (Section 7.3.1). Basics: every method ends with an integral

4Exponentials

e0=1e^0 = 1⁠; ea⋅e−a=1e^{a}\cdot e^{-a} = 1⁠; ∫et dt=et\int e^t\,dt = e^t⁠. Basics: exponentials

Solution

  1. Write the slope condition as an equation

    dydx=x+xy.\frac{dy}{dx} = x + xy.
    "The slope of the tangent at (x,y)(x, y)" is dydx\frac{dy}{dx}⁠; "the sum of the xx coordinate and the product of the xx and yy coordinates" is x+xyx + xy⁠.
    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=−xP = -x⁠, Q=xQ = x

    dydx−xy=x.…(1)\frac{dy}{dx} - xy = x.\quad\ldots(1)
    Move xyxy to the left. Compared with dydx+Py=Q\frac{dy}{dx} + Py = Q⁠: P=−xP = -x (keep the minus sign) and Q=xQ = x⁠, both functions of xx only. (The equation is also separable, dydx=x(1+y)\frac{dy}{dx} = x(1 + y)⁠; the linear method is the one this section teaches, and both give the same answer, see Step 9.)
    Section 9.4.3, step (i). Lesson: linear equations
  3. The integrating factor

    I.F.=e∫−x dx=e−x22.\text{I.F.} = e^{\int -x\,dx} = e^{-\frac{x^2}{2}}.
    ∫−x dx=−x22\int -x\,dx = -\frac{x^2}{2}⁠; one antiderivative is enough, as any added constant would only multiply the I.F. by a nonzero constant.
    Section 9.4.3, step (ii). Basics: (y · g)′ = g(y′ + Py)
  4. Multiply by the I.F.: the left side is one derivative

    e−x22dydx−x e−x22y=x e−x22ddx(y e−x22)=x e−x22.\begin{aligned} e^{-\frac{x^2}{2}}\frac{dy}{dx} - x\,e^{-\frac{x^2}{2}}y &= x\,e^{-\frac{x^2}{2}} \\ \frac{d}{dx}\left(y\,e^{-\frac{x^2}{2}}\right) &= x\,e^{-\frac{x^2}{2}}. \end{aligned}
    By the chain rule ddxe−x2/2=−x e−x2/2\frac{d}{dx}e^{-x^2/2} = -x\,e^{-x^2/2}⁠, so the product rule gives ddx(y e−x2/2)=e−x2/2dydx−x e−x2/2y\frac{d}{dx}\left(y\,e^{-x^2/2}\right) = e^{-x^2/2}\frac{dy}{dx} - x\,e^{-x^2/2}y⁠, 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−x22=∫x e−x22 dx+C.…(2)y\,e^{-\frac{x^2}{2}} = \int x\,e^{-\frac{x^2}{2}}\,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 here 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 substitution

    Let I=∫x e−x22 dxI = \int x\,e^{-\frac{x^2}{2}}\,dx⁠. Put −x22=t-\frac{x^2}{2} = t⁠; then −x dx=dt-x\,dx = dt⁠, so x dx=−dtx\,dx = -dt⁠:

    I=−∫et dt=−et=−e−x22.I = -\int e^t\,dt = -e^t = -e^{-\frac{x^2}{2}}.
    The factor xx in front is, up to the sign, the derivative of the exponent −x22-\frac{x^2}{2}⁠. That is what makes the substitution work.
    Section 7.3.1, substitution; Section 7.2, formula (xi). Basics: every method ends with an integral
  7. Solve for yy⁠: the family of curves

    y e−x22=−e−x22+Cy=−1+Cex22.…(3)\begin{aligned} y\,e^{-\frac{x^2}{2}} &= -e^{-\frac{x^2}{2}} + C \\ y &= -1 + Ce^{\frac{x^2}{2}}.\quad\ldots(3) \end{aligned}
    Multiply both sides by ex2/2e^{x^2/2}⁠, using e−x2/2⋅ex2/2=1e^{-x^2/2}\cdot e^{x^2/2} = 1⁠. Equation (3) is a whole family of curves, one for each CC⁠; it holds for every real xx⁠.
    Section 9.4.3: the general solution. Lesson: Examples 14 to 18
  8. Use the point (0,1)(0, 1)

    1=−1+C⋅e0  ⇒  C=2,1 = -1 + C\cdot e^0 \;\Rightarrow\; C = 2,

    so the required curve is

    y=−1+2ex22.y = -1 + 2e^{\frac{x^2}{2}}.
    The curve passes through (0,1)(0, 1)⁠, so x=0x = 0⁠, y=1y = 1 must satisfy (3); e0=1e^0 = 1⁠. Only C=2C = 2 works.
    Section 9.3: a particular solution. Lesson: general and particular solutions
  9. Check by substituting back, and see the curve

    From y=−1+2ex22y = -1 + 2e^{\frac{x^2}{2}}⁠: dydx=2x ex22\frac{dy}{dx} = 2x\,e^{\frac{x^2}{2}}⁠, and

    x+xy=x+x(−1+2ex22)=2x ex22,x + xy = x + x\left(-1 + 2e^{\frac{x^2}{2}}\right) = 2x\,e^{\frac{x^2}{2}},

    the same. At x=0x = 0⁠: y=−1+2=1y = -1 + 2 = 1⁠. By separating instead, dy1+y=x dx\frac{dy}{1 + y} = x\,dx gives log⁡∣1+y∣=x22+c\log|1 + y| = \frac{x^2}{2} + c⁠, that is 1+y=±ecex2/21 + y = \pm e^c e^{x^2/2}⁠: the same family (3). (That route divides by 1+y1 + y⁠, so it sets aside the line y=−1y = -1⁠; in (3) that line is the member C=0C = 0⁠.)

    X Y X′ Y′ (0, 1) y = −1 O
    Slope field of dydx=x+xy\frac{dy}{dx} = x + xy⁠, with equal scales, and the required curve y=−1+2ex22y = -1 + 2e^{\frac{x^2}{2}} through (0,1)(0, 1)⁠. The dashed line y=−1y = -1 is the member C=0C = 0 of the family; every other member moves away from it as ∣x∣|x| grows.
    The slope rule is satisfied at every point and the curve passes through (0,1)(0, 1)⁠, so it is the required curve. The slope x(1+y)x(1 + y) is zero on the yy-axis, which is why the curve has its lowest point at (0,1)(0, 1)⁠.
    A solution makes L.H.S. = R.H.S. (Section 9.3); variables separable (Section 9.4.1). Basics: a rule for slopes
Result

The curves with this slope are y=−1+Cex22y = -1 + Ce^{\frac{x^2}{2}}⁠; the one through (0,1)(0, 1) has C=2C = 2⁠, so the required curve is y=−1+2ex22y = -1 + 2e^{\frac{x^2}{2}}⁠, for all real xx⁠. (Textbook answer: y=−1+2ex22y = -1 + 2e^{\frac{x^2}{2}}⁠.)

Check it with numbers

Take x=1x = 1⁠: e0.5≈1.6487213e^{0.5} \approx 1.6487213⁠, so y≈2.2974425y \approx 2.2974425⁠, and the slope rule gives x+xy≈1+2.2974425=3.2974425x + xy \approx 1 + 2.2974425 = 3.2974425⁠.

The curve itself: y(1.001)≈2.3007432836y(1.001) \approx 2.3007432836 and y(0.999)≈2.2941483941y(0.999) \approx 2.2941483941⁠, so

2.3007432836−2.29414839410.002≈3.29744.\begin{aligned} &\frac{2.3007432836 - 2.2941483941}{0.002} \\ &\approx 3.29744. \end{aligned}
Common mistakes
  1. Taking P=xP = x⁠. The form is dydx+Py=Q\frac{dy}{dx} + Py = Q⁠; dydx−xy=x\frac{dy}{dx} - xy = x has P=−xP = -x⁠, so the I.F. is e−x2/2e^{-x^2/2}⁠.
  2. Losing the sign in the substitution: x dx=−dtx\,dx = -dt⁠, so the integral is −e−x2/2-e^{-x^2/2}⁠.
  3. Multiplying only one term by ex2/2e^{x^2/2}⁠: CC becomes Cex2/2Ce^{x^2/2}⁠.
  4. Putting the point in before solving for yy correctly; substitute into the final family (3).
What to take away
  1. Turn the words into dydx=…\frac{dy}{dx} = \ldots first; then decide the method.
  2. P=−xP = -x gives I.F. e−x2/2e^{-x^2/2}⁠, and ∫x e−x2/2 dx\int x\,e^{-x^2/2}\,dx is a substitution.
  3. Some equations are both linear and separable; both methods must give the same family.

Every fact used, and where it comes from

FactUsed inSource
Slope of the tangent is 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)
Product rule; chain rule for e−x2/2e^{-x^2/2}Step 4Chapter 5, Sections 5.3 and 5.3.1 (Basics)
Substitution; ∫et dt=et+C\int e^t\,dt = e^t + CStep 6Section 7.3.1; Section 7.2, formula (xi) (Basics)
Particular solution from a pointStep 8Section 9.3 (Lesson)
Substituting back; separating the variablesStep 9Sections 9.3 and 9.4.1 (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 →