Question
Why the integrating factor method uses dx in first-order linear differential equations
Original question: guys for a ODE like this one First order linear ODE $y'(x)=p(x)\,y(x)+g(x),$ the lecturer integrated the ydash/y in terms of x, using dx, here (the highlighted in yellow part) Step 1. consider $y'(x)=p(x)y(x)$ - if $y=0$ ✓ - if $y\neq 0$ $\frac{y'(x)}{y(x)}=p(x)$ $\therefore\ \int \frac{y'(x)}{y(x)}\,dx=\int p\,dx=Q(x)+C$ $\therefore\ \ln|y(x)|=Q(x)+C,\ C\in R$ $|y(x)|=e^{Q(x)+C}=e^C\cdot e^{Q(x)}$ $\therefore\ y(x)=\pm e^C e^{Q(x)}$ $\therefore\ y(x)=A\cdot e^{Q(x)},\ A\in R$ why? and if this is possible then why cant we do this for other separable equations where y'=f(x)g(y') and then y'/g(y)=f(x) and then integrate both sides by x, with dx, where y is a function of x like y(x) but instead we force the lhs to be in terms of dy and not dx
Expert Verified Solution
Key concept: This is one of those spots where notation looks more mysterious than it really is. The key idea is that is still a function of , so once you divide by , the left side becomes a derivative with respect to that can be integrated in the usual way.
Step by step
For the homogeneous equation
you can divide by only where :
Now notice what really is. Since depends on ,
So integrating with respect to gives
which becomes
Exponentiating:
Since , the arbitrary constant can absorb the sign, so we write
Why this is allowed
The integral is with respect to because the whole expression is already a function of . You are not pretending is independent of ; you are using the chain rule in reverse.
Why separable equations often use
For a separable equation like
we usually rewrite it as
because that is the cleanest way to separate the variables.
If you instead wrote
and integrated both sides with respect to , that is still valid if you treat the left side as
Then you can use the substitution , , which gives
So the notation is not a different rule; it is just a shortcut for substitution.
The real rule
You may integrate with respect to or , but the differential has to match the variable you are integrating over. The common separable-equation form
is just the shortest way to write that substitution step.
Pitfall alert
A common mistake is to treat as if it were already a function of only and then integrate without substitution. That can hide the chain rule and lead to confusion. Another trap is dividing by or without checking whether they can be zero; you may lose constant solutions if you skip that check.
Try different conditions
If the equation is written as
you can still integrate with respect to :
Using , the left side becomes
So both approaches are equivalent. The difference is mostly notation: is the substitution result, while keeps everything in one variable and makes the chain rule visible.
Further reading
integrating factor, separable differential equation, chain rule
FAQ
Why can we integrate {y'(x)/y(x)} with respect to x?
Because y is a function of x, and d/dx(ln|y(x)|)=y'(x)/y(x). The left side is already an x-dependent expression, so integrating with respect to x is valid.
Why do separable equations often use dy instead of dx?
Writing dy is a shortcut for the substitution u=y(x), du=y'(x)dx. It is not a different rule; it is the same chain rule written in a cleaner form.