Converting $\ln|x| = h$ to $x = e^h$

42 Views Asked by At

In Kreyszig's Advanced Engineering Mathematics, section on First-Order ODEs, it is written:


$ dF/F = p \, dx $

$ \ln|F| = h = \int p \, dx $

Therefore, $ F = e^h$


However I don't understand why the absolute value for $F$ is gone.

To my understanding, a simplified version of this could be thought of as $\ln|x| = h$. Then if I write $x = e^h = e^{\ln|x|}$ just like the reasoning of the book, when I put $x = -2$, the equation would not hold true because $e^{\ln|-2|} = e^{\ln2} = 2$, not $-2$.

2

There are 2 best solutions below

3
On BEST ANSWER

CAUTION:

Upon reading the given reference, it turns out that at this point the author is not after the full solution, but after an integrating factor. This is why he does not care about the integration constant nor about the sign. Thus any solution can do and $e^{h(x)}$ is good enough.

This makes my answer below somewhat useless.


The true story is more complicated.

From

$$\frac{dF}F=p\,dx$$

we draw the indefinite solution

$$\log|F|=h+c$$

and

$$|F|=e^{h+c},$$

$$F=\pm e^{h+c}=\pm e^ce^h=Ce^h$$ where $C$ can have any sign.

Notice that the sign of $F$ may nowhere change, because that would make the integral on $F$ undefined.


If you have an initial condition, say $F(0)=F_0$, you can write

$$\int_{F_0}^F\frac{df}f=\int_0^x p(t)\,dt=h(x)-h(0),$$

giving

$$F=F_0e^{h(x)-h(0)}$$ and the sign of $F$ is determined by that of $F_0$.

0
On

You're right. You can see also it as follows :

As $|x| = \sqrt x^2$, $\ln |x| = \frac{\ln(x^2)}{2}$ and then $$x^2 = e^{2h}$$

Therefore, choosing between $x = e^h$ or $x = -e^h$ only depends on some other conditions you might know about $x$, that may be omitted in the book you are looking at.