Review for exam, PHY301 - Fall 2003
Due: Nov 21
Write well commented and
structured C++ code to do the following. You are encouraged to
refer to and use any useful parts of the
code you developed in worksheets 1->4.
The lab exam will be like this - you will have 1 hr
The lab exam is scheduled for 3:30pm Thursday Dec 4
PROBLEM 1. Find and print the sum of the first 200 integers.
PROBLEM 2. Use the trapezoid rule to evaluate the
integral.
|
(1) |
PROBLEM 3. Find the product of two matrices:
|
(2) |
and,
|
(3) |
PROBLEM 4. Use the Runga Kutta code you developed
to integrate the equation
|
(4) |
over a timespan of 10 seconds,
for the case b=0.01, ,
f(t) = Sin(t). Plot your result
using xmgrace. Can you give a physical meaning to this equation
and to b,
and
f(t)?