1. ## Tricky integral

Whilst working through a question I got to the point where I need to integrate this:

1/y + (1/k)/(1-y/k) where k is a constant.

I got ln|y| + 1/k (ln|1-y/k|)

I know this isn't correct. Could anyone explain why and give me the correct answer?

Thankyou

2. Originally Posted by chr91
Whilst working through a question I got to the point where I need to integrate this:

1/y + (1/k)/(1-y/k) where k is a constant.

I got ln|y| + 1/k (ln|1-y/k|)

I know this isn't correct. Could anyone explain why and give me the correct answer?

Thankyou
to integrate (1/k)/(1 - y/k), do a substitution: u = 1 - y/k

now continue with that and see where you get. and try to notice a pattern so that you don't have to go through the u-sub all the time. and remember that in general, to integrate 1/something, you don't automatically take the ln|something|, it very much depends on the kind of function "something" is. follow the rules exactly. you have $\displaystyle \displaystyle \int \frac 1x~dx = \ln |x| + C$. If it doesn't (or can't) look like 1/x (that is one over a variable to the first degree), then you won't be able to integrate it and get ln. what you have doesn't look like 1/x, so you had to change it to look like that. And that would change other things as well.

3. $\displaystyle \displaystyle \int \dfrac{1}{y} + \dfrac{\frac{1}{k}}{1-\frac{y}{k}}\ dy = \int \dfrac{1}{y} + \dfrac{1}{k-y} \ dy$

I multiplied the second fraction by k/k to simplify.

Then, I get:

$\displaystyle \displaystyle \int \dfrac{1}{y} + \dfrac{1}{k-y} \ dy = ln|y| - ln|k-y| + c$

4. Originally Posted by chr91
Whilst working through a question I got to the point where I need to integrate this:

1/y + (1/k)/(1-y/k) where k is a constant.

I got ln|y| + 1/k (ln|1-y/k|)

I know this isn't correct. Could anyone explain why and give me the correct answer?

Thankyou
$\displaystyle \int{\frac{1}{y}}dy+\frac{1}{k}\int{\frac{1}{1-\frac{y}{k}}dy}=\int{\frac{1}{y}}dy+\frac{k}{k}\in t{\frac{1}{k-y}}dy$

$\displaystyle u=k-y$

5. Originally Posted by Unknown008
$\displaystyle \displaystyle \int \dfrac{1}{y} + \dfrac{\frac{1}{k}}{1-\frac{y}{k}}\ dy = \int \dfrac{1}{y} + \dfrac{1}{k-y} \ dy$

I multiplied the second fraction by k/k to simplify.

Then, I get:

$\displaystyle \displaystyle \int \dfrac{1}{y} + \dfrac{1}{k-y} \ dy = ln|y| - ln|k-y| + c$
Got it.

Thanks!

6. Originally Posted by chr91
Sorry for being dumb here but why is it -ln|k-y| not + ln|k-y| ?
Let $\displaystyle u = k-y$, as suggested above, to see why.

7. I now need to get this into a function where y = ....

ln|y| - ln|k-y| = rt + C

I need to get the function in terms of y I guess?

ln |y/(k-y)| = rt + C

y/(k-y) = Ae^rt

I can't get y on it's own though. There's too many constants!

8. Originally Posted by chr91
I now need to get this into a function where y = ....

ln|y| - ln|k-y| = rt + C

I need to get the function in terms of y I guess?

ln |y/(k-y)| = rt + C

y/(k-y) = Ae^rt

I can't get y on it's own though. There's too many constants!
I don't know where this $\displaystyle rt+C$ is coming from, but...

$\displaystyle \mathrm{ln}|y|-\mathrm{ln}|k-y|=rt+C$
$\displaystyle \mathrm{ln}|\frac{y}{k-y}|=rt+C$
$\displaystyle \frac{y}{k-y}=Ae^{rt}$ (if you want it like this, $\displaystyle A=e^C$)
$\displaystyle y=(k-y)Ae^{rt}$
$\displaystyle y=Ake^{rt}-yAe^{rt}$
$\displaystyle y+yAe^{rt}=Ake^{rt}$
$\displaystyle y(1+Ae^{rt})=Ake^{rt}$
$\displaystyle y=\frac{Ake^{rt}}{1+Ae^{rt}}$

9. Originally Posted by topspin1617
I don't know where this $\displaystyle rt+C$ is coming from, but...

$\displaystyle \mathrm{ln}|y|-\mathrm{ln}|k-y|=rt+C$
$\displaystyle \mathrm{ln}|\frac{y}{k-y}|=rt+C$
$\displaystyle \frac{y}{k-y}=Ae^{rt}$ (if you want it like this, $\displaystyle A=e^C$)
$\displaystyle y=(k-y)Ae^{rt}$
$\displaystyle y=Ake^{rt}-yAe^{rt}$
$\displaystyle y+yAe^{rt}=Ake^{rt}$
$\displaystyle y(1+Ae^{rt})=Ake^{rt}$
$\displaystyle y=\frac{Ake^{rt}}{1+Ae^{rt}}$
Thanks very much. Basically I'm working through this question:

I'm trying a step at a time!

I'm finding it hard, nearly done A though now

10. The next part says if y(0) = k/3 find y(t)

So when t=0, y = k/3 ?

k/3 = Ak/(1+A)

k(1+A) = 3(Ak)

k + Ak = 3Ak
k = 2Ak
2A = 1

A= 1/2 . Would you agree with this?

So y(t) = (1/2)ke^rt/ 1+ (1/2)e^rt

11. Yes, and you can make it simpler if there is another part coming up.

$\displaystyle y(t) = \dfrac{\frac12 ke^{rt}}{1 + \frac12 e^{rt}}$

Multiply by 2/2;

$\displaystyle y(t) = \dfrac{ke^{rt}}{2 + e^{rt}}$