Given the differential equation y'=f(x,y) , suppose it…
Given the differential equation \(y'=f(x,y)\), suppose it admits an integrating factor that depends only on \(x\). Show that the equation is then linear.
Explanation of Method
Write the equation in the form \(M\,dx+N\,dy=0\) with \(M=-f(x,y)\), \(N=1\). First derive, from scratch, the standard necessary-and-sufficient condition for existence of an integrating factor \(\mu(x)\) (rather than merely asserting it), to confirm it really is an "if and only if" statement and not just a one-directional implication. Then use only the direction the problem actually needs — existence of \(\mu(x)\) \(\Rightarrow\) the stated condition — to conclude \(f\) is affine in \(y\), i.e. the equation is linear.
1. Set up \(M\,dx+N\,dy=0\)
\(y'=f(x,y)\) rewrites as \(dy-f(x,y)\,dx=0\), i.e. \(M\,dx+N\,dy=0\) with \(M(x,y)=-f(x,y)\), \(N(x,y)=1\).
2. Derive the standard condition for \(\mu(x)\) to exist — proved, not just cited
Suppose \(\mu=\mu(x)\) makes \(\mu M\,dx+\mu N\,dy=0\) exact. Exactness requires \(\partial_y(\mu M)=\partial_x(\mu N)\), i.e. (since \(\mu\) depends on \(x\) alone) \[ \mu\,M_y = \mu' N + \mu\,N_x \quad\Longleftrightarrow\quad \frac{\mu'}{\mu} = \frac{M_y-N_x}{N}.\qquad(\dagger) \] The left side of \((\dagger)\) depends on \(x\) only (because \(\mu=\mu(x)\)). Therefore, for \((\dagger)\) to hold identically over the domain, the right side must also be independent of \(y\) — this is the necessary direction: if \(\mu(x)\) exists, then \((M_y-N_x)/N\) is a function of \(x\) alone. Conversely, if \((M_y-N_x)/N=:g(x)\) is already known to depend on \(x\) only, then \(\mu(x)=\exp\!\big(\int g(x)\,dx\big)\) satisfies \((\dagger)\) by construction, so exactness holds — this is the sufficient direction. Both directions hold, so the textbook statement really is a genuine if-and-only-if, not merely an assumed equivalence.
3. Apply the necessary direction to \(M=-f,\ N=1\)
Here \(N=1\) so \(N_x=0\) and \(M_y=-f_y\), giving \((M_y-N_x)/N=-f_y\). Since only the hypothesis "\(\mu(x)\) exists" is given (not the condition on \((M_y-N_x)/N\)), it is exactly the necessary direction proved in Step 2 that licenses concluding \[ -f_y(x,y) = g(x) \quad\text{for some function \(g\) of \(x\) alone,} \] i.e. \(f_y(x,y)=h(x)\) for \(h=-g\), a function of \(x\) alone. This is the crux inference and it is logically justified (not circular), because it uses only the "only if" half of the genuine biconditional established in Step 2 — precisely the direction the problem's hypothesis supplies.
4. Integrate \(f_y=h(x)\) with respect to \(y\)
Since \(f_y\) does not depend on \(y\), integrating in \(y\) at fixed \(x\) gives \[ f(x,y) = h(x)\,y + \phi(x) \] for an arbitrary function \(\phi(x)\) of \(x\) alone (the "constant" of \(y\)-integration). Writing \(P(x)=-h(x)\), \(Q(x)=\phi(x)\): \[ f(x,y) = -P(x)y + Q(x). \]
5. Conclude linearity
Substituting back into \(y'=f(x,y)\): \[ y' = -P(x)y+Q(x) \quad\Longleftrightarrow\quad y'+P(x)y=Q(x), \] which is precisely the standard form of a first-order linear ODE. (As a check on the converse, note that any equation already of this form indeed has the classical integrating factor \(\mu(x)=e^{\int P(x)dx}\), consistent with the sufficiency direction proved in Step 2 — though the problem itself only asks for the forward direction.)
Result
Final answer:
Theorem (forward direction, as required by the problem statement). If \(y'=f(x,y)\) admits an integrating factor \(\mu(x)\) depending on \(x\) alone, then \(f\) is affine in \(y\) and the equation is linear: \[ \boxed{\ y' + P(x)\,y = Q(x)\ } \] for some functions \(P,Q\) of \(x\) alone. The proof rests on a genuine if-and-only-if fact — proved in Step 2, not merely asserted — that \(\mu(x)\) exists precisely when \(\dfrac{M_y-N_x}{N}\) depends on \(x\) only; only its necessary ("only if") half is needed for this problem's hypothesis, and the sufficient half separately confirms the converse (every linear equation has such an integrating factor), so the underlying equivalence is airtight in both directions even though the problem itself asks for only one of them.