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

Exercise 9.5 · Q3: Linear: dydx+yx=x2\frac{dy}{dx} + \frac{y}{x} = x^2

Exercise 9.5Linear differential equations · Section 9.4.3
The question

For each of the differential equations given in Exercises 1 to 12, find the general solution:

3. dydx+yx=x2\dfrac{dy}{dx} + \dfrac{y}{x} = x^2

Exam answer

This is of the form dydx+Py=Q\frac{dy}{dx} + Py = Q⁠, where P=1xP = \frac{1}{x} and Q=x2Q = x^2 (x≠0)(x \ne 0)⁠.

I.F.=e∫1xdx=elog⁡x=x\text{I.F.} = e^{\int\frac{1}{x}dx} = e^{\log x} = x

So the solution is given by

y⋅x=∫x2⋅x dx+C=∫x3 dx+C\begin{aligned} y\cdot x &= \int x^2\cdot x\,dx + C \\ &= \int x^3\,dx + C \end{aligned}

∴\therefore xy=x44+Cxy = \dfrac{x^4}{4} + C is the general solution.

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

The one idea this problem is built on

The equation is already in the standard linear form, with P=1xP = \frac{1}{x}⁠. Its integrating factor is e∫dxx=xe^{\int\frac{dx}{x}} = x (up to sign), and multiplying by xx turns the left side into ddx(xy)\frac{d}{dx}(xy)⁠, by the product rule. So xyxy is just an antiderivative of x3x^3⁠.

Given, to find, and the plan
Given
dydx+yx=x2\frac{dy}{dx} + \frac{y}{x} = x^2⁠; the term yx\frac{y}{x} needs x≠0x \ne 0⁠.
To find
The general solution (one arbitrary constant).
Plan
(1) Read off PP and QQ⁠. (2) I.F. =e∫P dx= e^{\int P\,dx}⁠, with care over log⁡∣x∣\log|x|⁠. (3) Multiply and see the product rule. (4) Integrate, with one constant. (5) Solve for yy⁠. (6) Check by substitution.

Basics you need

1First order linear equations

dydx+Py=Q\frac{dy}{dx} + Py = Q⁠, where PP and QQ are constants or functions of xx only. Its solution is y (I.F.)=∫(Q×I.F.) dx+Cy\,(\text{I.F.}) = \int(Q\times\text{I.F.})\,dx + C⁠, where I.F.=e∫P dx\text{I.F.} = e^{\int P\,dx} (Section 9.4.3). Lesson: linear equations, the integrating factor

2Logs and exponentials

∫dxx=log⁡∣x∣\int\frac{dx}{x} = \log|x| (Section 7.2, formula (xii)), and elog⁡t=te^{\log t} = t for t>0t > 0⁠. Basics: exponentials

3A constant multiple of an I.F. is an I.F.

If gg is an integrating factor, so is kgkg for any constant k≠0k \ne 0⁠: the kk cancels from both sides. Basics: (y · g)′ = g(y′ + Py)

4Power rule

∫x3 dx=x44+C\int x^3\,dx = \frac{x^4}{4} + C (Section 7.2, formula (i)). Basics: every method ends with an integral

Solution

  1. Recognise the linear form: P=1xP = \frac{1}{x}⁠, Q=x2Q = x^2

    dydx+1x y=x2.\frac{dy}{dx} + \frac{1}{x}\,y = x^2.
    The coefficient of dydx\frac{dy}{dx} is 1, yy appears to the first power, and P=1xP = \frac{1}{x}⁠, Q=x2Q = x^2 depend on xx only. Because of 1x\frac{1}{x}⁠, we work on an interval with x≠0x \ne 0⁠: either x>0x > 0 or x<0x < 0⁠.
    Section 9.4.3, step (i). Lesson: linear equations
  2. The integrating factor: xx

    I.F.=e∫1x dx=elog⁡∣x∣=∣x∣.\text{I.F.} = e^{\int\frac{1}{x}\,dx} = e^{\log|x|} = |x|.

    We take I.F.=x\text{I.F.} = x⁠, as the book does.

    For x>0x > 0⁠, ∣x∣=x|x| = x⁠. For x<0x < 0⁠, ∣x∣=−x|x| = -x⁠, which is −1-1 times xx⁠; a nonzero constant multiple of an integrating factor is again one (the constant cancels from both sides). So xx works on both sides of 0. The book writes elog⁡x=xe^{\log x} = x⁠.
    Section 9.4.3, step (ii); Section 7.2, formula (xii). Basics: exponentials
  3. Multiply by xx⁠: the left side is one derivative

    xdydx+y=x3ddx(xy)=x3.\begin{aligned} x\frac{dy}{dx} + y &= x^3 \\ \frac{d}{dx}(xy) &= x^3. \end{aligned}
    By the product rule, ddx(xy)=xdydx+y⋅1\frac{d}{dx}(xy) = x\frac{dy}{dx} + y\cdot 1⁠, exactly the left side.
    Product rule (Chapter 5, Section 5.3). Basics: (y · g)′ = g(y′ + Py)
  4. Integrate both sides, with one constant

    y⋅x=∫x2⋅x dx+C=∫x3 dx+Cxy=x44+C.\begin{aligned} y\cdot x &= \int x^2\cdot x\,dx + C = \int x^3\,dx + C \\ xy &= \frac{x^4}{4} + C. \end{aligned}
    This is y (I.F.)=∫(Q×I.F.) dx+Cy\,(\text{I.F.}) = \int(Q\times\text{I.F.})\,dx + C⁠, with Q×I.F.=x2⋅x=x3Q\times\text{I.F.} = x^2\cdot x = x^3⁠. The CC is the one arbitrary constant.
    Section 9.4.3, step (iii); Section 7.2, formula (i). Basics: one constant for order 1
  5. Solve for yy (optional)

    y=x34+Cx(x≠0).y = \frac{x^3}{4} + \frac{C}{x}\quad(x \ne 0).
    Divide by x≠0x \ne 0⁠. The book leaves the answer as xy=x44+Cxy = \frac{x^4}{4} + C⁠; both say the same thing.
    Section 9.4.3: the general solution. Lesson: Exercise 9.5 player
  6. Check by substituting back

    From y=x34+Cxy = \frac{x^3}{4} + \frac{C}{x}⁠: dydx=3x24−Cx2\frac{dy}{dx} = \frac{3x^2}{4} - \frac{C}{x^2}⁠, and yx=x24+Cx2\frac{y}{x} = \frac{x^2}{4} + \frac{C}{x^2}⁠. Adding,

    dydx+yx=3x24+x24=x2,\frac{dy}{dx} + \frac{y}{x} = \frac{3x^2}{4} + \frac{x^2}{4} = x^2,

    for every CC⁠.

    The Cx2\frac{C}{x^2} terms cancel, and 34+14=1\frac{3}{4} + \frac{1}{4} = 1⁠. So the family satisfies the equation on x>0x > 0 and on x<0x < 0⁠.
    A solution makes L.H.S. = R.H.S. (Section 9.3). Lesson: general and particular solutions
Result

The general solution is xy=x44+Cxy = \frac{x^4}{4} + C⁠, that is y=x34+Cxy = \frac{x^3}{4} + \frac{C}{x}⁠, where CC is an arbitrary constant (x≠0x \ne 0⁠). (Textbook answer: xy=x44+Cxy = \frac{x^4}{4} + C⁠.)

Check it with numbers

Take C=1C = 1 and x=2x = 2⁠: y=2+12=2.5y = 2 + \frac12 = 2.5⁠. The equation says dydx=x2−yx=4−1.25=2.75\frac{dy}{dx} = x^2 - \frac{y}{x} = 4 - 1.25 = 2.75⁠.

The curve itself: y(2.001)≈2.5027516252y(2.001) \approx 2.5027516252 and y(1.999)≈2.4972516248y(1.999) \approx 2.4972516248⁠, so

2.5027516252−2.49725162480.002≈2.75000.\begin{aligned} &\frac{2.5027516252 - 2.4972516248}{0.002} \\ &\approx 2.75000. \end{aligned}
Common mistakes
  1. Taking the I.F. as exe^{x} or log⁡x\log x⁠; it is e∫P dx=elog⁡∣x∣=∣x∣e^{\int P\,dx} = e^{\log|x|} = |x|⁠, and xx may be used.
  2. Integrating QQ instead of Q×I.F.Q\times\text{I.F.}⁠: the integral is ∫x2⋅x dx\int x^2\cdot x\,dx⁠, not ∫x2 dx\int x^2\,dx⁠.
  3. Dividing only x44\frac{x^4}{4} by xx when solving for yy⁠: the answer is x34+Cx\frac{x^3}{4} + \frac{C}{x}⁠.
What to take away
  1. P=kxP = \frac{k}{x} gives the I.F. xkx^k (here k=1k = 1⁠).
  2. elog⁡∣x∣=∣x∣e^{\log|x|} = |x|⁠, and xx can replace ∣x∣|x| because a constant factor ±1\pm1 does not matter in an I.F.
  3. The general solution may be left in the form y (I.F.)=…+Cy\,(\text{I.F.}) = \ldots + C⁠.

Every fact used, and where it comes from

FactUsed inSource
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 1, 2, 4Section 9.4.3, steps (i) to (iii) (Lesson)
∫dxx=log⁡∣x∣\int\frac{dx}{x} = \log|x|⁠; elog⁡t=te^{\log t} = tStep 2Section 7.2, formula (xii); Chapter 5, Section 5.4 (Basics)
Product ruleStep 3Chapter 5, Section 5.3 (Basics)
∫xn dx=xn+1n+1+C\int x^n\,dx = \frac{x^{n+1}}{n+1} + CStep 4Section 7.2, formula (i) (Basics)
Substituting back into the equationStep 6Section 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 →