Multiply by I so the left side becomes one derivative: A linear first-order ODE looks like dy/dx + P(x)y = Q(x) — note y appears to the first power, multiplied by a function of x.
Multiply every term by the integrating factor I = e∫P dx. The magic: the left side then becomes exactly the derivative of a product, (I·y)', by the product rule. So you can integrate it directly.
Why it works: d/dx(I·y) = I·dy/dx + I'·y, and I' = I·P (since I = e∫P). That matches I·(dy/dx + Py) — the whole left side.
IB-style question — integrating factor
Solve dy/dx + (2/x)y = x, for x > 0.
Step by step
- Identify P(x) = 2/x and Q(x) = x. Find the integrating factor I = e∫P dx.
- Multiply the whole equation by I = x². The left side is now exactly (x²y)′.
- Integrate both sides with respect to x.
- Divide by x² to make y the subject.
Final answer
y = ¼x² + C/x².
If dy/dx depends only on y/x, let y = vx: An ODE is homogeneous when dy/dx can be written purely in terms of the ratio y/x — for example dy/dx = (x + y)/x = 1 + y/x.
Substitute y = vx (so v = y/x is the new variable). By the product rule:
$$\frac{dy}{dx} = v + x\frac{dv}{dx}$$
Replace dy/dx and every y/x by v. The equation becomes separable in v and x — solve it, then put v = y/x back at the end.
IB-style question — y = vx substitution
Solve dy/dx = (x + y)/x for x > 0, given y = 0 when x = 1.
Step by step
- Write the right side in terms of y/x: (x + y)/x = 1 + y/x. So it is homogeneous.
- Let y = vx, so dy/dx = v + x dv/dx and y/x = v. Substitute.
- The v's on each side cancel — now it's separable in v and x.
- Integrate both sides.
- Replace v by y/x.
- Use y = 0 when x = 1: 0 = 1·0 + C·1, so C = 0.
Final answer
y = x ln x.
IB-style question — homogeneous needing partial fractions feel
Solve dy/dx = (x² + y²)/(xy) for x > 0, given y = 0 when x = 1.
Step by step
- Divide top and bottom by x²: it's homogeneous in y/x.
- Let y = vx: dy/dx = v + x dv/dx and y/x = v.
- Subtract v from both sides: (1 + v²)/v − v = 1/v.
- Separate (v with dv, x with dx) and integrate.
- Put v = y/x back, then use y = 0 at x = 1: ½(0) = 0 + C ⇒ C = 0.
Final answer
y² = 2x² ln x (i.e. y = x√(2 ln x)).