# Thread: Basic logarithmic expression

1. ## Basic logarithmic expression

As a result of looking for the analytical solution to the following indefinite integral

$\displaystyle \int\frac{dx}{(1-x)}=\int\frac{dt}{\tau}$

I came to the following expression:

$\displaystyle -log(1-x) = t/\tau + C$

for $\displaystyle C$ being the integration constant. I am trying now to get the expression of $\displaystyle x(t)$ and I am not sure about the following steps:

1) Multiply both terms by -1 (not sure if this is valid with logarithmic expressions):

$\displaystyle log(1-x) = -t/\tau - C$

2) Apply exponentiation to both sides of the previous expression:

$\displaystyle (1-x) = \exp{(-t/\tau)} - \exp{C}$

Since $\displaystyle \exp{C}$ is a constant ($\displaystyle K$), I am not sure how to proceed further. , I would try something like:

$\displaystyle x = 1-exp(-t/\tau) +K$

But this is not correct. I would appreciate if somebody would give a hint.

Thank you in advance.

2. ## Re: Basic logarithmic expression

What, exactly, are you trying to say? Yes $\displaystyle -log(1- x)= -t/\tau+ C$ is the general solution to the integration. But what does "for C" mean?

3. ## Re: Basic logarithmic expression

I re-edited the post again...

4. ## Re: Basic logarithmic expression

Hello, jguzman!

If we have an arbitrary constant, $\displaystyle C_1$ and multiply by -1,
. . we get $\displaystyle -C_1$, another arbitrary constant.
We might as well call it $\displaystyle C_2.$

Then we raise $\displaystyle e$ to the power $\displaystyle C_2.$
. . We get: $\displaystyle e^{C_2}$, another arbitrary constant.
We might as well call it $\displaystyle C_3.$

Get the idea?

$\displaystyle \int\frac{dx}{(1-x)}=\int\frac{dt}{\tau}$

I came to the following expression: .$\displaystyle -\ln(1-x) \,=\, \frac{t}{\tau} + C_1$

Multiply by $\displaystyle -1\!:\;\ln(1-x) \:=\:-\frac{t}{\tau} + C_2$

Exponentiate: .$\displaystyle 1-x \;=\;e^{-\frac{t}{\tau} + C_2} \;=\;e^{-\frac{t}{\tau}}\!\cdot\!e^{C_2}\;=\;e^{\frac{t}{ \tau}}\!\cdot\!C_3$

We have: .$\displaystyle 1-x \;=\;C_3e^{\frac{t}{\tau}}$

Therefore: .$\displaystyle x \;=\;1 + Ce^{\frac{t}{\tau}}$

5. ## Re: Basic logarithmic expression

Originally Posted by HallsofIvy
What, exactly, are you trying to say? Yes $\displaystyle -log(1- x)= -t/\tau+ C$ is the general solution to the integration. But what does "for C" mean?
Actually, it's \displaystyle \displaystyle \begin{align*} -\log{ |1 -x | } = -\frac{t}{\tau} + C \end{align*}.

6. ## Re: Basic logarithmic expression

Hi everybody!

You guys helped me a lot!. I figured out how to reach to the solution. I'll post it here just in case somebody need it!

From the original expression:

$\displaystyle \frac{dx}{dt}=\frac{(1-x)}{\tau}$

by separating the variables we have:

$\displaystyle \frac{dx}{(1-x)}=\frac{dt}{\tau}$

with substitution of $\displaystyle u = (1-x)$, I get that $\displaystyle dx = -du$

To obtain the following expression to be solved by direct integration:

$\displaystyle \int\frac{-du}{u}=\int\frac{dt}{\tau}$

whose solution is:

$\displaystyle -ln|u| = t/\tau + C$

for $\displaystyle C$ being the integration constant. Thanks Prove It for your excellent post about it!

Now it's simple to follow Soroban:

$\displaystyle -ln|(1-x)| = t/\tau + C$

$\displaystyle ln|(1-x)| = -t/\tau - C$

$\displaystyle 1-x = \exp(-t/\tau - C)$, this was the difficult step for me :S

$\displaystyle 1-x = \exp(-t/\tau)*\exp(-C)$, now let $\displaystyle K=\exp(-C)$

$\displaystyle 1-x = \exp(-t/\tau)*K$

$\displaystyle -x = -1 + K*\exp(-t/\tau)$

$\displaystyle x = 1 - K*\exp(-t/\tau)$

Thanks so much !!!

7. ## Re: Basic logarithmic expression

Originally Posted by jguzman
Hi everybody!

You guys helped me a lot!. I figured out how to reach to the solution. I'll post it here just in case somebody need it!

From the original expression:

$\displaystyle \frac{dx}{dt}=\frac{(1-x)}{\tau}$

by separating the variables we have:

$\displaystyle \frac{dx}{(1-x)}=\frac{dt}{\tau}$

with substitution of $\displaystyle u = (1-x)$, I get that $\displaystyle dx = -du$

To obtain the following expression to be solved by direct integration:

$\displaystyle \int\frac{-du}{u}=\int\frac{dt}{\tau}$

whose solution is:

$\displaystyle -ln|u| = t/\tau + C$

for $\displaystyle C$ being the integration constant. Thanks Prove It for your excellent post about it!

Now it's simple to follow Soroban:

$\displaystyle -ln|(1-x)| = t/\tau + C$

$\displaystyle ln|(1-x)| = -t/\tau - C$

$\displaystyle 1-x = \exp(-t/\tau - C)$, this was the difficult step for me :S

$\displaystyle 1-x = \exp(-t/\tau)*\exp(-C)$, now let $\displaystyle K=\exp(-C)$

$\displaystyle 1-x = \exp(-t/\tau)*K$

$\displaystyle -x = -1 + K*\exp(-t/\tau)$

$\displaystyle x = 1 - K*\exp(-t/\tau)$

Thanks so much !!!
The final answer is correct, just a couple of notes. You can't just disregard the absolute value.

\displaystyle \displaystyle \begin{align*} \ln{ \left| 1 - x \right| } &= -\frac{t}{\tau} - C \\ \left| 1 - x \right| &= e^{-\frac{t}{\tau} - C} \\ \left| 1 - x \right| &= e^{-C} e^{-\frac{t}{\tau}} \\ 1 - x &= \pm e^{-C} e^{-\frac{t}{\tau}} \\ 1 - x &= K \, e^{-\frac{t}{\tau}} \textrm{ where } K = \pm e^{-C} \end{align*}

8. ## Re: Basic logarithmic expression

Originally Posted by Prove It
The final answer is correct, just a couple of notes. You can't just disregard the absolute value.

\displaystyle \displaystyle \begin{align*} \ln{ \left| 1 - x \right| } &= -\frac{t}{\tau} - C \\ \left| 1 - x \right| &= e^{-\frac{t}{\tau} - C} \\ \left| 1 - x \right| &= e^{-C} e^{-\frac{t}{\tau}} \\ 1 - x &= \pm e^{-C} e^{-\frac{t}{\tau}} \\ 1 - x &= K \, e^{-\frac{t}{\tau}} \textrm{ where } K = \pm e^{-C} \end{align*}

Wov, this now explains several things. I was "having the feeling" that the sign of integration constant, while not being so relevant for the whole arithmetic, may be important for finding the solution, and was wondering how this would affect the resulting expression.

Now, the correct solution would be...

$\displaystyle x(t) = 1 \pm K e^{\frac{-t}{\tau}}$

Due to the nature of the model, $\displaystyle x(t) \le 1$, then having the negative sing for $\displaystyle K$ makes sense in that context. It's so good to have the mathematical rigor!.

Again and again, many thanks!

9. ## Re: Basic logarithmic expression

It's fine to have just one sign for the K, since the fact that plus or minus a constant is still a constant. I just wanted to point out what happens to the absolute value in the solving for x.