Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Tried solving this but not sure it's correct. Does anyone have a chance to check it? Any ideas on optimizing my 'process' would also be appreciated.

For

$\frac{dK}{dt}=\lambda(P-K)$ where $K(0) = 0.2P$

General solution

$ dK = \lambda(P-K) \space dt \\ \frac{1}{(P-K)} \space dK = \lambda \space dt \\ \int \frac{1}{(P-K)} \space dK = \int \lambda \space dt\\ -ln(P-K) = \lambda t + C\\ -e^{ln(P-K)} = e^{\lambda t + C}\\ -P - K = e^{\lambda t + C}\\ -K = P + e^{\lambda t + C}\\ -(-K) = -(P + e^{\lambda t + C}) $

$ K(t) = -P - e^{\lambda t + C} = -P - e^{\lambda t} e^C $

Particular solution

$ 0.2P = -P - e^{\lambda (0) + C}=-P - e^{\lambda (0)} e^C = -P - e^C\\ -e^C = P + 0.2P\\ ln(e^C) = -ln(1.2P)\\ C = -ln(1.2P) $

$ K(t) = -P - e^{\lambda t} (-1.2P) $


Potential fix

General solution

$ -ln|(P-K)| = \lambda t + C\\ e^{ln|(P-K)^{-1}|} = e^{\lambda t + C}\\ |\frac{1}{(P-K)}| = e^{\lambda t + C}\\ \frac{1}{(P-K)} = Ce^{\lambda t}\\ 1 = PCe^{\lambda t}-KCe^{\lambda t}\\ PCe^{\lambda t} - 1 = KCe^{\lambda t}\\ $

$ K(t) = \frac{PCe^{\lambda t}-1}{Ce^{\lambda t}}\\ $

Particular solution

$ 0.2P = \frac{PCe^{\lambda (0)}-1}{Ce^{\lambda (0)}}\\ 0.2P = \frac{PC-1}{C}\\ 0.2PC = PC - 1\\ -0.8PC = - 1\\ C=\frac{1}{0.8P} $

$ K(t) = \frac{P(\frac{1}{0.8P})e^{\lambda t}-1}{(\frac{1}{0.8P})e^{\lambda t}} $

Checking

$ K(0) = \frac{P(\frac{1}{0.8P})e^{\lambda (0)}-1}{(\frac{1}{0.8P})e^{\lambda (0)}} = \frac{\frac{P}{0.8P}-1}{\frac{1}{0.8P}}=(\frac{1}{0.8}-1)0.8P=0.25\cdot0.8P=0.2P $

share|improve this question
2  
$-\log a=\log a^{-1}$ –  Artem Nov 14 '12 at 1:33
3  
You can check your solution by computing $dK/dt$ –  tentaclenorm Nov 14 '12 at 1:47
    
Thanks for the pointers. I have added a potential 'fix', but still a bit unsure of myself. :) –  eee3 Nov 14 '12 at 13:23
add comment

1 Answer 1

up vote 1 down vote accepted

When you went from $$-\log(P-K)=\lambda t+C$$ to $$-e^{\log(P-K)}=e^{\lambda t+C}$$ you fell into a trap --- the left side should be $e^{-\log(P-K)}$, which is a very different thing. You made another blunder on the next step, but you were already lost by then.

share|improve this answer
    
Thanks for checking it. Trying to take it from there in the original post, based on all your inputs. Still curious if I missed anything, or if it could be done any simpler! –  eee3 Nov 14 '12 at 13:22
1  
Looks good to me. –  Gerry Myerson Nov 14 '12 at 22:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.