0% found this document useful (0 votes)
71 views8 pages

MA124: Maths by Computer - Week 5: Thomas Dove and Kyle Byrne February 8, 2015

This document discusses using differential equations to model the cooling of a dead body over time and determine an estimated time of death. It presents an equation to model the temperature of the body as it cools and uses initial temperature measurements to solve the equation and estimate the cooling rate. It then uses the cooling rate and temperature-time function to estimate the time when the body's temperature would have been 37 degrees, indicating the time of death. The document also examines properties of the Bessel function and numerically solves its defining differential equation to plot the function over time.

Uploaded by

Kyle Byrne
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views8 pages

MA124: Maths by Computer - Week 5: Thomas Dove and Kyle Byrne February 8, 2015

This document discusses using differential equations to model the cooling of a dead body over time and determine an estimated time of death. It presents an equation to model the temperature of the body as it cools and uses initial temperature measurements to solve the equation and estimate the cooling rate. It then uses the cooling rate and temperature-time function to estimate the time when the body's temperature would have been 37 degrees, indicating the time of death. The document also examines properties of the Bessel function and numerically solves its defining differential equation to plot the function over time.

Uploaded by

Kyle Byrne
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

MA124: Maths by Computer - Week 5

Thomas Dove and Kyle Byrne


February 8, 2015

1
1.1

6A
(a)

The temperature T (t) at time t of a dead body lying outside satisfies the equation
dT
= k(T (t) A(t))
(1)
dt
where k is an unknown rate of cooling. A(t) ,the fluctuation of outside temperature, is given by
A(t) = 3 5 cos((t 2))

where = 12
and t is the time of day measured in hours, with t = 0 corresponding to midnight. We can rearrange (1) into the form of a inhomogeneous
first order differential equation as follows:

dT
+ kT = 3k 5k cos((t 2))
dt

(2)

Solving (2), we find the general solution for T (t) to be:


T = 3 + Cekt

5k
( sin((t 2)) + k cos((t 2)))
k2 + 2

(3)

where C is a constant to be solved.


As at 7 a.m (t = 7) when the body is found, the temperature is measured to be
at 20 degrees (T (7) = 20). Using this information we can then solve the initial
value problem, and find a value for C.
C = e7k (17 +

5k
( sin(5) + k cos(5))
k2 + 2

(4)

And so our particular solution for the temperature of the body at a given time
(t) past midnight is:
T (t) = 3 + (e7k (17 +

k2

5k
( sin(5) + k cos(5)))ekt
k2 + 2

5k
( sin((t 2)) + k cos((t 2)))
+ 2

(5)

1.2

(b)

We now get given that at 8 a.m (t = 8) that the temperature of the body has
dropped to 15 degrees, that is T (8) = 15. By substituting these conditions into
(5), we can rearrange to find a formula for k.
15 = 3 + (e7k (17 +

12 +

k2

k2

5k
( sin(6) + k cos(6)))
+ 2

5k
5k
( sin(6) + k cos(6)) = ek (17 + 2
( sin(5) + k cos(5))
k2 + 2
k + 2
ek =

17 +
12 +

5k
k2 + 2 ( sin(5) + k cos(5)
5k
k2 + 2 ( sin(6) + k cos(6))

And so:
k = log

1.3

5k
( sin(5) + k cos(5)))e8k
+ 2

17 +
12 +

5k
k2 + 2 ( sin(5) + k cos(5)
5k
k2 + 2 ( sin(6) + k cos(6))

(6)

(c)

Using Matlab, we are able to use the fixed-point iteration method to approximate a value of k with an error of less than 104 of the actual rate of cooling
of the body.
By taking our initial guess for k to be 1, we approximate the value of k to be
0.3339, with an error less than 104 .

Figure 1: Iterations for finding the cooling constant


See attached m.file: coolconst.m

1.4

(d)

With an estimate for the rate of cooling, we can now use (5), to gather an approximate time of death. It is known that at the time of death, the temperature
of body would of been around 37 degrees. Hence by using the plotted function
of T (t), we can find a corresponding time for which the bodies temperature was
at 37 degrees, and so from this we can find the time of death.
Using the function (5), by solving for time, we found for a temperature T = 37,
the time corresponding to that temperature was t = 5.1083.
This value for t, shows us the time of death was approximately 5:06 a.m.

Figure 2: Temperature plot, showing the time of death


See attached m.files: tplot.m , rateofcooling.m

2
2.1

6B
(a)
J(t) =

X
(1)k (t/2)2k

(k!)2

k=0

(7)

J is called the Bessel function.


P
We can show that the Bessel function converges, as it is in the form k=0 ((1)k (ak )),
2k

where ak = (t/2)
(k!)2 . As (ak ) is decreasing and null, by the ratio test, we can
determine that J(t) is convergent by the alternating series test.

The Bessel Function can also be shown to satisfy the differential equation:
tJ 00 (t) + J 0 (t) + tJ(t) = 0;

f or t  R

(8)

By calculating the first and second derivative of J(t), we can then substitute
this into the differential equation to show it holds true.
0

J (t) =

X
(1)k k(t/2)2k1

(k!)2

k=1

X
(1)k (t/2)2k1

k!(k 1)!

k=1

(9)

J 00 (t) =

1 X (1)k (2k 1)(t/2)2k2


2
k!(k 1)!
k=1

X
(1)k (t/2)2k2
k=1

k=0

((k 1)!)2
k

1 X (1)k (t/2)2k2
2
k!(k 1)!

k=1

(1) (t/2)
((k)!)2

2k

1 X (1)k (t/2)2k2

k=1

k!(k 1)!

(10)

by using the shift rule of sequences.


And then by substituting into the differential equation we can show the Bessel
function satisfies it for all real values of t.
tJ 00 (t) + J 0 (t) + tJ(t)

X
X
1 X (1)k (t/2)2k2 X (1)k (t/2)2k1
(1)k (t/2)2k
(1)k (t/2)2k

t
+
+
t
= t
((k)!)2
2
k!(k 1)!
k!(k 1)!
(k!)2
k=0

1
= t
2
=

k=1

2k2

(1) (t/2)
k!(k 1)!

X
(1)k (t/2)2k1
k=1

k!(k 1)!

k=1

k=1

k=1

k=0

2k1

(1) (t/2)
k!(k 1)!

X
(1)k (t/2)2k1
k=1

k!(k 1)!

=0
The difficulty of plotting the power series over the solution to the differential
equation is that plotting a series from zero to infinity over many values of t (for
accurate plot, the number of values of time to be plotted would be in excess of
500 values), and there to plot the function accurately would require a immense
amount of computation.

2.2

(b)

As (8) is a second order differential equation, we need to be able to recast it


into a system of first order differential equations so we are able to solve them
using Matlabs ode45 function.
We can then recast the differential equation (8) by defining:
y1 (t) = J

(11)

(12)

y2 (t) = J
4

and by using these, we can recast (8) into two first order differential equations.
By differentiating (11) with respect to time:
y10 (t) = J 0
which by substituting for (12), we get:
y10 (t) = y2 (t)

(13)

The second recast differential equation can be obtained by first differentiating


(12) and then rearranging (8). So by differentiating (11) with respect to time:
y20 (t) = J 00
This can then be substituted into (8) and rearranged to obtain another first
order ODE.
tJ 00 (t) + J 0 (t) + tJ(t) = 0
1
J 00 (t) = J(t) J 0 (t)
t
1
0
y2 (t) = y1 (t) y2 (t)
t

(14)

So we now have a system of first order differential equations, (13) and (14) ,
which can be plotted using the ode45 function in Matlab.
The initial conditions for J(t) and J 0 (t) (equivalent to y1 (t) and y2 (t) respectively) can be found using the Bessel Function (7) and using it to calculate the
values for J(t) and J 0 (t) at a time t = 0, giving us both initial conditions for
y1 (t) and y2 (t).

X
(1)k (0)2k
y1 (0) = J(0) =
=1
(k!)2
k=0

y2 (0) = J 0 (0) =

X
(1)k (0)2k1
k=1

k!(k 1)!

=0

However the issue with starting from t = 0 when solving the differential equation
using Matlab, is that in (14) the coefficient for y2 (t) is 1t , and hence at t = 0
this would make the differential equation (14) undefined. So the system of
differential equations would be only be solvable using Matlabs ode45 function
if the time t = 0 was not included.

2.3

(c)

By using Matlab, we can calculate the values of J(t) and J 0 (t) at a time t = 1,
to an error less than 104 , by using the Bessel function and its first derivative.
The values attained are as follows:
J(1) = 0.765198
J 0 (1) = 0.440050
both having an error less than 104 away from the true values for J(1) and
J 0 (1).

See attached m.files: j iterate.m , bessel.m , bessel diff.m

2.4

(d)

Using the values for J(1) and J 0 (1) in (c), we can use them as initial conditions,
and plot the function J(t) over the interval t  [1, 50].

Figure 3: The Bessel function, over the interval t  [1, 50].


Due to the shape of the graph being very similar to that of a cosine function
with a exponentially decreasing amplitude, we can model it with a function of
the form Ct cos (t + ), for some constants C, and .

Figure 4: Plot of t0.5 cos (t) (C = 1, = 0.5, = 0) (Red) against J(t) (Blue),
over the interval t  [1, 50].

Figure 5: Plot of 0.6t0.7 cos (t 1) (C = 0.6, = 0.7, = 1) (Red) against


J(t) (Blue), over the interval t  [1, 50].

Figure 6: Plot of 0.8t0.5 cos (t 1) (C = 0.8, = 0.5, = 1) (Red) against


J(t) (Blue), over the interval t  [1, 50].
The function 0.8t0.5 cos (t 1), gave us the best approximation over a large
range of t.
See attached m.files: resplot.m , resonance.m

You might also like