Information Technology Reference
In-Depth Information
Exercise 6.8. Suppose we have a differential equation on the form
u 0 .t / D f. u ;t/;
u .0/ D U 0 ;
that is, f can be an explicit function of t .Asimpleexampleis f. u ;t/D2t u ,
with the corresponding solution u D e t 2 .
Understand the idea behind the derivation of Heun's method, and use this under-
standing to generalize Algorithm 6.12 such that it works for the right-hand side
functions f. u ;t/ in the above differential equation.
˘
6.7
Projects
6.7.1
Computing the Volume of a Cylindrical Container
The purpose of this project is to compute the volume of water in a cylindrical
container. An example of such a container is given in Fig. 6.3 . The radius of the
container can change along the center axis, and is given by a function R.x/ . Water
is stored in the container up to a height H . The goal is to develop a program that
can compute the water volume in such a container, given the function R.x/ and the
parameter H as input.
10
x
6
5
H
3
R(x)
Fig. 6.3 Sketch of a
cylindrical container with
circular cross section and
radius R.x/ . The container
contains water up to a
height H
0
1
3
0
 
Search WWH ::




Custom Search