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

Exercise 9.4 · Q9: Homogeneous: y dx+xlog⁡yx dy−2x dy=0y\,dx + x\log\frac{y}{x}\,dy - 2x\,dy = 0

Exercise 9.4Homogeneous differential equations · Section 9.4.2
The question

In each of the Exercises 1 to 10, show that the given differential equation is homogeneous and solve each of them.

9. y dx+xlog⁡(yx)dy−2x dy=0y\,dx + x\log\left(\dfrac{y}{x}\right)dy - 2x\,dy = 0

Exam answer

For x≠0x \ne 0⁠, yx>0\frac{y}{x} > 0 and log⁡yx≠2\log\frac{y}{x} \ne 2⁠, the equation can be written as

dydx=y2x−xlog⁡yx=F(x,y)\frac{dy}{dx} = \frac{y}{2x - x\log\frac{y}{x}} = F(x, y)

Replacing xx by λx\lambda x and yy by λy\lambda y leaves yx\frac{y}{x} unchanged, so

F(λx,λy)=λyλ(2x−xlog⁡yx)=λ0⋅F(x,y)\begin{aligned} F(\lambda x, \lambda y) &= \frac{\lambda y}{\lambda\left(2x - x\log\frac{y}{x}\right)} \\ &= \lambda^0\cdot F(x, y) \end{aligned}

So FF is homogeneous of degree zero, and the equation is homogeneous.

Put y=vxy = vx⁠. Then dydx=v+xdvdx\frac{dy}{dx} = v + x\frac{dv}{dx}⁠.

v+xdvdx=v2−log⁡vxdvdx=v2−log⁡v−v=v(log⁡v−1)2−log⁡v\begin{aligned} v + x\frac{dv}{dx} &= \frac{v}{2 - \log v} \\ x\frac{dv}{dx} &= \frac{v}{2 - \log v} - v \\ &= \frac{v(\log v - 1)}{2 - \log v} \end{aligned}

Separating the variables,

2−log⁡vv(log⁡v−1) dv=dxx\frac{2 - \log v}{v(\log v - 1)}\,dv = \frac{dx}{x}

Put log⁡v=t\log v = t⁠. Then dvv=dt\frac{dv}{v} = dt⁠.

2−tt−1 dt=dxx\frac{2 - t}{t - 1}\,dt = \frac{dx}{x}

Writing 2−tt−1=−1+1t−1\frac{2 - t}{t - 1} = -1 + \frac{1}{t - 1} and integrating both sides,

log⁡∣t−1∣−t=log⁡∣x∣+log⁡∣C∣log⁡∣t−1∣=t+log⁡∣Cx∣\begin{aligned} \log|t - 1| - t &= \log|x| + \log|C| \\ \log|t - 1| &= t + \log|Cx| \end{aligned}

Putting t=log⁡vt = \log v⁠,

log⁡∣log⁡v−1∣=log⁡v+log⁡∣Cx∣=log⁡∣Cxv∣=log⁡∣Cy∣\begin{aligned} &\log|\log v - 1| \\ &= \log v + \log|Cx| \\ &= \log|Cxv| = \log|Cy| \end{aligned}

So log⁡v−1=Cy\log v - 1 = Cy (the sign goes into CC⁠). Putting v=yxv = \frac{y}{x}⁠,

∴\therefore Cy=log⁡(yx)−1Cy = \log\left(\dfrac{y}{x}\right) - 1 is the general solution.

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

The one idea this problem is built on

Collect the dydy terms: x(log⁡yx−2)dy=−y dxx\left(\log\frac{y}{x} - 2\right)dy = -y\,dx⁠. Both coefficients have degree 1 outside the log, and the log depends only on yx\frac{y}{x}⁠, so the equation is homogeneous. After y=vxy = vx the vv-integral contains log⁡v\log v and dvv\frac{dv}{v}⁠, which calls for a second substitution, t=log⁡vt = \log v⁠.

Given, to find, and the plan
Given
y dx+xlog⁡yx dy−2x dy=0y\,dx + x\log\frac{y}{x}\,dy - 2x\,dy = 0⁠, with x≠0x \ne 0 and yx>0\frac{y}{x} > 0 (so that the log is defined).
To show and find
That the equation is homogeneous; then its general solution.
Plan
(1) Write it as dydx=F(x,y)\frac{dy}{dx} = F(x, y)⁠. (2) Show F(λx,λy)=F(x,y)F(\lambda x, \lambda y) = F(x, y)⁠. (3) Put y=vxy = vx⁠. (4) Simplify. (5) Separate, noting what is set aside. (6) Put t=log⁡vt = \log v and integrate. (7) Put v=yxv = \frac{y}{x} back. (8) Check.

Basics you need

1Homogeneous functions and equations

F(x,y)F(x, y) is homogeneous of degree nn if F(λx,λy)=λnF(x,y)F(\lambda x, \lambda y) = \lambda^nF(x, y) for every nonzero λ\lambda⁠. The equation dydx=F(x,y)\frac{dy}{dx} = F(x, y) is homogeneous when FF has degree zero (Section 9.4.2). Basics: scale x and y together

2The substitution y=vxy = vx

By the product rule dydx=v+xdvdx\frac{dy}{dx} = v + x\frac{dv}{dx}⁠; the equation becomes xdvdx=g(v)−vx\frac{dv}{dx} = g(v) - v⁠, which separates (Section 9.4.2). Lesson: homogeneous equations, put y = vx

3Substitution in an integral

With t=log⁡vt = \log v⁠, dt=dvvdt = \frac{dv}{v}⁠, so (…) dvv\frac{(\ldots)\,dv}{v} becomes (…) dt(\ldots)\,dt (Section 7.3.1). Then ∫dtt−1=log⁡∣t−1∣+C\int\frac{dt}{t - 1} = \log|t - 1| + C⁠. Basics: every method ends with an integral

4Log rules

log⁡a+log⁡b=log⁡ab\log a + \log b = \log ab⁠; log⁡∣A∣=log⁡∣B∣\log|A| = \log|B| means A=±BA = \pm B⁠. Basics: e and log

Solution

  1. Write the equation as dydx=F(x,y)\frac{dy}{dx} = F(x, y)

    Collect the dydy terms, x(2−log⁡yx)dy=y dxx\left(2 - \log\frac{y}{x}\right)dy = y\,dx⁠, and divide:

    dydx=y2x−xlog⁡yx=F(x,y).…(1)\frac{dy}{dx} = \frac{y}{2x - x\log\frac{y}{x}} = F(x, y).\quad\ldots(1)
    The log needs yx>0\frac{y}{x} > 0 (and so x≠0x \ne 0⁠, y≠0y \ne 0⁠). Dividing by 2−log⁡yx2 - \log\frac{y}{x} loses no solution: where log⁡yx=2\log\frac{y}{x} = 2⁠, that is on the line y=e2xy = e^2x⁠, the given equation reads y dx=0y\,dx = 0 with y≠0y \ne 0⁠, which forces dx=0dx = 0⁠, a vertical tangent. So no solution y(x)y(x) with a finite slope passes through such a point.
    Section 9.4.2: a homogeneous equation has the form dydx=F(x,y)\frac{dy}{dx} = F(x, y)⁠. Lesson: homogeneous equations
  2. Show that it is homogeneous: F(λx,λy)=F(x,y)F(\lambda x, \lambda y) = F(x, y)

    For any λ≠0\lambda \ne 0⁠, λyλx=yx\frac{\lambda y}{\lambda x} = \frac{y}{x}⁠, so the log does not change:

    F(λx,λy)=λy2λx−λxlog⁡yx=λyλ(2x−xlog⁡yx)=λ0⋅F(x,y).\begin{aligned} F(\lambda x, \lambda y) &= \frac{\lambda y}{2\lambda x - \lambda x\log\frac{y}{x}} \\ &= \frac{\lambda y}{\lambda\left(2x - x\log\frac{y}{x}\right)} \\ &= \lambda^0\cdot F(x, y). \end{aligned}

    So FF is homogeneous of degree zero, and (1) is a homogeneous differential equation.

    Top and bottom each pick up one factor λ\lambda⁠. Dividing top and bottom by xx⁠: F=y/x2−log⁡(y/x)F = \frac{y/x}{2 - \log(y/x)}⁠, a function of yx\frac{y}{x} alone.
    Section 9.4.2: definition of a homogeneous function of degree nn⁠. Basics: scale x and y together
  3. Substitute y=vxy = vx

    Put y=vxy = vx (v>0v > 0⁠). Then dydx=v+xdvdx\frac{dy}{dx} = v + x\frac{dv}{dx}⁠, and (1) becomes

    v+xdvdx=vx2x−xlog⁡v=v2−log⁡v.v + x\frac{dv}{dx} = \frac{vx}{2x - x\log v} = \frac{v}{2 - \log v}.
    Cancel x≠0x \ne 0⁠: the right side is a function of vv only.
    Section 9.4.2, equations (2) and (3). Lesson: put y = vx
  4. Simplify to xdvdx=…x\frac{dv}{dx} = \ldots

    xdvdx=v2−log⁡v−v=v−v(2−log⁡v)2−log⁡v=v−2v+vlog⁡v2−log⁡v=v(log⁡v−1)2−log⁡v.\begin{aligned} x\frac{dv}{dx} &= \frac{v}{2 - \log v} - v \\ &= \frac{v - v(2 - \log v)}{2 - \log v} \\ &= \frac{v - 2v + v\log v}{2 - \log v} \\ &= \frac{v(\log v - 1)}{2 - \log v}. \end{aligned}
    Subtract vv over the common denominator 2−log⁡v2 - \log v⁠, then take out the factor vv⁠.
    Section 9.4.2, equation (4). Lesson: homogeneous equations
  5. Separate vv and xx⁠, and see what is set aside

    2−log⁡vv(log⁡v−1) dv=dxx.\frac{2 - \log v}{v(\log v - 1)}\,dv = \frac{dx}{x}.
    Dividing by v(log⁡v−1)v(\log v - 1) needs log⁡v≠1\log v \ne 1 (v>0v > 0 already). The excluded constant v=ev = e makes v(log⁡v−1)=0v(\log v - 1) = 0⁠, so the line y=exy = ex is a solution. (Check in the given equation: dy=e dxdy = e\,dx and log⁡yx=1\log\frac{y}{x} = 1⁠, so ex dx+x⋅e dx−2x⋅e dx=0ex\,dx + x\cdot e\,dx - 2x\cdot e\,dx = 0⁠.) Step 7 shows it comes back with C=0C = 0⁠.
    Section 9.4.2, equation (5); separating as in Section 9.4.1, which needs the divisor to be nonzero, so its zeros are checked separately. Basics: dy = y′ dx
  6. Put t=log⁡vt = \log v and integrate

    With t=log⁡vt = \log v⁠, dt=dvvdt = \frac{dv}{v}⁠, the left side becomes 2−tt−1 dt\frac{2 - t}{t - 1}\,dt⁠. Divide first:

    2−tt−1=−(t−1)+1t−1=−1+1t−1.\frac{2 - t}{t - 1} = \frac{-(t - 1) + 1}{t - 1} = -1 + \frac{1}{t - 1}.

    Integrating both sides, with the constant written as log⁡∣C∣\log|C| (C≠0C \ne 0⁠):

    log⁡∣t−1∣−t=log⁡∣x∣+log⁡∣C∣.…(2)\begin{aligned} &\log|t - 1| - t \\ &= \log|x| + \log|C|.\quad\ldots(2) \end{aligned}

    Check by differentiating the left side with respect to tt⁠: 1t−1−1=2−tt−1\frac{1}{t - 1} - 1 = \frac{2 - t}{t - 1}⁠, the integrand.

    The substitution t=log⁡vt = \log v is allowed because v>0v > 0⁠, and dvv\frac{dv}{v} is exactly the factor 1v\frac1v already present. Top and bottom have the same degree in tt⁠, so we divide before integrating.
    Integration by substitution, Section 7.3.1; Section 7.2, formula (xii). Basics: every method ends with an integral
  7. Put t=log⁡vt = \log v and v=yxv = \frac{y}{x} back

    Move tt across and combine the logs: log⁡∣t−1∣=t+log⁡∣Cx∣\log|t - 1| = t + \log|Cx|⁠. With t=log⁡vt = \log v⁠:

    log⁡∣log⁡v−1∣=log⁡v+log⁡∣Cx∣=log⁡∣Cxv∣=log⁡∣Cy∣.\begin{aligned} \log|\log v - 1| &= \log v + \log|Cx| \\ &= \log|Cxv| = \log|Cy|. \end{aligned}

    So log⁡v−1=±Cy\log v - 1 = \pm Cy⁠; naming the constant CC again and putting v=yxv = \frac{y}{x}⁠:

    Cy=log⁡(yx)−1.Cy = \log\left(\frac{y}{x}\right) - 1.
    xv=yxv = y⁠. So far C≠0C \ne 0⁠; the value C=0C = 0 gives log⁡yx=1\log\frac{y}{x} = 1⁠, the line y=exy = ex set aside in Step 5. So with CC any real number, nothing is lost. The answer holds for x≠0x \ne 0⁠, yx>0\frac{y}{x} > 0⁠. (The book's key writes cy=log⁡∣yx∣−1cy = \log\left|\frac{y}{x}\right| - 1⁠; since yx>0\frac{y}{x} > 0 wherever the equation is defined, the bars change nothing.)
    log⁡a+log⁡b=log⁡ab\log a + \log b = \log ab⁠; log⁡∣A∣=log⁡∣B∣⇒A=±B\log|A| = \log|B| \Rightarrow A = \pm B⁠. Basics: one constant for order 1
  8. Check: differentiate the answer back

    For C≠0C \ne 0 write the answer as log⁡y−log⁡x−1=Cy\log y - \log x - 1 = Cy (on x,y>0x, y > 0⁠; the case x,y<0x, y < 0 is the same with log⁡(−y)−log⁡(−x)\log(-y) - \log(-x)⁠). Differentiating with respect to xx⁠:

    y′y−1x=Cy′.\frac{y'}{y} - \frac1x = Cy'.

    Put C=log⁡(y/x)−1yC = \frac{\log(y/x) - 1}{y} and multiply by xyxy⁠:

    xy′−y=x(log⁡yx−1)y′,(2x−xlog⁡yx)y′=y,\begin{aligned} xy' - y &= x\left(\log\frac{y}{x} - 1\right)y', \\ \left(2x - x\log\frac{y}{x}\right)y' &= y, \end{aligned}

    which is y dx+xlog⁡yx dy−2x dy=0y\,dx + x\log\frac{y}{x}\,dy - 2x\,dy = 0⁠.

    We recover the equation for every C≠0C \ne 0⁠, and C=0C = 0 was checked in Step 5, so the relation is the general solution.
    Implicit differentiation (Chapter 5); ddxlog⁡∣u∣=u′u\frac{d}{dx}\log|u| = \frac{u'}{u} (Section 7.2, formula (xii), with the chain rule). Basics: a rule for slopes
Result

The equation is homogeneous, since F(λx,λy)=λ0F(x,y)F(\lambda x, \lambda y) = \lambda^0F(x, y)⁠. Its general solution is Cy=log⁡(yx)−1Cy = \log\left(\frac{y}{x}\right) - 1⁠, where CC is an arbitrary constant (x≠0x \ne 0⁠, yx>0\frac{y}{x} > 0⁠); C=0C = 0 gives the solution y=exy = ex⁠. (Textbook answer: cy=log⁡∣yx∣−1cy = \log\left|\frac{y}{x}\right| - 1⁠, the same, since yx>0\frac{y}{x} > 0⁠.)

Check it with numbers

Take the curve through (1,1)(1, 1)⁠: C⋅1=log⁡1−1C\cdot1 = \log 1 - 1⁠, so C=−1C = -1⁠, and log⁡yx=1−y\log\frac{y}{x} = 1 - y⁠, that is x=yey−1x = ye^{y - 1}⁠. At y=2y = 2⁠: x=2e≈5.436564x = 2e \approx 5.436564⁠, yx=1e\frac{y}{x} = \frac1e⁠, log⁡yx=−1\log\frac{y}{x} = -1⁠, and Cy=−2=−1−1Cy = -2 = -1 - 1⁠: both sides agree.

Slope from the equation: y2x−xlog⁡yx=23x≈216.309691≈0.122626\frac{y}{2x - x\log\frac{y}{x}} = \frac{2}{3x} \approx \frac{2}{16.309691} \approx 0.122626⁠. Slope of the curve: dxdy=ey−1(1+y)=3e\frac{dx}{dy} = e^{y - 1}(1 + y) = 3e⁠, so dydx=13e≈0.122626\frac{dy}{dx} = \frac{1}{3e} \approx 0.122626⁠. They agree.

Common mistakes
  1. Getting FF upside down: x(2−log⁡yx)dy=y dxx\left(2 - \log\frac{y}{x}\right)dy = y\,dx gives dydx=yx(2−log⁡(y/x))\frac{dy}{dx} = \frac{y}{x(2 - \log(y/x))}⁠.
  2. Trying to integrate 2−log⁡vv(log⁡v−1)\frac{2 - \log v}{v(\log v - 1)} directly. The factor 1v\frac1v is the signal for t=log⁡vt = \log v⁠.
  3. Requiring C≠0C \ne 0 and so losing the solution y=exy = ex⁠.
What to take away
  1. A log of yx\frac{y}{x} has degree zero; count the degree of everything else.
  2. After y=vxy = vx⁠, a second substitution (here t=log⁡vt = \log v⁠) is often what makes the vv-integral easy.
  3. Check the zeros of g(v)−vg(v) - v⁠: here v=ev = e gives the solution y=exy = ex⁠, and C=0C = 0 brings it back.

Every fact used, and where it comes from

FactUsed inSource
Homogeneous function of degree nn⁠; homogeneous equation when FF has degree zeroSteps 1, 2Section 9.4.2 (Basics)
y=vxy = vx⁠, dydx=v+xdvdx\frac{dy}{dx} = v + x\frac{dv}{dx}⁠; xdvdx=g(v)−vx\frac{dv}{dx} = g(v) - v⁠; separate and integrateSteps 3, 4, 5, 6Section 9.4.2, equations (1) to (6) (Lesson)
A solution set aside by a division is checked separatelySteps 5, 7Section 9.4.1 (separating needs h(y)≠0h(y) \ne 0⁠); Section 9.3, what a solution is (Lesson)
Integration by substitution, t=log⁡vt = \log vStep 6Section 7.3.1 (Basics)
∫dxx=log⁡∣x∣+C\int\frac{dx}{x} = \log|x| + CStep 6Section 7.2, formula (xii)
log⁡a+log⁡b=log⁡ab\log a + \log b = \log abStep 7Chapter 5, Section 5.4 (Basics)
Implicit differentiation; ddxlog⁡∣u∣=u′u\frac{d}{dx}\log|u| = \frac{u'}{u}Step 8Chapter 5, Sections 5.3.1 and 5.3.2; Section 7.2, formula (xii) (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 →