# Exponentiating expression containing ln(abs(x))

I am trying to figure out when we write +/- after exponentiating expressions containing natural log.

So, say that we have integrated (1/x) with respect to x. Then we have ln(abs(x)) + C. That is, ln(x) with absolute value signs around the x.

Now, if this is the left-hand side of the equation and we want to exponentiate both sides in order to solve, do we need to have +/- exp expression due to the absolute value inside the natural log?

I am confused about when you need the +/- because in a WolframAlpha solution to a Diff EQs problem that I’m working on, they just took the positive expression instead of using +/-.

But some problems in the book have answers with +/- for a similar process, so I am confused.

Thanks very much.

• Perhaps it would clarify your question if you included (in the question, not in a comment) the specific differential equation and the solution provided by WorlfamAlpha. Commented Dec 24, 2021 at 22:59
• Thanks. The question is: Solve the initial value Problem (dy/dt) = 4y(y+2) with y(0)=6. My answer is identical to the WolframAlpha except that I have +/- signs everywhere they just have + signs because I was taking into account that we have ln(abs(x)) Commented Dec 24, 2021 at 23:31
• The problem is that the antiderivatives of $\frac1{x}$ are not given by $\ln(|x|)+C.$ The antiderivatives are given by the piecewise $\ln(-x)+A,$ $\forall{x\lt0}$ and $\ln(x)+B,$ $\forall{x\gt0}.$ Both parts of the domain need to be handled separately when doing antidifferentiation, differentiation, or integration. The fool-proof way of solving these differential equations is to handle the cases separately, rather than tackling absolute values, but the absolute values should not even be there to begin with if you antidifferentiate correctly. Commented Jan 3, 2022 at 14:46

## 1 Answer

For the exercise in question, there will be no absolute value in the general solution because that is taken care of by the arbitrary constant of integration.

Given

$$\frac{dy}{dt}=4y(y+2),\,y(0)=6$$

As you point out, this is separable.

Rewriting, we get

$$\begin{eqnarray} \left(\frac{1}{y}-\frac{1}{y+2}\right)\,dy&=&8\,dt\\ \ln\left\vert \frac{y}{y+2}\right\vert&=&8t+c\\ \left\vert\frac{y}{y+2}\right\vert&=&e^{8t+c}\\ \frac{y}{y+2}&=&\pm e^ce^{8t}\\ \frac{y}{y+2}&=&ke^{8t} \end{eqnarray}$$

Now there is no absolute value in the general solution since the constant of integration, $$k$$ can be either positive or negative.

• Thank you so very much!!! I forgot about replacing e^c with k. Thank you so much. Have a great holiday. Commented Dec 25, 2021 at 1:02