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

thumb_up100%(1 rated)

Key concept: This is one of those spots where notation looks more mysterious than it really is. The key idea is that yy is still a function of xx, so once you divide by y(x)y(x), the left side becomes a derivative with respect to xx that can be integrated in the usual way.

Step by step

For the homogeneous equation

y(x)=p(x)y(x),y'(x)=p(x)y(x),

you can divide by y(x)y(x) only where y(x)0y(x)\neq 0:

y(x)y(x)=p(x).\frac{y'(x)}{y(x)}=p(x).

Now notice what y(x)y(x)\frac{y'(x)}{y(x)} really is. Since yy depends on xx,

ddx(lny(x))=y(x)y(x).\frac{d}{dx}\big(\ln|y(x)|\big)=\frac{y'(x)}{y(x)}.

So integrating with respect to xx gives

y(x)y(x)dx=p(x)dx,\int \frac{y'(x)}{y(x)}\,dx=\int p(x)\,dx,

which becomes

lny(x)=Q(x)+C.\ln|y(x)|=Q(x)+C.

Exponentiating:

y(x)=eQ(x)+C=eCeQ(x).|y(x)|=e^{Q(x)+C}=e^C e^{Q(x)}.

Since eC>0e^C>0, the arbitrary constant can absorb the sign, so we write

y(x)=AeQ(x),AR.y(x)=A e^{Q(x)}, \qquad A\in\mathbb R.

Why this is allowed

The integral is with respect to xx because the whole expression is already a function of xx. You are not pretending yy is independent of xx; you are using the chain rule in reverse.

Why separable equations often use dydy

For a separable equation like

y=f(x)g(y),y'=f(x)g(y),

we usually rewrite it as

1g(y)dy=f(x)dx\frac{1}{g(y)}\,dy=f(x)\,dx

because that is the cleanest way to separate the variables.

If you instead wrote

yg(y)=f(x),\frac{y'}{g(y)}=f(x),

and integrated both sides with respect to xx, that is still valid if you treat the left side as

y(x)g(y(x))dx.\int \frac{y'(x)}{g(y(x))}\,dx.

Then you can use the substitution u=y(x)u=y(x), du=y(x)dxdu=y'(x)dx, which gives

1g(u)du.\int \frac{1}{g(u)}\,du.

So the dydy notation is not a different rule; it is just a shortcut for substitution.

The real rule

You may integrate with respect to xx or yy, but the differential has to match the variable you are integrating over. The common separable-equation form

1g(y)dy=f(x)dx\frac{1}{g(y)}\,dy=f(x)\,dx

is just the shortest way to write that substitution step.

Pitfall alert

A common mistake is to treat yg(y)\frac{y'}{g(y)} as if it were already a function of xx only and then integrate without substitution. That can hide the chain rule and lead to confusion. Another trap is dividing by yy or g(y)g(y) 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

y=f(x)g(y),y'=f(x)g(y),

you can still integrate with respect to xx:

y(x)g(y(x))dx=f(x)dx.\int \frac{y'(x)}{g(y(x))}\,dx=\int f(x)\,dx.

Using u=y(x)u=y(x), the left side becomes

1g(u)du.\int \frac{1}{g(u)}\,du.

So both approaches are equivalent. The difference is mostly notation: dydy is the substitution result, while dxdx 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.

chat