What went wrong with my simple differential equation?

Vriska
Messages
138
Reaction score
2

Homework Statement


[/B]
dy/dt = c - ky

Homework Equations



integral 1/y dy = ln(y)

The Attempt at a Solution



let y = c/k + z

dy/dt = dz/dt = -kz

dz/z = -kdt

ln(z) = - kt

z = e^(-kt)

but z = y - c/k

y = e^(-kt) + c/k + cons.

answer should have been negative sign on the e term. I can't find anything wrong and I've been at it for the past hour :/
 
Physics news on Phys.org
The only error I have found is, that your constant is wrong. It has to be ##y=\dfrac{c}{k} + c_0e^{-kt}## and that ##\int \dfrac{dz}{z} = \log |z|##. So the sign depends on initial conditions.
 
fresh_42 said:
The only error I have found is, that your constant is wrong. It has to be ##y=\dfrac{c}{k} + c_0e^{-kt}## and that ##\int \dfrac{dz}{z} = \log |z|##. So the sign depends on initial conditions.

? this is new to me, how did you get the c_0 on the exponent term??
 
This is not new to you, I bet. You have
$$
\int \dfrac{dz}{z} = -k \int dt \Longrightarrow \log|z| + C_1 = -kt +C_2 \longrightarrow |z|=\exp(-kt + C_3) = e^{C_3}\cdot \exp(-kt) = c_0e^{-kt}
$$
 
fresh_42 said:
This is not new to you, I bet. You have
$$
\int \dfrac{dz}{z} = -k \int dt \Longrightarrow \log|z| + C_1 = -kt +C_2 \longrightarrow |z|=\exp(-kt + C_3) = e^{C_3}\cdot \exp(-kt) = c_0e^{-kt}
$$

haha, damn, that was real neat . Thanks!
 
I get something different: $$y=y(0)e^{-kt}+\frac{c}{k}(1-e^{-kt})$$
 
Chestermiller said:
I get something different: $$y=y(0)e^{-kt}+\frac{c}{k}(1-e^{-kt})$$

That's not really all that different is it? That's just what you get after you solve for ##c_0## in terms of ##y(0)##.
 
Dick said:
That's not really all that different is it? That's just what you get after you solve for ##c_0## in terms of ##y(0)##.
I guess I got confused.
 
Back
Top