1. Homepage
2. Exam
3. BSC128 Numerical Methods Practical Test 1

# BSC128 Numerical Methods Practical Test 1

This question has been solved

# Online Practical Test 1

Course Code: BSC128 Course Name: Numerical Methods Question Paper Setter: Liu Meifeng Academic Session: 2023/04 Question Paper:
Total No. of Pages: 3 Time Allocated: 2 hours Additional Materials: - Apparatus Allowed: -

INSTRUCTIONS TO CANDIDATES

2. Read the above information carefully to ensure you have the correct and complete question paper.
4. Please note that presentation of solutions (clarity, coherence, conciseness, and completeness) is important. Show your work and organize your solution. Answer without proper justification may receive less, or even zero credit.
5. Communication between candidates in any means is forbidden. Answers must be entirely individual candidate’s independent effort. If you are found sharing your solutions with other candidates, or suspected of doing so, you would be penalized accordingly.

(Student ID: Full Name: )

## Question 1 (15 marks)

A particle starts at rest on a smooth inclined plane whose angle 𝜃 is changing at a constant rate 𝑑𝜃 𝑑𝑡= 𝜔 < 0, see the figurative illustration below.

## Question 2 (15 marks)

Continue with Question 1. (a) Go to website Octave Online , set the value of 𝑔 as mentioned in Question 1, the value of time 𝑡 to be the last digit of your school ID plus 1 divided by 10, and the value of 𝑦଴ to be the last two digits of your school ID plus 1 divided by 10. For example, if your school ID is CST1709123, then the value of 𝑡 should be 𝑡= 0.4 and the value for 𝑦଴ should be 2.4. [3 marks] (b) Create a function handler named myFunX to express the functions 𝑋(𝜔) as described in Question 1. [3 marks] (c) Suppose the particle mentioned in Question 1 has moved 𝑦଴ ft after 𝑡 second., then you will need to solve an equation in the form 𝑋(𝜔)=𝑦଴. Please define a function handler named myFun to express the equation 𝐹(𝜔) ≡𝑋(𝜔)−𝑦଴= 0, and use Secant method (Algorithm 2.4) to find the rate 𝜔 at which angle 𝜃 changes to within 10ିହ by choosing two appropriate initial guesses. [6 marks] (d) Express your answer in degree measure and compare it with Question 1(c), make your comment on Octave by using %. [3 marks]

## Question 3 (20 marks)

A car traveling along a straight road is clocked at a number of points. The data from the observations are given in the following table, where the time is in seconds, the distance is in feet, and the speed is in feet per second. Time 0 3 5 8 13 Distance 0 225 383 623 993 Speed 75 77 80 74 72

(a) Go to website Octave Online , create three arrays named T, Dist, Speed to store the given data: Time, Distance and Speed, respectively, find the length of the arrays. [4 marks] (b) Apply Neville’s method (Algorithm 3.1) to the given data by constructing a recursive table myQ1 to determine the position of the car when 𝑡= 9.8 seconds. [8 marks] (c) Use the Divided Difference method (Algorithm 3.3) by constructing a recursive table myQ2 to determine the position of the car when 𝑡= 9.8 second. [10 marks] (d) Compare the results obtained by (a) and (b), make your comment on Octave. [2 marks]