Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Newton’s law of cooling gives the temperature T(t) of an object at time t in ter

ID: 3819228 • Letter: N

Question

Newton’s law of cooling gives the temperature T(t) of an object at time t in terms of T0, its temperature at t=0, and Ts, the temperature of the surroundings.

A police officer arrives at a crime scene in a hotel room at 9:18 PM, where he finds a dead body. He immediately measures the body’s temperature and find it to be 79.5ºF. Exactly one hour later he measures the temperature again, and finds it to be 78.0ºF. Determine the time of death, assuming that victim body temperature was normal (98.6ºF) prior to death, and that the room temperature was constant at 69ºF.

I need help writing the MATLAB Code that will give me the solution for this question

T(t) T, + (T)-T,)e-kt

Explanation / Answer

T(t) = Ts +(T0 - Ts)e^kt

78 = 69 + (79.5 - 69)*e^k (t=1 hr)

9/10.5 = e^-k

-k = log (9/10.5)

Now, to determine t,

79.5 = 69 + (98.6 - 69)*e^-kt

= 10.5 / 29.6 = e^(-kt)

= log(10.5 / 29.6) = -kt

= t = log(10.5/29.6) / log(9/10.5)

Matlab Code:

k = log((78-69)/(79.5-69));

t = log((79.5-69)/(98.6-69)) / k;

d = 9.18 - t;

fprintf('Time of death = %.2f a.m ',d);

%---------------------------------- OUTPUT -----------------------------------------

>> dtime
Time of death = 2.46 a.m
>>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote