# Thread: first order ODE

1. ## first order ODE

so I have the equation: $dx/dt = .8x - .004x^2$ t is time in seconds x represents concentration of a salt in solution
the initial condition being at t=0, x=50
so I used bernoulli's equation substitution then integrating factor I got:

$x = 1/(.025exp(-.8t) - .005)$
which stops giving realistic values after 2 seconds
also according the the differential equation the concentration should peak around x=200 but with the solution it doesn't so I'm guessing I did something wrong.

So what should I have done?

2. Originally Posted by AsSeenOnTV
so I have the equation: $dx/dt = .8x - .004x^2$ t is time in seconds x represents concentration of a salt in solution
the initial condition being at t=0, x=50
so I used bernoulli's equation substitution then integrating factor I got:

$x = 1/(.025exp(-.8t) - .005)$
which stops giving realistic values after 2 seconds
also according the the differential equation the concentration should peak around x=200 but with the solution it doesn't so I'm guessing I did something wrong.

So what should I have done?
This equation is separable.
$\int \frac{dx}{.8x-.004x^2}=\int dt$

3. which if I did the integration right I get $t(x)= 5/4(ln(x) + ln(.8-.004x))$ which is OK I guess except I was supposed to get x in terms of t

4. Originally Posted by AsSeenOnTV
which if I did the integration right I get $t(x)= 5/4(ln(x) + ln(.8-.004x))$ which is OK I guess except I was supposed to get x in terms of t
By integration, we obtain:
$-\frac{5}{4}ln\bigg(\frac{x-200}{x}\bigg)=t+c\rightarrow ln\bigg(\frac{x-200}{x}\bigg)=-\frac{4t}{5}+c_2\rightarrow e^{ln\big(\frac{x-200}{x}\big)}=e^{\frac{-4t}{5}+c_2}$

Think you can take it from here?

5. Spoiler:
$\frac{x-200}{x}=C_3e^{\frac{-4t}{5}}$

$1-200x^{-1}=C_3e^{\frac{-4t}{5}}$

$x(t)=\frac{-200}{C_4e^{\frac{-4t}{5}}-1}$

6. wow you're good at this

I recalculated using the same method I used the first time and got:

$x(t)= 1/(.005+.015exp(-.8t))$

which gave me a realistic answer

7. Originally Posted by AsSeenOnTV
wow you're good at this

I recalculated using the same method I used the first time and got:

$x(t)= 1/(.005+.015exp(-.8t))$

which gave me a realistic answer
I don't know what the answer is in decimal form since I usually don't use decimals whenever possible but if I solve for C. I am going to obtain:

$\frac{-200}{C_4-1}=50\rightarrow C_4=-3$

$x(t)=\frac{200}{3e^{\frac{-4t}{5}}+1}$

Which is equal to your result if you multiple by $1=\frac{200}{200}$