# Math Help - Tricky integral

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 \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 \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 \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
$\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$

$u=k-y$

5. Originally Posted by Unknown008
$\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 \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 $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 $rt+C$ is coming from, but...

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

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

$\mathrm{ln}|y|-\mathrm{ln}|k-y|=rt+C$
$\mathrm{ln}|\frac{y}{k-y}|=rt+C$
$\frac{y}{k-y}=Ae^{rt}$ (if you want it like this, $A=e^C$)
$y=(k-y)Ae^{rt}$
$y=Ake^{rt}-yAe^{rt}$
$y+yAe^{rt}=Ake^{rt}$
$y(1+Ae^{rt})=Ake^{rt}$
$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.

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

Multiply by 2/2;

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