Integrating factor $e^{\int \frac{1}{x} dx}$ in differential equation

integrationlogarithmsordinary differential equations

When integrating $\int \frac{1}{x} dx$, we typically write the integrated expression as $ln|x| + C$. The absolute value of the $x$-variable is introduced to account for the scenario where we have $ln(-x)$ and $x$ is a negative number.

In a calculus book I am currently working with, the following differential equation is used in an example:

$$xy'+y=3x^{2} +4x, x\neq 0$$

In this case the integrating factor becomes $e^{\int \frac{1}{x} dx}$. The textbook example then states that $e^{\int \frac{1}{x} dx}=e^{ln x} = x$.

Question: Why is it that we do not have to take the absolute value of the $x$-variable here? I could understand this if it was explicitly stated that $x>0$ in the given problem, but this is not stated. All we know is that $x\neq0$. So how does this account for the second scenario outlined above?

If anyone can explain this to me, then I would greatly appreciate it!

Best Answer

It doesn't matter.

When you are solving the homogeneous $xy'+y=0$, you get

$$y=C\exp\left(-\int\frac{dx}{x}\right)=\frac{C}{|x|}$$

But then, since the solution is not defined at $0$, you have to consider either $x>0$ or $x<0$, so $|x|=\sigma x$ with a fixed $\sigma\in\{+1,-1\}$. This constant factor is already taken into account in $C$. So, with another $C$,

$$y=\frac{C}{x}$$

Related Question