This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: COSC 1002/1902 Computational Science in C Practical 7 This practical session covers the numerical integration of functions by numerical solution of associated ODEs, and the numerical solution of coupled first order ODEs. Before you begin these exercises, you should review the material in lecture 7. You should also download the codes appearing in the lecture notes for lecture 7 ( int sine rk2.c and ode harmonic rk2.c ), which are available from the Codes web page for the unit. Compile and run the codes, and confirm that you obtain the results described in the lecture notes. If you succeed with this then you are ready to begin the exercises. If not consult a tutor, who can provide assistance. The exercises are for students in both units except where indicated (1002 means that the question is just for students in COSC 1002, and 1902 means that the question is just for students in COSC 1902). Remember to have a tutor mark off checkpoints as you reach them. Exercises 1. In 7.1 of the lecture notes a method for performing numerical integration of a function by numerically solving a first order ODE is described. The code int sine rk2.c applies that method to integrate sin( x ) from x = 0 to x = . The integral Z 1 4 1 + x 2 dx = (1) provides a method of calculating . (a) If the integral on the left hand side of Equation (1) is to be evaluated following the proce- dure in 7.1 of the notes, what is the ODE, and what are the initial conditions?...
View Full Document
This note was uploaded on 09/29/2009 for the course COSC 1002 taught by Professor Wheatland during the Three '09 term at University of Sydney.
- Three '09