Chapter - 2 Complexity of Algorithms for Iterative Solution of Non-Linear Equations

Size: px
Start display at page:

Download "Chapter - 2 Complexity of Algorithms for Iterative Solution of Non-Linear Equations"

Transcription

1 Chapter - Compleity of Algorithms for Iterative Solution of Non-Linear Equations

2 Compleity of Algorithms for Iterative CHAPTER - Compleity of Algorithms for Iterative Solution of Non-Linear Equations.1 Introduction Computational compleity can be defined as a function of the size of input resources required for computation Michael (8. The running time of an algorithm or data structure operation typically depends on number of factors lie input size, hardware and software used Thomas (11. We can study its running time on various inputs and recording the actual time spent in each eecution. Such measurement can be taen in an accurate manner by using system calls built in language for which algorithm is written. In general, we are interested in determining the dependency of running time on size of input. In order to determine this, we can perform several eperiments on many different test inputs of various sizes. Very often engineering and mathematics, a non-linear equation are solved using iterative methods. The Bisection Method by Mathew (199 is among the few iterative methods which guarantee convergences. Here we will present the algorithm for Bisection method and then find the compleity for it. In this chapter algorithms for Bisection, Secant, Regula-Falsi, and Newton Rapson and Adaptive Bisection method for find the roots of non-linear equation is studied for their compleity. Using RAM (Random Access Machine model the compleity of all algorithms are calculated. The compleity can represent in the form of Big-Oh notation in term of time function. All algorithms have the same compleity O (n, so that less number of iteration algorithm will eecute faster. Adaptive Bisection method is used to find the roots in less number of iteration so its time compleity will better and eecuter faster..1.1 RAM Machine Model Definition An approach of simply counting primitive operations given rise to a computational model called Random Access Machine (RAM Goodrich (8 defines a set of high level primitive operations that are largely independent from

3 Compleity of Algorithms for Iterative... programming language used and can be defined also in the pseudo-code. Primitive operation include following: 1. Assigning the value to variable.. Calling a method 3. Performing an arithmetic operation 4. Comparing two numbers 5. Indeing into array. 6. Following an object reference 7. Returning from a method. Specifically, a primitive operation corresponds to low-level instruction with an eecution time that depends on the hardware and software environment but is nevertheless constant. Instead of trying to determine the specific eecution time of each primitive operation are eecuted, and use this number t as high level estimate of the running time of algorithm. We assume the CPU in RAM model can perform any primitive operation in constant number of steps, which do not depend on the size of the input. Thus an accurate bound on the number of primitive operations an algorithm performs corresponds directly to the running time of that algorithm in the RAM model..1. Counting Primitive Operation We now show to count the number of primitive operations eecuted by an algorithm, used for all non linear iterative methods. We do this analysis by focusing on each step of the algorithm and counting primitive operation that it taes, taing into consideration that some operation are repeated, because they are enclosed in the body of a loop..1.3 Asymptotic Notation We have clearly gone into detail for evaluating the running time of such simple algorithm. Such an approach would clearly prove cumbersome if we had to perform it for more complicated algorithms. In general, each step is pseudo-code description and each statement in a high level language implementation corresponds to small number of primitive operations that does not depend on input size. Thus we can perform a simplified analysis that estimates the number of primitive operation

4 Compleity of Algorithms for Iterative... 1 eecuted up to a constant factor, by counting the steps of pseudo-code or the statements of high level language eecuted. Fortunately, there is a notation that allow us to characterize the main factor affecting an algorithm s running time without going into all detail of eactly how many primitive operations are performed for each constant time of instructions.1.4 The Big-Oh Notation Let f ( n and g( n be functions mapping non-negative integers to real numbers. We say that f ( n is O ( g( n if there is a real constant c > and an integer constant n >= 1 such that f ( n <= c( g( n for every integer n >= n. This definition is referred to as big-oh notation. Alternatively, we can also say is order g( n defined by Goodrich (8. f ( n. Bisection Method Mathews (199 shows that the Bisection Method is among few iterative methods which guarantee convergence which is in linear rate. If a function f ( a continues function between a and b and f ( a and f ( b are opposite sign such that f(a f(b<, then there eist at least one zero r for f on ( a, b. If [ a, b ] is used is as the initial interval, then the bisection algorithm generates a sequence intervals on which the root lies. [ a, b ] of Convergences are reached when [ b a ] less than some tolerance, say ε is...1 Algorithm for Bisection Method a Let the root of with a prescribed tolerance say epsilon. Given that and b such that f (a f (b <. The value c is used to store the middle point of the interval. 1. Read a, b. Read Epsilon f ( = 3. Repeat step 4 to 5 while ( ( a b a <Epsilon and ( f ( c

5 Compleity of Algorithms for Iterative Set c = ( a + b 5. If ( f (a f (c < then Set b Elses Set a = c End if 6. Write Approimate root is, 7. End = c c.. Counting Primitive Operation 1. Reading the value of variable a, b contributes two unit of count.. Reading the value of epsilons contributes one unit of count. ( a, b 3. Before entering the body of loop condition < epsilon is verified. a This action corresponds to three (one for subtraction, one for division and one for comparison primitive operation and performed n times. 4. At the beginning of loop c is calculated. This action correspond to eecuting three primitive operation. 5. In the body of the loop, condition f (a f (b < is verified. This action corresponds to eecuting four unit of operation (one for multiplication and one for verification the condition. 6. As per result of verification one assignment statement will eecute requires one operation. 7. The body of loop is eecuted n times. Hence, at each iteration of loop, eleven primitive operations is performed 11n times. 8. Printing the value of requires one operation. To summarize, the number of primitive operations t (n eecuted by algorithm is at least. C t( n = ( n + 1 t( n = 11n + 4

6 Compleity of Algorithms for Iterative The Big-Oh Notation By the big-oh notation, we need to find a real constant and an integer constant n >= 1 such that 11n + 4 = cn for every integer n >= n. It is easily see that a possible choice is c=15 and n=1. The big- Oh notation allows us to say that a function of n is less than or equal to another function (by the equality <= in the definition, up to constant factor infinitely (by the statement definition. in the The number of primitive operations eecuted by algorithm for Bisection method is at most 11n + 4. We may therefore apply the big-oh notation with and n = and conclude the running time of algorithm in O( n. 1 c < n >= n = O( n So the compleity of algorithm used for Bisection method is O( n. In fact, any polynomial a n +a -1 n -1 +a will always be O( n. #include<math.h> #include<stdlib.h> //#define f( for which root is required #include<conio.h> void main ( int i; float, 1, e,, s; clrscr (; printf ("\n Enter first point of interval"; /* reading initial values*/ pcanf ("%f", &; printf ("Enter the second point of interval"; scanf ("%f", &1; printf ("Enter the prescribed tolerance"; /* Reading tolerance*/ scanf ("%f", &e; i=; if (f(*f(1>

7 Compleity of Algorithms for Iterative... 4 printf ("Starting values are unsuitable"; getch (; eit (1; while (fabs ((1-/>e =(+1/; /* middle value*/ i++; /* Iteration counter*/ if (f(*f(> =; else 1=; /* End of While loop*/ printf ("\Solution convergence to root"; printf ("No of iteration: %d",i; printf ("\n Root is %f, function value is%f",,f(; getch (;..4 Result The following table shows results of few functions and their number of iterations to find the root of equations: Table.1: Bisection Method Function Initial Intervals No of Iteration n 11n+4 for c=15 f ( = e 3 f 3 ( = 1 f ( = ( + 3 f ( = cos( e f ( = e 1 f 3 ( = + [1,] 11 +4< 15 [-,] 11 +4<= 15 [-4,-1] <=3 115 [,1] <=17 15 [-1,] <=19 15 [-,-] <=19 15

8 Compleity of Algorithms for Iterative Regula-Falsi method A way to avoid such pathology is to ensure that the root is braceted between the two starting values and remains between the successive pairs. When this is done, the method is nown as linear interpolation or method of false position. This technique is similar to bisection ecept the net iterate is taen at the intersection of a line between the pair of -values and the -ais is rather than at the midpoint..3.1 Algorithm for Regular False method 1. Read,,Epsilon. Repeat 3. Set f ( 1 ( 1 = 1 ( f ( f ( 4. If f ( is opposite sign to f ( then Set Else Set 5. End if 1 = 1 = 6. Until absolute f ( <tolerance value 7. Print Approimation root is,.3. Counting primitive operations 1 1. Reading the value of variable, contributes two unit of count.. Reading the value of epsilons contributes one unit of count. 3. As per result of verification one is calculated using 9 operations 4. The condition f f < contributes 3 operation. ( ( 5. One operation for assignment statement after the condition. 6. In the body of the loop, condition fabs( > is verified. This action corresponds to eecuting two unit of operation (one for for verification the condition. and one 7. The body of loop is eecuted n times. Hence, at each iteration of loop, [9+3+1+] 15 primitive operations is performed 15n times. 8. Printing the value of requires one operation. 1 f (

9 Compleity of Algorithms for Iterative... 6 To summarize, the number of primitive operations t (n eecuted by algorithm is at least. t(n = +1+15n + 1 = 14n The Big-Oh Notation By the big-oh notation, we need to find a real constant and an integer constant n > such that for every integer n >= n. It is easily see that a possible choice is c=19 and n = 1. The big- Oh notation allows us to say that a function of n is less than or equal to another function (by the equality <= in the definition, up to constant factor infinitely (by the statement n >= n c > in the definition. The number of primitive operations eecuted by algorithm for Regula-Falsi method is at most 15n+4. We may therefore apply the big-oh notation with c=19 and n = and conclude the running time of algorithm in O( n. 1 So the compleity of algorithm used for Regula-Falsi method is O( n. #include<stdio.h> #include<conio.h> #include<math.h> #include<stdlib.h> //#define f( for which to find the roots void main( float,1,,e; int i=; printf("enter Initial roots, and tolerance factor"; scanf("%f %f %f",&,&1,&e; if((f(*f(1>. printf("initial roots are unsuitable"; eit(1;

10 Compleity of Algorithms for Iterative... 7 getch(; While(while(fabs(f(>e i++; =1-f(1*(-1/(f(-f(1; if((f(*f(< 1=; else =; printf(" root is %f and no of iteration=%d and f(=%f",,i,f(; getch(; Enter Initial roots, and tolerance factor -.1 Root a and no of iteration= and f( =.3.4 Result The following table shows results of few functions and their number of iterations to find the root of equations: Table-.: Regula Falsi Method Function Initial Intervals No of Iteration n 15n + 4 for C=19 f ( = e 3 f = 3 ( 1 f = + ( ( 3 f ( = cos( e f ( = e 1 f = + 3 ( [1,] <19 18 [-,] < 18 [-4,-1] <3 18 [,1] <13 18 [-1,] <38 18 [-,] <19 18

11 Compleity of Algorithms for Iterative The Secant method The Secant method begins by finding two points on curve of f (, hopefully near to the root we see. If f ( were truly linear, the straight line would intersect at the -ais at root. But f ( will never be eactly linear because we would never use a root finding method on a linear function. That means the intersection of the line with -ais is not at =r but that it should be close to it. From the obvious similar tingle we can write ( 1 ( 1 =. f ( f ( f ( 1 1 And from this solve from = 1 ( 1 f ( f ( 1 Because f ( is not eactly linear is not equal to r but it should closer than either of the two points we begin with. If we repeat this we have: ( ( n 1 n n+ 1 = n f ( n. f ( f ( ( n 1 Because each newly computed value should be nearer to the root, we can do it easily after second iterate has been computed, by always using the last two computed points. But after the first point there aren t two last computed points. So we mae sure to start with 1 closer to the root than by testing and swapping if first functional value is smaller. n f ( and f ( Algorithm for Secant method 1. Read 1 e,n // that are near to the root to determine a root of f ( o,. If f ( < f ( 1 then swap 1 //interchange with 3. Repeat step 4 to 6 until f ( < c tolerance o, 1 4. Set 5. Set f ( 1 ( 1 = 1 ( f ( f ( = 1 1

12 Compleity of Algorithms for Iterative Set = 1 7. Print root is 8. End.4. Counting primitive operations 1. Reading the value of variable,, e, n contributes four unit of count.. Step requires four units of count. 3. In the body of loop is calculated, it requires nine operations To compute and contributes two operations. 5. The condition fabs( f ( < e contributes 3 operation. And hence the body of loop will eecute n times, so (9++3n=14n 6. Printing the value of requires one operation. To summarize, the number of primitive operations t (n eecuted by algorithm is at least. t(n = n + 1 = 14n The Big-Oh Notation By the big-oh notation, we need to find a real constant and an integer constant n >= 1 such that 14n + 9 <=c n for every integer n >= n. It is easily see that a possible choice is c=3 and n =. The big- Oh notation allows us to say that a function of n is less than or equal to another function (by the equality <= in the definition, up to constant factor infinitely (by the statement definition. 1 in the The number of primitive operations eecuted by algorithm for Secant method is at most 14n+9. We may therefore apply the big-oh notation, with c=3 and n = and conclude the running time of algorithm in O( n. 1 c > n >= n So the compleity of algorithm used for Secant method is O( n.

13 Compleity of Algorithms for Iterative... 3 // Define function f(=**-*-5 // df(=3*.*- #include<stdlib.h> #include<stdio.h> #include<conio.h> #include<math.h> //#define f( for which roots are to be calculated //#define df( for above eample void main( float,1,e,ep,delta; int ma_iter,i; printf("enter Initial roots, maimum no of iteration and tolerance factor"; scanf("%f %d %f",&,&ma_iter,&e; printf("enter delta"; scanf("%f",δ for(i=1;i<ma_iter;++i if(fabs(df(<delta printf("\n slope is too small"; getch(; eit(1; 1=-(f(/df(; ep=fabs((1-/1; =1; if((ep<=e printf("solution is convergence\n"; printf("no of iteration=%d",i; printf("\n Root of the given equation is=%8.3f\n",1;

14 Compleity of Algorithms for Iterative getch(; eit(1; getch(; Run Enter Initial roots, maimum no of iteration and tolerance factor 1.1 Enter delta.1 Solution is conversance No of iteration=7 Root of the given equation is= Result The following table shows results of few functions and their number of iterations to find the root of equations: Table-.3: Secant Method Function Initial Intervals No of Iteration n 14n+9<cn for c=3 f ( = e 3 f 3 ( = 1 f ( = ( + 3 f ( = cos( e f ( = e 1 f 3 ( = + [1,] <3 9 [-,] < 15 [-4,-1] < 15 [,1] < 15 [-1,] < 15 [-,] < 15

15 Compleity of Algorithms for Iterative Newton Rapson Method This method is based on a linear approimation of the function but does not so using a tangent to the curve. Starting from a single initial value that is not too far from a root we move along the tangent to its intersection with -ais, and tae that the net approimation. This is continued until either the successive -values are sufficiently close or the value of the function is sufficiently near zero. The general terms = n+ 1 n f ( n f '( n For n=, 1,, Algorithm for Newton Rapson method To determine a root of 1. Read, e. Compute 3. If ( f ( and ( f '( then 4. Repeat step 5 and 6 5. Set 6. Set = 1 = f ( f '( f ( = f (, f '( 7. Until (Absolute ( < e 1, given reasonably close to the root 8. Print Approimation value of root is, 1 9. End if.5. Counting primitive operations 1. Reading the value of variable e contributes two unit of count.. To compute f (, f '( and compare with contributes four operations To compute contributes one unit to count.,

16 Compleity of Algorithms for Iterative To compute contributes five operations. 5. To chec the condition Absolute ( < e contributes three operations The loop is eecuted n times, so (1+5+3 operations are eecuted 9n times. 7. Printing the value of requires one operation. 1 To summarize, the number of primitive operations t (n eecuted by algorithm is at least. t( n = n + 1 t( n = 9n The Big-Oh Notation By the big-oh notation, we need to find a real constant and an integer constant n >= 1 such that 9n + 7 <= cn for every integer n >= n. It is easily see that a possible choice is c=16 and n =. The big- Oh notation allows us to say that a function of n is less than or equal to another function (by the equality <= in the definition, up to constant factor infinitely (by the statement definition. 1 in the The number of primitive operations eecuted by algorithm for Secant method is at most 9n+7. We may therefore apply the big-oh notation with c=16 and n = and conclude the running time of algorithm in O( n. 1 c > n >= n. So the compleity of algorithm used for Newton Rapson method is O( n. #include<stdlib.h> #include<stdio.h> #include<conio.h> #include<math.h> #define f( for which to find roots #define df( (for above eample void main( float,1,e,ep,delta; int ma_iter,i;

17 Compleity of Algorithms for Iterative printf("enter Initial roots, maimum no of iteration and tolerance factor"; scanf("%f %d %f",&,&ma_iter,&e; printf("enter delta"; scanf("%f",δ for(i=1;i<ma_iter;++i if(fabs(df(<delta printf("\n slope is too small"; getch(; eit(1; 1=-(f(/df(; ep=fabs((1-/1; =1; if((ep<=e printf("solution is convergence\n"; printf("no of iteration=%d",i; printf("\n Root of the given equation is=%8.3f\n",1; getch(; eit(1; getch(; Run Enter Initial roots, maimum no of iteration and tolerance factor 1.1 Enter delta.1 Solution is conversance No of iteration=7 Root of the given equation is=.94545

18 Compleity of Algorithms for Iterative Result Table-.4: Newton Rapson Method Function Initial Intervals No of Iteration n 9n+7<cn f ( = e 3 f = 3 ( 1 f = + ( ( 3 f ( = cos( e f ( = e 1 f = + 3 ( [1,] <16 4 [-,] <16 18 [-4,-1] <16 5 [,1] <16 18 [-1,] <16 1 [-,] <16 5ss.6 Adaptive Weighted Bisection Method (AWBM Let f be continuous and twice differentiable over the interval [ a, b] and f (a f (b < such that there eist a number r [a, b] where f ( r = and f "( r if we define the sequence C ; K =,1,... as Dauhoo M.Z (3 C = b f ( c < ζ (i opt C = b + W ( a b Where 1 If [ a, b] < < 1 W opt 1 W = Otherwise Where both f '( and "( are of the same sign for all a, b. f [ ] (ii opt C = a + W ( b a Where W f ( b = ( a b if < W < 1 opt 1 W = Otherwise

19 Compleity of Algorithms for Iterative Where both f '( and "( are of the same sign for all a, b Then for a given ε> there eist a natural number N such that for K > N, s f ( c < <ε f [ ].6.1 Algorithm for Adaptive Weighted Bisection Method 1. Read a, b such that f a f ( < ( b. If both f '( b and f "( b are the same sign f ( b Compute W = f '( b for =, 1, ( a b Choose opt W such that If W > and W < 1 then W Else Calculate Else opt f ( a Compute W = f '( a for =, 1, ( b a If W > and W < 1 then W Else opt Calculate c = a + W ( b a End if 3. If f ( c tolerance then r = c algorithm terminates. 4. If f a f ( c < then Else 5. Eit opt 1 W =. opt 1 W =. ( opt opt c = b + W ( a b Go to step [ a, b ] [ c, b ] Go to step. opt < [ a, b ] [ a, b ] = = = W = W

20 Compleity of Algorithms for Iterative Counting Primitive Operation 1. Reading the value of variable a, b contributes two unit of count. Reading the value of epsilons contributes one unit of count. 3. At the beginning of loop sign of f '( b and f ''( b compared. This action corresponds to eecuting three primitive operation. 4. In the loop is calculated using assignment it taes one operation. opt 5. Is compared with 1 and then chooses requires three operations. W 6. C is compared with e needs one operation and assigning C to r requires W one operation, so two more operation is required 7. At end f ( a and f ( c is calculated and compared with need one operation and then two more assignment are required for a and b, total five operation is required. 8. The loop eecuted n+1 times. Hence each iteration of loop, 1 primitive operations is performed. To summarize, the number of primitive operations t (n eecuted by algorithm is at least. 3+1(n+1 1n+15 W.6.3 The Big-Oh Notation By the big-oh notation, we need to find a real constant c> and an integer constant n >=1 such that 1n+15 <= for every integer n >= n. It is easily see that a possible choice is c=7 and n =1. The big Oh notation allows us to say that a function of n is less than or equal to another function (by the equality <= in the definition, up to constant factor infinitely (by the statement definition. in the The number of primitive operations eecuted by algorithm for adaptive Bisection method is at most 1n+15. We may therefore apply the big Oh definition with c=7 and n = 1 cn and conclude the running time of algorithm is O (n. So the compleity of algorithm used for Adaptive Bisection method is O (n. n >= n

21 Compleity of Algorithms for Iterative Program in C for Adaptive Bisection method for f( = 3 + #include<stdio.h> #include<math.h> #include<stdlib.h> //#define f( (for which to find root //#define f1( for above eample //#define f11(for above eample #include<conio.h> void main( int i,; float r, a, b, c, e, s, w, wopt; clrscr (; printf ("\nenter first point of interval"; scanf ("%f", &a; printf ("Enter the second point of interval"; scanf ("%f", &b; printf ("Enter the prescribed tolerance"; scanf ("%f", &e; s=f (a*f (b; if(s> printf ("Starting values are unsuitable"; getch (; eit (1; for (=;;++ if(((f1(b<&&(f11(b< ((f1(b> && (f11(b> w=-1*(f (b/((a-b*f1(b; if((w> && (w<1 wopt=w; else Wopt=1/.;

22 Compleity of Algorithms for Iterative c=b+wopt*(a-b; else w=-1*f(a/((b-a*f1(a; if ((w> && (w<1 wopt=w; else wopt=1./.; c=a+wopt*(b-a; if (fabs(f(c<.1 r=c; printf ("Root is %f",r; printf ("No of iteration is %d",+1; getch (; eit (1; if (f (a*f (c < b=c; else a=c; Run: Input: Enter first point of interval:- Enter second point of interval:-1 Enter prescribed tolerance:-1 Output Root is:-1.5 Number of iteration: 5.

23 Compleity of Algorithms for Iterative Result Function f ( = e 3 f = 3 ( 1 f = + ( ( 3 f ( = cos( e f ( = e 1 f = + 3 ( Table -.5: Results of some various functions Initial Intervals Bisection O(n Adaptive Bisection O(n No of Iteration n Secant Method O(n False Method O(n Newton Rapson method O(n [1,] [-,] [-4,-1] [,1] [-1,] [-,] Conclusion: In order to compare the adaptive Bisection method with Bisection method, Secant method, Regula False method and Newton Rapson method a variety of functions are used with same criteria i.e The time compleity of all algorithms are O( n where n is number of iteration. The table.5 shows that for function f = + ( ( 3 the number of iteration in Bisection methods are 3 while in adaptive Bisection method is 5. Since time compleity of both algorithms are O( n, so adaptive bisection algorithm will eecute faster to compare Bisection method and it will tae less time. Similarly the same result shows for function f ( = e 1.The following graphs shows the value of root for f ( = ( + 3 and f ( = e 1.

Graphing Functions. 0, < x < 0 1, 0 x < is defined everywhere on R but has a jump discontinuity at x = 0. h(x) =

Graphing Functions. 0, < x < 0 1, 0 x < is defined everywhere on R but has a jump discontinuity at x = 0. h(x) = Graphing Functions Section. of your tetbook is devoted to reviewing a series of steps that you can use to develop a reasonable graph of a function. Here is my version of a list of things to check. You

More information

COURSE: NUMERICAL ANALYSIS. LESSON: Methods for Solving Non-Linear Equations

COURSE: NUMERICAL ANALYSIS. LESSON: Methods for Solving Non-Linear Equations COURSE: NUMERICAL ANALYSIS LESSON: Methods for Solving Non-Linear Equations Lesson Developer: RAJNI ARORA COLLEGE/DEPARTMENT: Department of Mathematics, University of Delhi Page No. 1 Contents 1. LEARNING

More information

Computers in Engineering Root Finding Michael A. Hawker

Computers in Engineering Root Finding Michael A. Hawker Computers in Engineering COMP 208 Root Finding Michael A. Hawker Root Finding Many applications involve finding the roots of a function f(x). That is, we want to find a value or values for x such that

More information

Worksheet A GRAPHS OF FUNCTIONS

Worksheet A GRAPHS OF FUNCTIONS C GRAPHS F FUNCTINS Worksheet A Sketch and label each pair of graphs on the same set of aes showing the coordinates of any points where the graphs intersect. Write down the equations of any asymptotes.

More information

CS 450: COMPUTER GRAPHICS RASTERIZING LINES SPRING 2016 DR. MICHAEL J. REALE

CS 450: COMPUTER GRAPHICS RASTERIZING LINES SPRING 2016 DR. MICHAEL J. REALE CS 45: COMPUTER GRAPHICS RASTERIZING LINES SPRING 6 DR. MICHAEL J. REALE OBJECT-ORDER RENDERING We going to start on how we will perform object-order rendering Object-order rendering Go through each OBJECT

More information

Reals 1. Floating-point numbers and their properties. Pitfalls of numeric computation. Horner's method. Bisection. Newton's method.

Reals 1. Floating-point numbers and their properties. Pitfalls of numeric computation. Horner's method. Bisection. Newton's method. Reals 1 13 Reals Floating-point numbers and their properties. Pitfalls of numeric computation. Horner's method. Bisection. Newton's method. 13.1 Floating-point numbers Real numbers, those declared to be

More information

TABLE OF CONTENTS CHAPTER 1 LIMIT AND CONTINUITY... 26

TABLE OF CONTENTS CHAPTER 1 LIMIT AND CONTINUITY... 26 TABLE OF CONTENTS CHAPTER LIMIT AND CONTINUITY... LECTURE 0- BASIC ALGEBRAIC EXPRESSIONS AND SOLVING EQUATIONS... LECTURE 0- INTRODUCTION TO FUNCTIONS... 9 LECTURE 0- EXPONENTIAL AND LOGARITHMIC FUNCTIONS...

More information

u u 1 u (c) Distributive property of multiplication over subtraction

u u 1 u (c) Distributive property of multiplication over subtraction ADDITIONAL ANSWERS 89 Additional Answers Eercises P.. ; All real numbers less than or equal to 4 0 4 6. ; All real numbers greater than or equal to and less than 4 0 4 6 7. ; All real numbers less than

More information

(ii) Use Simpson s rule with two strips to find an approximation to Use your answers to parts (i) and (ii) to show that ln 2.

(ii) Use Simpson s rule with two strips to find an approximation to Use your answers to parts (i) and (ii) to show that ln 2. C umerical Methods. June 00 qu. 6 (i) Show by calculation that the equation tan = 0, where is measured in radians, has a root between.0 and.. [] Use the iteration formula n+ = tan + n with a suitable starting

More information

PROGRAMMING IN C LAB MANUAL FOR DIPLOMA IN ECE/EEE

PROGRAMMING IN C LAB MANUAL FOR DIPLOMA IN ECE/EEE PROGRAMMING IN C LAB MANUAL FOR DIPLOMA IN ECE/EEE 1. Write a C program to perform addition, subtraction, multiplication and division of two numbers. # include # include int a, b,sum,

More information

Subject: Fundamental of Computer Programming 2068

Subject: Fundamental of Computer Programming 2068 Subject: Fundamental of Computer Programming 2068 1 Write an algorithm and flowchart to determine whether a given integer is odd or even and explain it. Algorithm Step 1: Start Step 2: Read a Step 3: Find

More information

CS321 Introduction To Numerical Methods

CS321 Introduction To Numerical Methods CS3 Introduction To Numerical Methods Fuhua (Frank) Cheng Department of Computer Science University of Kentucky Lexington KY 456-46 - - Table of Contents Errors and Number Representations 3 Error Types

More information

Limits. f(x) and lim. g(x) g(x)

Limits. f(x) and lim. g(x) g(x) Limits Limit Laws Suppose c is constant, n is a positive integer, and f() and g() both eist. Then,. [f() + g()] = f() + g() 2. [f() g()] = f() g() [ ] 3. [c f()] = c f() [ ] [ ] 4. [f() g()] = f() g()

More information

Your favorite blog : (popularly known as VIJAY JOTANI S BLOG..now in facebook.join ON FB VIJAY

Your favorite blog :  (popularly known as VIJAY JOTANI S BLOG..now in facebook.join ON FB VIJAY Course Code : BCS-042 Course Title : Introduction to Algorithm Design Assignment Number : BCA(IV)-042/Assign/14-15 Maximum Marks : 80 Weightage : 25% Last Date of Submission : 15th October, 2014 (For July

More information

MA123, Chapter 6: Extreme values, Mean Value Theorem, Curve sketching, and Concavity

MA123, Chapter 6: Extreme values, Mean Value Theorem, Curve sketching, and Concavity MA123, Chapter 6: Etreme values, Mean Value Theorem, Curve sketching, and Concavit Chapter Goals: Appl the Etreme Value Theorem to find the global etrema for continuous function on closed and bounded interval.

More information

Numerical Method (2068 Third Batch)

Numerical Method (2068 Third Batch) 1. Define the types of error in numerical calculation. Derive the formula for secant method and illustrate the method by figure. There are different types of error in numerical calculation. Some of them

More information

Today s class. Roots of equation Finish up incremental search Open methods. Numerical Methods, Fall 2011 Lecture 5. Prof. Jinbo Bi CSE, UConn

Today s class. Roots of equation Finish up incremental search Open methods. Numerical Methods, Fall 2011 Lecture 5. Prof. Jinbo Bi CSE, UConn Today s class Roots of equation Finish up incremental search Open methods 1 False Position Method Although the interval [a,b] where the root becomes iteratively closer with the false position method, unlike

More information

f( x ), or a solution to the equation f( x) 0. You are already familiar with ways of solving

f( x ), or a solution to the equation f( x) 0. You are already familiar with ways of solving The Bisection Method and Newton s Method. If f( x ) a function, then a number r for which f( r) 0 is called a zero or a root of the function f( x ), or a solution to the equation f( x) 0. You are already

More information

The Limit Concept. Introduction to Limits. Definition of Limit. Example 1. Example 2. Example 3 4/7/2015

The Limit Concept. Introduction to Limits. Definition of Limit. Example 1. Example 2. Example 3 4/7/2015 4/7/015 The Limit Concept Introduction to Limits Precalculus 1.1 The notion of a it is a fundamental concept of calculus. We will learn how to evaluate its and how they are used in the two basic problems

More information

Limits and Derivatives (Review of Math 249 or 251)

Limits and Derivatives (Review of Math 249 or 251) Chapter 3 Limits and Derivatives (Review of Math 249 or 251) 3.1 Overview This is the first of two chapters reviewing material from calculus; its and derivatives are discussed in this chapter, and integrals

More information

Section 2.5: Continuity

Section 2.5: Continuity Section 2.5: Continuity 1. The Definition of Continuity We start with a naive definition of continuity. Definition 1.1. We say a function f() is continuous if we can draw its graph without lifting out

More information

9.1 Bracketing and Bisection

9.1 Bracketing and Bisection 350 Chapter 9. Root Finding and Nonlinear Sets of Equations for (i=1;i

More information

Solution Set(Reference Book - Programming with c By Byron Gottfried Thrid Edition)

Solution Set(Reference Book - Programming with c By Byron Gottfried Thrid Edition) (2½ Hours) [Total Marks: 75 N. B.: (1) All questions are compulsory. (2) Make suitable assumptions wherever necessary and state the assumptions made. (3) Answers to the same question must be written together.

More information

2.1. Definition: If a < b, then f(a) < f(b) for every a and b in that interval. If a < b, then f(a) > f(b) for every a and b in that interval.

2.1. Definition: If a < b, then f(a) < f(b) for every a and b in that interval. If a < b, then f(a) > f(b) for every a and b in that interval. 1.1 Concepts: 1. f() is INCREASING on an interval: Definition: If a < b, then f(a) < f(b) for every a and b in that interval. A positive slope for the secant line. A positive slope for the tangent line.

More information

Now each of you should be familiar with inverses from your previous mathematical

Now each of you should be familiar with inverses from your previous mathematical 5. Inverse Functions TOOTLIFTST: Knowledge of derivatives of basic functions, including power, eponential, logarithmic, trigonometric, and inverse trigonometric functions. Now each of you should be familiar

More information

( ) 2. Integration. 1. Calculate (a) x2 (x 5) dx (b) y = x 2 6x. 2. Calculate the shaded area in the diagram opposite.

( ) 2. Integration. 1. Calculate (a) x2 (x 5) dx (b) y = x 2 6x. 2. Calculate the shaded area in the diagram opposite. Integration 1. Calculate (a) ( 5) d (b) 4 + 3 1 d (c) ( ) + d 1 = 6. Calculate the shaded area in the diagram opposite. 3. The diagram shows part of the graph of = 7 10. 5 = + 0 4. Find the area between

More information

Scan Conversion. CMP 477 Computer Graphics S. A. Arekete

Scan Conversion. CMP 477 Computer Graphics S. A. Arekete Scan Conversion CMP 477 Computer Graphics S. A. Areete What is Scan-Conversion? 2D or 3D objects in real world space are made up of graphic primitives such as points, lines, circles and filled polygons.

More information

Section 1: Limits and Continuity

Section 1: Limits and Continuity Chapter The Derivative Applied Calculus 74 Section 1: Limits and Continuity In the last section, we saw that as the interval over which we calculated got smaller, the secant slopes approached the tangent

More information

The Bisection Method versus Newton s Method in Maple (Classic Version for Windows)

The Bisection Method versus Newton s Method in Maple (Classic Version for Windows) The Bisection Method versus (Classic Version for Windows) Author: Barbara Forrest Contact: baforres@uwaterloo.ca Copyrighted/NOT FOR RESALE version 1.1 Contents 1 Objectives for this Lab i 2 Approximate

More information

Calculus I (part 1): Limits and Continuity (by Evan Dummit, 2016, v. 2.01)

Calculus I (part 1): Limits and Continuity (by Evan Dummit, 2016, v. 2.01) Calculus I (part ): Limits and Continuity (by Evan Dummit, 206, v. 2.0) Contents Limits and Continuity. Limits (Informally)...............................................2 Limits and the Limit Laws..........................................

More information

Polynomial Functions I

Polynomial Functions I Name Student ID Number Group Name Group Members Polnomial Functions I 1. Sketch mm() =, nn() = 3, ss() =, and tt() = 5 on the set of aes below. Label each function on the graph. 15 5 3 1 1 3 5 15 Defn:

More information

LAB MANUAL. ANTC Lab (ME-321- F) DEPARTMENT OF APPLIED SCIENCE AND HUMINITIES

LAB MANUAL. ANTC Lab (ME-321- F) DEPARTMENT OF APPLIED SCIENCE AND HUMINITIES LAB MANUAL ANTC Lab (ME-321- F) DEPARTMENT OF APPLIED SCIENCE AND HUMINITIES 1 Check list for Lab Manual S. No. Particulars Page Number 1 Mission and Vision 3 2 Guidelines for the student 4 3 List of Programs

More information

NUMERICAL METHODS AND COMPUTATIONAL PROGRAMMING LAB MATH-204-F

NUMERICAL METHODS AND COMPUTATIONAL PROGRAMMING LAB MATH-204-F LAB MANUAL NUMERICAL METHODS AND COMPUTATIONAL PROGRAMMING LAB MATH-204-F LIST OF EXPERIMENTS NUMERICAL METHODS OF COMPUTATIONAL PROGRAMMING LAB MATH-204-F S. No. NAME OF EXPERIMENTS 1. Solution of Non-linear

More information

1.00 Lecture 25. Root Finding

1.00 Lecture 25. Root Finding 1.00 Lecture 25 Numerical Methods: Root Finding Reading for next time: Big Java: section 19.4 Root Finding Two cases: One dimensional function: f(x)= 0 Systems of equations (F(X)= 0), where X and 0 are

More information

UIC. C Programming Primer. Bharathidasan University

UIC. C Programming Primer. Bharathidasan University C Programming Primer UIC C Programming Primer Bharathidasan University Contents Getting Started 02 Basic Concepts. 02 Variables, Data types and Constants...03 Control Statements and Loops 05 Expressions

More information

Introduction to C++ Introduction to C++ Week 6 Dr Alex Martin 2013 Slide 1

Introduction to C++ Introduction to C++ Week 6 Dr Alex Martin 2013 Slide 1 Introduction to C++ Introduction to C++ Week 6 Dr Alex Martin 2013 Slide 1 Numerical Integration Methods The Trapezoidal Rule If one has an arbitrary function f(x) to be integrated over the region [a,b]

More information

Graphical Approach to Solve the Transcendental Equations Salim Akhtar 1 Ms. Manisha Dawra 2

Graphical Approach to Solve the Transcendental Equations Salim Akhtar 1 Ms. Manisha Dawra 2 Graphical Approach to Solve the Transcendental Equations Salim Akhtar 1 Ms. Manisha Dawra 2 1 M.Tech. Scholar 2 Assistant Professor 1,2 Department of Computer Science & Engineering, 1,2 Al-Falah School

More information

Computer Simulations

Computer Simulations Computer Simulations A practical approach to simulation Semra Gündüç gunduc@ankara.edu.tr Ankara University Faculty of Engineering, Department of Computer Engineering 2014-2015 Spring Term Ankara University

More information

lim x c x 2 x +2. Suppose that, instead of calculating all the values in the above tables, you simply . What do you find? x +2

lim x c x 2 x +2. Suppose that, instead of calculating all the values in the above tables, you simply . What do you find? x +2 MA123, Chapter 3: The idea of its (pp. 47-67, Gootman) Chapter Goals: Evaluate its. Evaluate one-sided its. Understand the concepts of continuity and differentiability and their relationship. Assignments:

More information

P.E.S. INSTITUTE OF TECHNOLOGY BANGALORE SOUTH CAMPUS 1 ST INTERNAL ASSESMENT TEST (SCEME AND SOLUTIONS)

P.E.S. INSTITUTE OF TECHNOLOGY BANGALORE SOUTH CAMPUS 1 ST INTERNAL ASSESMENT TEST (SCEME AND SOLUTIONS) FACULTY: Ms. Saritha P.E.S. INSTITUTE OF TECHNOLOGY BANGALORE SOUTH CAMPUS 1 ST INTERNAL ASSESMENT TEST (SCEME AND SOLUTIONS) SUBJECT / CODE: Programming in C and Data Structures- 15PCD13 What is token?

More information

An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s.

An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s. Using Monte Carlo to Estimate π using Buffon s Needle Problem An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s. Here s the problem (in a simplified form). Suppose

More information

(Refer Slide Time: 00:03:51)

(Refer Slide Time: 00:03:51) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 17 Scan Converting Lines, Circles and Ellipses Hello and welcome everybody

More information

1.00 Lecture 19. Numerical Methods: Root Finding

1.00 Lecture 19. Numerical Methods: Root Finding 1.00 Lecture 19 Numerical Methods: Root Finding short int Remember Java Data Types Type byte long float double char boolean Size (bits) 8 16 32 64 32 64 16 1-128 to 127-32,768 to 32,767-2,147,483,648 to

More information

The directional derivative of f x, y in the direction of at x, y u. f x sa y sb f x y (, ) (, ) 0 0 y 0 0

The directional derivative of f x, y in the direction of at x, y u. f x sa y sb f x y (, ) (, ) 0 0 y 0 0 Review: 0, lim D f u 0 0 0 0 u The directional derivative of f, in the direction of at, is denoted b D f, : u a, b must a unit vector u f sa sb f s 0 (, ) (, ) s f (, ) a f (, ) b 0 0 0 0 0 0 D f, f u

More information

Prepared by: Shraddha Modi

Prepared by: Shraddha Modi Prepared by: Shraddha Modi Introduction Operator: An operator is a symbol that tells the Computer to perform certain mathematical or logical manipulations. Expression: An expression is a sequence of operands

More information

The Application of Numerical Approximation Methods upon Digital Images

The Application of Numerical Approximation Methods upon Digital Images American Journal of Signal Processing 217, 7(2): 39-43 DOI: 1.5923/j.ajsp.21772.1 The Application of Numerical Approximation Methods upon Digital Images Ali Jassim Mohamed Ali Department of Physics, College

More information

Calculus I Review Handout 1.3 Introduction to Calculus - Limits. by Kevin M. Chevalier

Calculus I Review Handout 1.3 Introduction to Calculus - Limits. by Kevin M. Chevalier Calculus I Review Handout 1.3 Introduction to Calculus - Limits by Kevin M. Chevalier We are now going to dive into Calculus I as we take a look at the it process. While precalculus covered more static

More information

Learning Lab 3: Parallel Methods of Solving the Linear Equation Systems

Learning Lab 3: Parallel Methods of Solving the Linear Equation Systems Learning Lab 3: Parallel Methods of Solving the Linear Equation Systems Lab Objective... Eercise State the Problem of Solving the Linear Equation Systems... 2 Eercise 2 - Studying the Gauss Algorithm for

More information

Remember Java Data Types

Remember Java Data Types 1.00 Lecture 19 October 24, 2005 Numerical Methods: Root Finding Remember Java Data Types Size Type (bits) Range byte 8-128 to 127 short 16-32,768 to 32,767 int 32-2,147,483,648 to 2,147,483,647 long 64-9,223,372,036,854,775,808L

More information

Graph Sketching. Review: 1) Interval Notation. Set Notation Interval Notation Set Notation Interval Notation. 2) Solving Inequalities

Graph Sketching. Review: 1) Interval Notation. Set Notation Interval Notation Set Notation Interval Notation. 2) Solving Inequalities Lesson. Graph Sketching Review: ) Interval Notation Set Notation Interval Notation Set Notation Interval Notation a) { R / < < 5} b) I (, 3) ( 3, ) c){ R} d) I (, ] (0, ) e){ R / > 5} f) I [ 3,5) ) Solving

More information

Rational Functions. Definition A rational function can be written in the form. where N(x) and D(x) are

Rational Functions. Definition A rational function can be written in the form. where N(x) and D(x) are Rational Functions Deinition A rational unction can be written in the orm () N() where N() and D() are D() polynomials and D() is not the zero polynomial. *To ind the domain o a rational unction we must

More information

Unit 3 Decision making, Looping and Arrays

Unit 3 Decision making, Looping and Arrays Unit 3 Decision making, Looping and Arrays Decision Making During programming, we have a number of situations where we may have to change the order of execution of statements based on certain conditions.

More information

Sorting. Bubble Sort. Selection Sort

Sorting. Bubble Sort. Selection Sort Sorting In this class we will consider three sorting algorithms, that is, algorithms that will take as input an array of items, and then rearrange (sort) those items in increasing order within the array.

More information

x 16 d( x) 16 n( x) 36 d( x) zeros: x 2 36 = 0 x 2 = 36 x = ±6 Section Yes. Since 1 is a polynomial (of degree 0), P(x) =

x 16 d( x) 16 n( x) 36 d( x) zeros: x 2 36 = 0 x 2 = 36 x = ±6 Section Yes. Since 1 is a polynomial (of degree 0), P(x) = 9 CHAPTER POLYNOMIAL AND RATIONAL FUNCTIONS Section -. Yes. Since is a polynomial (of degree 0), P() P( ) is a rational function if P() is a polynomial.. A vertical asymptote is a vertical line a that

More information

TANGENTS AND NORMALS

TANGENTS AND NORMALS Mathematics Revision Guides Tangents and Normals Page 1 of 8 MK HOME TUITION Mathematics Revision Guides Level: AS / A Level AQA : C1 Edecel: C OCR: C1 OCR MEI: C TANGENTS AND NORMALS Version : 1 Date:

More information

4.2 Properties of Rational Functions. 188 CHAPTER 4 Polynomial and Rational Functions. Are You Prepared? Answers

4.2 Properties of Rational Functions. 188 CHAPTER 4 Polynomial and Rational Functions. Are You Prepared? Answers 88 CHAPTER 4 Polnomial and Rational Functions 5. Obtain a graph of the function for the values of a, b, and c in the following table. Conjecture a relation between the degree of a polnomial and the number

More information

Radical Functions Review

Radical Functions Review Radical Functions Review Specific Outcome 3 Graph and analyze radical functions (limited to functions involving one radical) Acceptable Standard sketch and analyze (domain, range, invariant points, - and

More information

Functions Review Packet from November Questions. 1. The diagrams below show the graphs of two functions, y = f(x), and y = g(x). y y

Functions Review Packet from November Questions. 1. The diagrams below show the graphs of two functions, y = f(x), and y = g(x). y y Functions Review Packet from November Questions. The diagrams below show the graphs of two functions, = f(), and = g()..5 = f( ) = g( ).5 6º 8º.5 8º 6º.5 State the domain and range of the function f; the

More information

Definition. A Taylor series of a function f is said to represent function f, iff the error term converges to 0 for n going to infinity.

Definition. A Taylor series of a function f is said to represent function f, iff the error term converges to 0 for n going to infinity. Definition A Taylor series of a function f is said to represent function f, iff the error term converges to 0 for n going to infinity. 120202: ESM4A - Numerical Methods 32 f(x) = e x at point c = 0. Taylor

More information

3.3 Function minimization

3.3 Function minimization 3.3. Function minimization 55 3.3 Function minimization Beneath the problem of root-finding, minimizing functions constitutes a major problem in computational economics. Let f () : X R a function that

More information

NUMERICAL METHODS, NM (4776) AS

NUMERICAL METHODS, NM (4776) AS NUMERICAL METHODS, NM (4776) AS Objectives To provide students with an understanding that many mathematical problems cannot be solved analytically but require numerical methods. To develop a repertoire

More information

Domain: The domain of f is all real numbers except those values for which Q(x) =0.

Domain: The domain of f is all real numbers except those values for which Q(x) =0. Math 1330 Section.3.3: Rational Functions Definition: A rational function is a function that can be written in the form P() f(), where f and g are polynomials. Q() The domain of the rational function such

More information

dt Acceleration is the derivative of velocity with respect to time. If a body's position at time t is S = f(t), the body's acceleration at time t is

dt Acceleration is the derivative of velocity with respect to time. If a body's position at time t is S = f(t), the body's acceleration at time t is APPLICATIN F DERIVATIVE INTRDUCTIN In this section we eamine some applications in which derivatives are used to represent and interpret the rates at which things change in the world around us. Let S be

More information

CURVE SKETCHING EXAM QUESTIONS

CURVE SKETCHING EXAM QUESTIONS CURVE SKETCHING EXAM QUESTIONS Question 1 (**) a) Express f ( x ) in the form ( ) 2 f x = x + 6x + 10, x R. f ( x) = ( x + a) 2 + b, where a and b are integers. b) Describe geometrically the transformations

More information

Lectures 4 and 5 (Julian) Computer Programming: Skills & Concepts (INF-1-CP1) double; float; quadratic equations. Practical 1.

Lectures 4 and 5 (Julian) Computer Programming: Skills & Concepts (INF-1-CP1) double; float; quadratic equations. Practical 1. Lectures 4 and 5 (Julian) Computer Programming: Skills & Concepts (INF-1-CP1) double; float; quadratic equations 4th October, 2010 Integer arithmetic in C. Converting pre-decimal money to decimal. The

More information

LABORATORY MANUAL APPLIED NUMERICAL TECHNIQUES AND COMPUTING LAB. ME 321 F

LABORATORY MANUAL APPLIED NUMERICAL TECHNIQUES AND COMPUTING LAB. ME 321 F LABORATORY MANUAL APPLIED NUMERICAL TECHNIQUES AND COMPUTING LAB. ME 321 F LIST OF EXPERIMENTS APPLIED NUMERICAL TECHNIQUES AND COMP. SR.NO. NAME OF EXPERIMENTS DATE SIGNATURE 1. Solution of Non linear

More information

The New Bisection Plus Algorithm by Namir Shammas

The New Bisection Plus Algorithm by Namir Shammas The New Bisection Plus Algorithm 1 The New Bisection Plus Algorithm by Namir Shammas Introduction This article presents a new variant for the root-bracketing Bisection algorithm. This new version injects

More information

MATH 1A MIDTERM 1 (8 AM VERSION) SOLUTION. (Last edited October 18, 2013 at 5:06pm.) lim

MATH 1A MIDTERM 1 (8 AM VERSION) SOLUTION. (Last edited October 18, 2013 at 5:06pm.) lim MATH A MIDTERM (8 AM VERSION) SOLUTION (Last edited October 8, 03 at 5:06pm.) Problem. (i) State the Squeeze Theorem. (ii) Prove the Squeeze Theorem. (iii) Using a carefully justified application of the

More information

ANALYSIS OF ALGORITHMS

ANALYSIS OF ALGORITHMS ANALYSIS OF ALGORITHMS Running Time Pseudo-Code Asymptotic Notation Asymptotic Analysis Mathematical facts T(n) n = 4 Input Algorithm Output 1 Average Case vs. Worst Case Running Time of an Algorithm An

More information

2.1 Derivatives and Rates of Change

2.1 Derivatives and Rates of Change 2.1 Derivatives and Rates of Change In this chapter we study a special type of limit, called a derivative, that occurs when we want to find a slope of a tangent line, or a velocity, or any instantaneous

More information

Lesson 8.1 Exercises, pages

Lesson 8.1 Exercises, pages Lesson 8.1 Eercises, pages 1 9 A. Complete each table of values. a) -3 - -1 1 3 3 11 8 5-1 - -7 3 11 8 5 1 7 To complete the table for 3, take the absolute value of each value of 3. b) - -3 - -1 1 3 3

More information

Transformation of curve. a. reflect the portion of the curve that is below the x-axis about the x-axis

Transformation of curve. a. reflect the portion of the curve that is below the x-axis about the x-axis Given graph of y f = and sketch:. Linear Transformation cf ( b + a) + d a. translate a along the -ais. f b. scale b along the -ais c. scale c along the y-ais d. translate d along the y-ais Transformation

More information

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10 Lecture 25: Bezier Subdivision And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10 1. Divide and Conquer If we are going to build useful

More information

9.1 Bracketing and Bisection

9.1 Bracketing and Bisection 9.1 Bracketing and Bisection 343 CITED REFERENCES AND FURTHER READING: Stoer, J., and Bulirsch, R. 1980, Introduction to Numerical Analysis (New York: Springer-Verlag), Chapter 5. Acton, F.S. 1970, Numerical

More information

Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling

Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling Computer Graphics : Bresenham Line Drawing Algorithm, Circle Drawing & Polygon Filling Downloaded from :www.comp.dit.ie/bmacnamee/materials/graphics/006- Contents In today s lecture we ll have a loo at:

More information

Introduction to Computational Mathematics

Introduction to Computational Mathematics Introduction to Computational Mathematics Introduction Computational Mathematics: Concerned with the design, analysis, and implementation of algorithms for the numerical solution of problems that have

More information

Classes of Real Numbers 1/2. The Real Line

Classes of Real Numbers 1/2. The Real Line Classes of Real Numbers All real numbers can be represented by a line: 1/2 π 1 0 1 2 3 4 real numbers The Real Line { integers rational numbers non-integral fractions irrational numbers Rational numbers

More information

AE52/AC52/AT52 C & Data Structures JUNE 2014

AE52/AC52/AT52 C & Data Structures JUNE 2014 Q.2 a. Write a program to add two numbers using a temporary variable. #include #include int main () int num1, num2; clrscr (); printf( \n Enter the first number : ); scanf ( %d, &num1);

More information

Elementary maths for GMT. Algorithm analysis Part I

Elementary maths for GMT. Algorithm analysis Part I Elementary maths for GMT Algorithm analysis Part I Algorithms An algorithm is a step-by-step procedure for solving a problem in a finite amount of time Most algorithms transform input objects into output

More information

Algorithm. Algorithm Analysis. Algorithm. Algorithm. Analyzing Sorting Algorithms (Insertion Sort) Analyzing Algorithms 8/31/2017

Algorithm. Algorithm Analysis. Algorithm. Algorithm. Analyzing Sorting Algorithms (Insertion Sort) Analyzing Algorithms 8/31/2017 8/3/07 Analysis Introduction to Analysis Model of Analysis Mathematical Preliminaries for Analysis Set Notation Asymptotic Analysis What is an algorithm? An algorithm is any well-defined computational

More information

Analysis of Algorithms

Analysis of Algorithms Analysis of Algorithms Data Structures and Algorithms Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++ Goodrich, Tamassia and Mount (Wiley, 2004)

More information

1.00 Lecture 19. Packaging Functions in Objects

1.00 Lecture 19. Packaging Functions in Objects 1.00 Lecture 19 Numerical Methods: Root Finding Packaging Functions in Objects Consider writing method that finds root of function or evaluates a function, e.g., f(x)= 0 on some interval [a, b], or find

More information

Introduction to Computing Lecture 07: Repetition and Loop Statements (Part II)

Introduction to Computing Lecture 07: Repetition and Loop Statements (Part II) Introduction to Computing Lecture 07: Repetition and Loop Statements (Part II) Assist.Prof.Dr. Nükhet ÖZBEK Ege University Department of Electrical & Electronics Engineering nukhet.ozbek@ege.edu.tr Topics

More information

11 The Regular Pentagon

11 The Regular Pentagon 11 The Regular Pentagon 11.1 The Euclidean construction with the Golden Ratio The figure on page 561 shows an easy Euclidean construction of a regular pentagon. The justification of the construction begins

More information

Pre-Calculus Notes: Chapter 3 The Nature of Graphs

Pre-Calculus Notes: Chapter 3 The Nature of Graphs Section Families of Graphs Name: Pre-Calculus Notes: Chapter 3 The Nature of Graphs Family of graphs Parent graph A group of graphs that share similar properties The most basic graph that s transformed

More information

3 Applications of Di erentiation

3 Applications of Di erentiation 9 Applications of Di erentiation This chapter is intended to illustrate some of the applications of di erentiation. The activities of Section. illustrate the relationship between the values of rst and

More information

Chapter 1. Limits and Continuity. 1.1 Limits

Chapter 1. Limits and Continuity. 1.1 Limits Chapter Limits and Continuit. Limits The its is the fundamental notion of calculus. This underling concept is the thread that binds together virtuall all of the calculus ou are about to stud. In this section,

More information

NCS 301 DATA STRUCTURE USING C

NCS 301 DATA STRUCTURE USING C NCS 301 Data Structure Using C NCS 301 DATA STRUCTURE USING C Unit-1 Part-1 Intro to Data Structures Hammad Mashkoor Lari Assistant Professor Allenhouse Institute of Technolgy www.ncs301ds.wordpress.com

More information

Programming and Data Structures Mid-Semester - Solutions to Sample Questions Dept. of Computer Science and Engg. IIT Kharagpur Spring

Programming and Data Structures Mid-Semester - Solutions to Sample Questions Dept. of Computer Science and Engg. IIT Kharagpur Spring Programming and Data Structures Mid-Semester - s to Sample Questions Dept. of Computer Science and Engg. IIT Kharagpur Spring 2015-16 February 15, 2016 1. Tick the correct options. (a) Consider the following

More information

Object Oriented Programming Using C++ Mathematics & Computing IET, Katunayake

Object Oriented Programming Using C++ Mathematics & Computing IET, Katunayake Assigning Values // Example 2.3(Mathematical operations in C++) float a; cout > a; cout

More information

2. Distinguish between a unary, a binary and a ternary operator. Give examples of C++ operators for each one of them.

2. Distinguish between a unary, a binary and a ternary operator. Give examples of C++ operators for each one of them. 1. Why do you think C++ was not named ++C? C++ is a super set of language C. All the basic features of C are used in C++ in their original form C++ can be described as C+ some additional features. Therefore,

More information

AP Calculus. Slide 1 / 213 Slide 2 / 213. Slide 3 / 213. Slide 4 / 213. Slide 4 (Answer) / 213 Slide 5 / 213. Derivatives. Derivatives Exploration

AP Calculus. Slide 1 / 213 Slide 2 / 213. Slide 3 / 213. Slide 4 / 213. Slide 4 (Answer) / 213 Slide 5 / 213. Derivatives. Derivatives Exploration Slide 1 / 213 Slide 2 / 213 AP Calculus Derivatives 2015-11-03 www.njctl.org Slide 3 / 213 Table of Contents Slide 4 / 213 Rate of Change Slope of a Curve (Instantaneous ROC) Derivative Rules: Power, Constant,

More information

Outline. First Quiz Results. Exercise Five Goals. Question Three. Questions One and Two. Exercise five if statements February 28, 2006

Outline. First Quiz Results. Exercise Five Goals. Question Three. Questions One and Two. Exercise five if statements February 28, 2006 Eercise five if statements February 8, 6 Laboratory V Program Control Using if Statements Larry Caretto Computer Science 6 Computing in Engineering and Science February 8, 6 Outline Review first quiz Summarize

More information

3.6-Rational Functions & Their Graphs

3.6-Rational Functions & Their Graphs .6-Rational Functions & Their Graphs What is a Rational Function? A rational function is a function that is the ratio of two polynomial functions. This definition is similar to a rational number which

More information

Honors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1

Honors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1 Solving equations and inequalities graphically and algebraically 1. Plot points on the Cartesian coordinate plane. P.1 2. Represent data graphically using scatter plots, bar graphs, & line graphs. P.1

More information

Example C++ Program Demonstrating Usage of a Pointer to a Function in the Call to Another Function

Example C++ Program Demonstrating Usage of a Pointer to a Function in the Call to Another Function ME 5241 Computer Aided Engineering Tom Chase Fall 2000 Example C++ Program Demonstrating Usage of a Pointer to a Function in the Call to Another Function The sample code below implements the Newton s Method

More information

MGM S JAWAHARLAL NEHRU ENGINEERING COLLEGE N-6, CIDCO, AURANGABAD LAB MANUALS SUB: COMPUTER LAB-II CLASS: S.E.CIVIL

MGM S JAWAHARLAL NEHRU ENGINEERING COLLEGE N-6, CIDCO, AURANGABAD LAB MANUALS SUB: COMPUTER LAB-II CLASS: S.E.CIVIL MGM S JAWAHARLAL NEHRU ENGINEERING COLLEGE N-6, CIDCO, AURANGABAD LAB MANUALS (Procedure for conduction of Practical/Term Work) SUB: COMPUTER LAB-II CLASS: S.E.CIVIL Prepared by Ms.V.S.Pradhan Lab In charge

More information

HSC Mathematics - Extension 1. Workshop E2

HSC Mathematics - Extension 1. Workshop E2 HSC Mathematics - Extension Workshop E Presented by Richard D. Kenderdine BSc, GradDipAppSc(IndMaths), SurvCert, MAppStat, GStat School of Mathematics and Applied Statistics University of Wollongong Moss

More information

On Your Own. Applications. Unit 3. b. AC = 8 units y BD = 16 units C(5, 2)

On Your Own. Applications. Unit 3. b. AC = 8 units y BD = 16 units C(5, 2) Applications 1 a. If students use uniform and y scales or ZSquare, they should have a shape that looks like a kite. Using the distance formula, DC = AD = 1 and BC = BA = 0. b. AC = 8 units y BD = 16 units

More information

Lecture Objectives. Structured Programming & an Introduction to Error. Review the basic good habits of programming

Lecture Objectives. Structured Programming & an Introduction to Error. Review the basic good habits of programming Structured Programming & an Introduction to Error Lecture Objectives Review the basic good habits of programming To understand basic concepts of error and error estimation as it applies to Numerical Methods

More information