Maths - Differential Equations

Soldato
Joined
20 Mar 2007
Posts
3,095
Location
Norwich
Any Mathematicians feel like giving me a hand?

Because I'm lazy, let's say theta = x

A cold liquid at temperature x degrees Celsius, where x < 20, is standing in a warm room. The temperature of the liquid obeys the differential equation

dx/dt = 2(20 - x)

where t is measured in hours.

Find the general solution of this differential equation.

Here are my workings:

--> dx/dt = 2(20 - x)

--> Int(1/[40 - 2x]) dx = Int(1) dt

--> 1/2 ln(40 - 2x) = -t

--> 40 - 2x = e^-2t

--> x = 20 - (e^-2t)/2


Now the actual answer apparently is x = 20 - Ae^-2t, where I'm assuming A is a constant.

Can anyone see where I've slipped up and where I should've added in the constant?

Thank you in advance.
 
When integrating you always have a constant +C.
As you have used natural logs using + lnC and the rules of logs to combine to get the final answer. (Obviously instead of C they have chosen A).

;)
 
Thanks guys. I knew the constant had to go in somewhere, I just didn't know how to incorporate it really.

--> dx/dt = 2(20 - x)

--> Int(1/[40 - 2x]) dx = Int(1) dt

--> 1/2 ln(40 - 2x) + ln(c) = -t

--> 1/2 ln(c[40 - 2x]) = -t

--> c(40 - 2x) = e^-2t

--> x = 20 - (e^-2t)/2c

I still can't do it!

Maybe if it was -ln(c) I'd be a bit closer to the answer, but there's still the rogue 1/2 in there at the end.
 
I've got the answer. I'm not going to solve it for you.

Remember, e^constant still equals a constant, which means you can still call it A.
So,
e^2+y = e^2 * e^y = Ae^2
Where y is a constant, i'm just saying e^y is another constant A
 
Thanks some more!

--> dx/dt = 2(20 - x)

--> Int(1/[40 - 2x]) dx = Int(1) dt

--> 1/2 ln(40 - 2x) = -t + c

--> ln(40 - 2x) = -2t + c

--> 40 - 2x = e^(-2t + c)

--> x = 20 - [e^(-2t + c)]/2

--> x = 20 - [e^(-2t) * e^c]/2

--> x = 20 - [Ae^(-2t)]/2

Is that right, Ricochet J? Now what about the 1/2?
 
x = 20 - Ae^-2t

dx/dt = 2(20 - x)

1/(20-x) dx = 2 dt

Integrating both sides

ln|20-x| = 2t + c

20-x = e^2t+c

20-x = Ae^2t

20 - Ae^2t = x

I seem to be missing a negative sign. Are you sure you wrote down the coreect answer correctly :p
Double check for us!
 
You missed the negative sign when integrating:

1/(20-x) dx = 2 dt

It should be:

-ln|20-x| = 2t + c


Thank you very much! I still can't see why my method doesn't work. The only thing I did differently was expanding the brackets at the beginning. :S
 
Your method did work. As I said before integration constants are arbitrary. You can relabel them all you like. Look back at your method and relabel the constant. You say yourself "Maybe if it was -ln(c) I'd be a bit closer to the answer, but there's still the rogue 1/2 in there at the end." Well...make it -ln(c) and stick a 1/2 in there. You can do that because it is arbitrary.
 
Your method did work. As I said before integration constants are arbitrary. You can relabel them all you like. Look back at your method and relabel the constant. You say yourself "Maybe if it was -ln(c) I'd be a bit closer to the answer, but there's still the rogue 1/2 in there at the end." Well...make it -ln(c) and stick a 1/2 in there. You can do that because it is arbitrary.

I suppose that would work, thanks. But if I can just disregard the 1/2 I'm changing the equation. I mean, Ae^-2t is not the same as (Ae^-2t)/2, is it? Had you not have said anything I wouldn't have known which numbers I could just get rid of and replace with the constant, A, and which to leave.
 
I suppose that would work, thanks. But if I can just disregard the 1/2 I'm changing the equation. I mean, Ae^-2t is not the same as (Ae^-2t)/2, is it? Had you not have said anything I wouldn't have known which numbers I could just get rid of and replace with the constant, A, and which to leave.

Yes, it is the same, since A is an arbitrary constant.

The 'A' in the first equation is simply half the value of the 'A' in the second.

As with most arbitrary constants, the value is determined by specified conditions.

For example, if the initial (t=0) temnperature was 15 degrees, then in the first case you have:

15 = 20 - (A * e^(-2 *0))/2

so

15 = 20 - A/2

so A = 10, and t = 20 - 10e^(-2t)/2 = 20 - 5e^-2t

Using the second case:

15 = 20 - Ae^(-2*0) = 20 - A

so A = 5 and t = 20 -5e^-2t

Exactly the same result
 
I suppose that would work, thanks. But if I can just disregard the 1/2 I'm changing the equation. I mean, Ae^-2t is not the same as (Ae^-2t)/2, is it? Had you not have said anything I wouldn't have known which numbers I could just get rid of and replace with the constant, A, and which to leave.

It is, purely because 'A' in each case adjusts accordingly.
So the constant in each is indeed different to enable them to be equal.

As you're not disregarding the 1/2 your merely saying that the 1/2 is part of the constant and is made up in that way.
 
Back
Top Bottom