SPH 216: SCIENTIFIC COMPUTING LAB II
TUTORIAL I
Question One
a) Consider projectile motion. Show that the maximum height of a projectile is given by
2
(V 0 sin θ0 )
h m=
2g
[6 mks]
where V 0 is the initial velocity, θ0 is the angle of projection and g is the acceleration due to
gravity.
b) Show that the maximum horizontal range is given by
2
V0
Rm =
g
[6 mks]
c) Write a Fortran program that prompts the user for the initial velocity V 0 and prints out the
maximum horizontal range Rm. [8 mks]
Question Two
a) State two graphing utilities found in a Linux distribution. [6 mks]
b) Most programs build with a simple, two command system: ./configure and make
Explain the functions of the two commands. [6 mks]
c) You are supplied with a source code in the form of a compressed tar file, say
[Link]. Explain the steps you would follow to manually install/build the program into
your system. [8 mks]
Question Three
a) Consider a particle in a one-dimensional box of length L.
b) State the two boundary conditions. [6 mks]
c) State the time-dependent Schrödinger equation for the particle. [5 mks]
d) Using the boundary conditions in a) i) show that the Schrödinger equation reduces to
2
−ℏ2 d ψ ( x )
=Eψ(x )whose general solution is
2 m dx 2
ψ ( x )=Asin ( kx ) +Bcos (kx )
where A, B and K are constants, ℏ is the Plank’s constant, m is the mass of the particle and E
is the energy of the particle.[5 mks]
e) Applying the boundary conditions in a) i) show that the wave function reduces to
ψ ( x )=Asin (kx)
[4 mks],
Question Four [8 mks]
Define the following terms as applied in computer programming
i) Compiler
ii) Interpreter
iii) Hybrid translator
iv) Assembler