I've noticed that whenever $\int \frac{f'(x)}{f(x)}$ comes up in a differential equation the answer is always given as $\ln f(x)$ rather than $\ln |f(x)|$ as I was taught it should be. Is it because of the arbitrary constant? In other words, since $$\int \frac{f'(x)}{f(x)}=\ln |f(x)|+\ln A$$ for some constant $A$, then the answer is $\ln A|f(x)|$ and because $A$ can be positive or negative it follows that there is no point including the absolute signs? Hence the answer is given as $\ln f(x)+C$ for some constant $C$ rather than $\ln |f(x)|+C$. Is this why?
Why is $\int \frac{f'(x)}{f(x)}=\ln |f(x)|$ ignored in differential equations?
621 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 5 best solutions below
On
Mathematicians doing ODE usually assume complex number calculations. In that setting, the assertion $$ \int\frac{dx}{x} = \log |x| + C \tag{1}$$ is simply wrong. $\log |x|$ is not complex differentiable at any point. In particular, it does not have derivative $1/x$.
But, as you note, you can still write $$ \int \frac{dx}{x} = \log x + C \tag{2}$$ even when $x<0$. The $\log$ and the $C$ may both be non-real complex numbers. But only beginners would worry about that.
I think formulas of the type (1) were invented by textbook writers within the last 50 years or so.
On
Review of Integrating Factors
Consider integrating factors in the context of linear equations, say $\dfrac{\mathrm{d}y}{\mathrm{d}t}+p\left(t\right)y=g\left(t\right)$. (I'll often drop the input $t$s from now on.) Our hope is to multiply the equation by some function $\mu$ to turn the left side into the derivative of a product, say $\left(\mu y\right)'$, so that we can integrate both sides and divide by $\mu$ to solve for $y$. Note that by the product rule, we have $\left(\mu y\right)'=\mu'y+\mu y'$. To get $\left(\mu y\right)'=\mu*\left(y'+py\right)$, we should look for $\mu$ that satisfy $\mu'=\mu p$. (That's a separable equation.)
Absolute values in integrating factors mostly don't matter
Note that if $\mu\left(t\right)$ is a valid integrating factor (in the sense that $\mu'\left(t\right)=\mu\left(t\right)p\left(t\right))$, then define $\nu(t)=-\mu(t)$ and note that $\nu'\left(t\right)=-\mu'\left(t\right)=-\mu\left(t\right)p\left(t\right)=\nu\left(t\right)p\left(t\right)$. But $\nu'=\nu p$ is exactly the equation $\nu$ should satisfy to be an integrating factor! So the negative of an integrating factor works just as well.
Now suppose you solve $\mu'=\mu p$ and get a solution like $\mu\left(t\right)=\left|\omega\left(t\right)\right|$, thanks to an integral of $\dfrac{\omega'\left(t\right)}{\omega\left(t\right)}$. On an interval where $\omega\left(t\right)$ is always nonnegative, $\mu\left(t\right)=\omega\left(t\right)$, and you don't need the absolute value. On an interval where $\omega\left(t\right)$ is always nonpositive, $\mu\left(t\right)=-\omega\left(t\right)$, so $\nu\left(t\right)=-\mu\left(t\right)=-\left(-\omega\left(t\right)\right)=\omega\left(t\right)$, and you still don't need to worry about the absolute value, since $\nu$ works fine, too.
Therefore, if you ignore the absolute value, you get valid solutions on these intervals where $\omega$ doesn't change sign.
In practice, absolute values in integrating factors don't matter at all
A limitation of the above discussion is that there's no guarantee the solutions on separate intervals will be able to connect up when $\omega\left(t\right)=0$. However, that's okay, because in practice an issue like that would usually arise because the original differential equation has a problem at that point.
For example, with something like $ty'+3y=te^{t}$, you would rewrite as $y'+\dfrac{3}{t}y=e^{t}$ and initially get an integrating factor of $\left|t\right|^{3}$. By the above argument, for positive $t$ or negative $t$, you can get away with $t^{3}$ and learn that $t^{3}y=\int_{0}^{t}e^{x}\,\mathrm{dx}+C$. But what about at $t=0$? Well, that would make $t^3y$ not tell you about $y$, it would make $\dfrac{3}{t}$ undefined, and would make $ty'+3y=te^{t}$ not tell you anything about $y'$. In fact, the solutions for positive or negative $t$ diverge as $t$ approaches $0$, so you had no hope of finding a solution on an interval like $\left[-1,1\right]$ anyway.
On
Writing $ \int \frac{f'(x)}{f(x)} = \ln f(x)$ implicitly supposes that $f(x) > 0$. The logarithm is not defined for negative numbers.
Why isn't the general formula needed?
Consider the differential equation $$ y' = ty. $$ To find the solutions to such equations, we can proceed in two steps.
Step 1. Suppose we have a solution $y: I \rightarrow \mathbb{R}$, where $I$ is an open interval. Further assume $y(t) \not = 0$, for all $t$. Since $I$ is an interval, then either $y > 0$ or $y < 0$. In the first case, we find $\frac{y'(t)}{y(t)} = t$, from which $\ln y(t) = t^2/2 + C$ and $y(t) = \alpha e^{t^2/2}$, for some $\alpha > 0$.
Step 2. We verify that $y(t) = \alpha e^{t^2/2}$, $I = \mathbb{R}$, is indeed a solution for all $\alpha \in \mathbb{R}$ and that all solutions have been found.
As you can see, when everything is done so carefully, there is no need to use the general formula $\int \frac{f'}{f} = \ln|f|$. I guess this is what teachers have in mind when presenting an abbreviated argument and writing "$\int \frac{y'(t)}{y(t)} = \ln y(t)$".
On
Imho, the author is usually assuming $f$ takes positive values. This is reasonable considering many applications.
If $f$ does not necessarily take positive values, you still have a misunderstanding concerning the "constant" of integration. If by $\int g(x)\,dx$ you mean a fully generic antiderivative, then $$\int \frac{f'(x)}{f(x)}\,dx=\ln\left\lvert f(x)\right\rvert+C(x)=\ln\left\lvert e^{C(x)}f(x)\right\rvert=\ln\left\lvert A(x)f(x)\right\rvert$$ where $C$ is not exactly a constant function. $C$ is piecewise constant, allowed to change its value wherever $f(x)=0$. Consequently $A$ is also allowed to change value at places where $f(x)=0$.
Even with $\int\frac{1}{x}\,dx$, functions like $$\ln|x|+\begin{cases}1&x\gt0\\-1&x\lt0\end{cases}$$ are valid antiderivatives of $\frac{1}{x}$.
With separable equations, we're often solving for $y$ in the integral equation
$$\int \frac{dy}{y} = \int p(x) \ dx$$
so that, given $P$ is an antiderivative of $p$, we have
$\ln |y| = P(x) + C_1$
where $-\infty < C_1 < \infty$. Hence, $\exp$ing both sides we get
$$|y| = C_2\exp P(x)$$ where
$0<C_2<\infty$
Note that $|y| \neq 0$ since the right hand side is never $0$. Therefore, $y(x)$ is either strictly positive or strictly negative and hence we can simply consider a new nonzero constant $C_3$ which ranges from $-\infty < C_3 < \infty$
and note that $y(x)$ satisfies
$y(x) = C_3 \exp P(x)$
We would have gotten the same result if we had ignored the absolute value.