numerical computation

Good Essays
DEPARTMENT OF COMPUTER SCIENCE
FACULTY OF INFORMATION TECHNOLOGY AND APPLIED SCIENCES
LEAD CITY UNIVERSITY, IBADAN
FIRST SEMESTER, 2013/2014 ACADEMIC SESSION
LECTURER-IN-CHARGE: PROF. B. A. OLUWADE
CSC 403: NUMERICAL COMPUTATION II (with MATLAB)
TUTORIAL QUESTIONS
1

(a)

What do you understand by the Euler method ?

(b)

Let y/ = 3y + 1 y(0) = 2

be an initial value problem. Using Euler method, present an approximation of y(5) using a step size of 1.
2

(a)

State Simpson’s rule.

(b)
Write MATLAB code for finding the numerical approximation of a definite integral using (a) above.
3

(a)
Write the meaning of the following MATLAB commands and illustrate with at least one example each:
(i)
(ii)
(iii)
(iv)
(v)
(vi)
(vii)
(viii)
(ix)
(x)

ceil (x) round (x) floor (x) fix (x) eye zeros ones rem (x, y) fprintf xlabel ( )

(b)
With the aid of examples, explain the meaning and order of evaluation of arithmetic operators and expressions in MATLAB.

1

(a)

Write a MATLAB code for evaluating sin(x)2 + cos(x)2

(b)

4

Write a MATLAB code for drawing the following : y(x) = sin(3x)
3x
for -5 ≤ x ≤ 15

5
(a)
Write a MATLAB code for finding the approximate solution of an initial value problem using the Euler method.
(b)
The midpoint rule, otherwise referred to as the rectangle method, is an algorithm for computing an approximation to a definite integral by finding the area of a collection of rectangles whose heights are determined by the values of functions within the integral . This rule is given by
≈ (b – a) f a + b
2
where a and b are the endpoints and f(x) is a function. Write a MATLAB code for approximating a definite integral using the rule.
6

(a)

Present a geometrical interpretation of Simpson’s rule.

(b)

Find the numerical approximation of

using Simpson’s rule.
7

The trapezoidal rule is one of the algorithms for finding the approximate solution of a definite

You May Also Find These Documents Helpful

  • Powerful Essays

    Theory of Computation

    • 106491 Words
    • 426 Pages

    INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION MICHAEL SIPSER MassachusettsInstitute of Technology THOMSON COURSE TECHNOLOGY Australia * Canada * Mexico * Singapore * Spain * United Kingdom * United States THOIVISON COURSE TECHNOLOGY Introduction to the Theory of Computation, Second Edition by Michael Sipser Senior Product Manager: Alyssa Pratt Executive Editor: Mac Mendelsohn Associate Production Manager: Aimee Poirier Senior Marketing Manager: Karen Seitz COPYRIGHT…

    • 106491 Words
    • 426 Pages
    Powerful Essays
  • Satisfactory Essays

    Computation Paper

    • 485 Words
    • 2 Pages

    Is the Brain a Computer? To Searle the definition of computation is “defined syntactically in terms of symbol manipulation.” John Searle uses the Chinese Room as an example of a computerized mind. We have to assume that the man in the room, outside from Chinese people, does not know any Chinese. But he has a set of rules that can help him communicate with the Chinese outside. When he stirs up a conversation, does it really mean that he can understand and write Chinese? Or is it just the mind doing…

    • 485 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Computation and Reasoning

    • 1205 Words
    • 5 Pages

    IN1002: Computation & Reasoning Coursework 1: Semantic Networks & Prolog Part I: Algorithms and Prolog a) i) d=1947 i=1, d=1947+11 = 1958 i=2, no change to d i=3, d=1958+11 = 1969 i=4, no change to d i=5, n=8, d=1969+8 = 1977 i=6, n=6, d=1977+6 = 1983 i=7, n=4, d=1983+4 = 1987 Return: d= 1987 ii) d=2007 i=6, d=2007-6 = 2001 i=5, d=2001-8 = 1993 i=4, d=1993-10 = 1983 i=3, no change to d i=2, d=1983-10 = 1973 i=1, no change to d Return: d= 1973 b) Therefore consider…

    • 1205 Words
    • 5 Pages
    Good Essays
  • Better Essays

    Datacube Computation

    • 4285 Words
    • 18 Pages

    Data Cube Computation Overview • Efficient Computation of Data Cubes – General Strategies for Cube Computation – Multiway Array Aggregation for Full Cube Computation – Computing Iceberg Cubes • BUC – High-dimensional OLAP: A Minimal Cubing Approach – Computing Cubes with Complex Conditions • Exploration and Discovery in Multidimensional Databases – Discovery-Driven • Summary General Strategies for Cube Computation • Sorting, hashing, and grouping operations are applied to the…

    • 4285 Words
    • 18 Pages
    Better Essays
  • Satisfactory Essays

    Theory of Computation

    • 1819 Words
    • 8 Pages

    IT-601: THEORY OF COMPUTATION Teaching Scheme Lect 3 Prac 2 Total 5 Int Ass 30 Theory Sem End Marks Hrs 70 3 Examination Scheme Practical Sem Total Int Ass End 100 25 25 Total 50 Grand Total 150 Review Of Mathematical Background: Sets, Functions, Logical statements, Proofs, Relations, Languages, The Principal of Mathematical induction, the strong principle of Mathematical induction, Recursive definitions, Structural Induction. Regular Languages And Finite Automata: Regular expressions, Regular…

    • 1819 Words
    • 8 Pages
    Satisfactory Essays
  • Good Essays

    Numerical methods

    • 2842 Words
    • 12 Pages

    Numerical Methods Questions 1 f(x) = x3 – 2x – 5 a) Show that there is a root β of f(x) = 0 in the interval [2,3]. The root β is to be estimated using the iterative formula ,2 5 2 0 2 1 1 =         =++ x x x n n b) Calculate the values of x1, x2, x3, and x4, giving your answers to 4 sig fig. c) Prove that, to 5 significant figures, β is 2.0946 2 Use the iterative formula n n n cox x x − =+ 1 1 With x1 = 0.5 to find the limit of the sequence x1, x2, x3…

    • 2842 Words
    • 12 Pages
    Good Essays
  • Good Essays

    Computation Of CTC

    • 1672 Words
    • 13 Pages

    COMPUTATION OF CTC & TAKE HOME SALARIES COMPONENTS OF SALARY          Basic Salary HRA DA & FDA Conveyance Allowance Variable pay( monthly) Gratuity? LTA? PF? ESI? Medical Allowance, attire allowance, washing allowance Education allowance, Spl Allowance COMPUTATION OF CTC         Basic Salary, HRA, DA & FDA Conveyance Allowance, Variable pay( monthly) Gratuity, LTA p.a.,Bonus, Extratia Retention/Loyalty Bonus paid annually PF , ESI(employers) Medical Allowance, attire allowance…

    • 1672 Words
    • 13 Pages
    Good Essays
  • Good Essays

    Numerical Precision

    • 1181 Words
    • 5 Pages

    1. Analyze the floating point format IEEE Standard for Binary Floating-Point Arithmetic (IEEE 754) is the most widely-used standard for floating-point computation, and is followed by many CPU and FPU implementations. The standard defines formats for representing floating-point numbers and special values together with a set of floating-point operations that operate on these values. It also specifies four rounding modes and five exceptions (Michael L Overton). 2. How floating point numbers are stored…

    • 1181 Words
    • 5 Pages
    Good Essays
  • Good Essays

    numerical methods

    • 6848 Words
    • 28 Pages

    CHENNAI INSTITUTE OF TECHNOLOGY Sarathy Nagar, Kundrathur, Pudupedu, Chennai– 600 069. Department of Mathematics Subject Name: Numerical Methods Subject Code: MA1251 Unit I 1) Write the Descartes rule of signs Sol: 1) An equation f ( x) = 0 cannot have more number of positive roots than there are changes of sign in the terms of the polynomial f ( x) . 2)An equation f ( x) = 0 cannot have more number of positive roots than there are changes of sign in the terms of the polynomial f…

    • 6848 Words
    • 28 Pages
    Good Essays
  • Good Essays

    Numerical Analysis

    • 6250 Words
    • 25 Pages

    INTERNATIONAL JOURNAL SYSTEMATIC OF BACTERIOLOGY, 1976, p. 146-157 Apr. Copyright 0 1976 International Association of Microbiological Societies Vol. 26, No. 2 Printed in U . S A . Phenotypic Description, Numerical Analysis, and Proposal for an Improved Taxonomy and Nomenclature of the Genus Zymomonas Kluyver and van Niel 1936 J. DE LEY Laboratory of AND J. SWINGS Microbiology and Microbial Genetics, Faculty of Sciences, State University, K . L . Ledeganckstraat 35, B-9000 Gent, Belgium…

    • 6250 Words
    • 25 Pages
    Good Essays