Skip to content
Worked Examples · Example 11

Q.Show that the differential equation xcos⁡(yx)dydx=ycos⁡(yx)+xx\cos\left(\frac{y}{x}\right)\frac{dy}{dx} = y\cos\left(\frac{y}{x}\right) + x is homogeneous and solve it.

CBSENCERTSubjective· 3mImportance★★★★★
26% · 58/222 Questions
✓ Free question

This is a homogeneous differential equation because it can be written in the form dydx=F(y/x)\frac{dy}{dx} = F(y/x). The substitution y=vxy = vx reduces it to a separable equation. The solution is sin⁡(yx)=log⁡∣x∣+C\sin\left(\frac{y}{x}\right) = \log|x| + C.


Why This Approach Works

A differential equation is homogeneous if every term in the numerator and denominator (when written as dydx=M(x,y)N(x,y)\frac{dy}{dx} = \frac{M(x,y)}{N(x,y)}) has the same total degree in xx and yy. The key property: such equations can be transformed by the substitution y=vxy = vx, where v=y/xv = y/x. This works because the function depends only on the ratio y/xy/x, not on xx and yy separately. The substitution turns the equation into one where variables separate cleanly — you get vv on one side and xx on the other, and then integrate.

Let’s see this in action.


Step-by-Step Solution

1. Rewrite the equation in standard form.

We start with:

xcos⁡(yx)dydx=ycos⁡(yx)+xx\cos\left(\frac{y}{x}\right)\frac{dy}{dx} = y\cos\left(\frac{y}{x}\right) + x

Divide both sides by xcos⁡(y/x)x\cos(y/x) (assuming x≠0x \neq 0 and cos⁡(y/x)≠0\cos(y/x) \neq 0 for now):

dydx=ycos⁡(y/x)+xxcos⁡(y/x)\frac{dy}{dx} = \frac{y\cos(y/x) + x}{x\cos(y/x)}

Split the fraction:

dydx=ycos⁡(y/x)xcos⁡(y/x)+xxcos⁡(y/x)\frac{dy}{dx} = \frac{y\cos(y/x)}{x\cos(y/x)} + \frac{x}{x\cos(y/x)}

Simplify:

dydx=yx+1cos⁡(y/x)\frac{dy}{dx} = \frac{y}{x} + \frac{1}{\cos(y/x)}

So:

dydx=yx+sec⁡(yx)\frac{dy}{dx} = \frac{y}{x} + \sec\left(\frac{y}{x}\right)

Note

The right-hand side is a function of y/xy/x only — that’s the hallmark of a homogeneous equation. No xx or yy appears alone; everything is in the ratio.

2. Confirm homogeneity.

A function f(x,y)f(x,y) is homogeneous of degree nn if f(tx,ty)=tnf(x,y)f(tx, ty) = t^n f(x,y). Here, the right-hand side is yx+sec⁡(y/x)\frac{y}{x} + \sec(y/x). Replace xx with txtx and yy with tyty:

tytx+sec⁡(tytx)=yx+sec⁡(yx)\frac{ty}{tx} + \sec\left(\frac{ty}{tx}\right) = \frac{y}{x} + \sec\left(\frac{y}{x}\right)

No factor of tt appears — the function is homogeneous of degree 0. This confirms the substitution y=vxy = vx will work.

3. Apply the substitution y=vxy = vx.

Let v=y/xv = y/x, so y=vxy = vx. Differentiate with respect to xx:

dydx=v+xdvdx\frac{dy}{dx} = v + x\frac{dv}{dx}

Substitute into the equation dydx=v+sec⁡v\frac{dy}{dx} = v + \sec v:

v+xdvdx=v+sec⁡vv + x\frac{dv}{dx} = v + \sec v

Cancel vv from both sides:

xdvdx=sec⁡vx\frac{dv}{dx} = \sec v

4. Separate variables.

Multiply both sides by dxdx and divide by xsec⁡vx \sec v (or equivalently, multiply by cos⁡v\cos v):

cos⁡v dv=dxx\cos v \, dv = \frac{dx}{x}

Now the variables are separated — vv on the left, xx on the right.

Tip

The cancellation of vv is not a coincidence — it happens because the original equation was homogeneous. If you ever try this substitution and vv doesn’t cancel, check your algebra or whether the equation is truly homogeneous.

5. Integrate both sides.

Integrate:

∫cos⁡v dv=∫dxx\int \cos v \, dv = \int \frac{dx}{x}

We get:

sin⁡v=log⁡∣x∣+C\sin v = \log|x| + C

where CC is the constant of integration.

6. Substitute back v=y/xv = y/x.

Replace vv:

sin⁡(yx)=log⁡∣x∣+C\sin\left(\frac{y}{x}\right) = \log|x| + C

This is the general solution of the differential equation.

Watch out

We assumed cos⁡(y/x)≠0\cos(y/x) \neq 0 when dividing. If cos⁡(y/x)=0\cos(y/x) = 0, then y/x=π/2+nπy/x = \pi/2 + n\pi, which gives y=(π/2+nπ)xy = (\pi/2 + n\pi)x. Substituting into the original equation shows these are also solutions (they satisfy dy/dx=y/xdy/dx = y/x, which matches the original after simplification). So the complete solution includes these singular solutions, but the general solution above covers most cases.


✓Final answer

The general solution is sin⁡(yx)=log⁡∣x∣+C\sin\left(\frac{y}{x}\right) = \log|x| + C, with the singular solutions y=(π2+nπ)xy = \left(\frac{\pi}{2} + n\pi\right)x for integer nn.

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.