Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unit-I Roots of Equation

Similar presentations


Presentation on theme: "Unit-I Roots of Equation"— Presentation transcript:

1 Unit-I Roots of Equation

2 Zero’s of a Polynomial and Transcendental Equations:
Given an equation f(x) = 0, where f(x) can be of the forum (i) f(x) = a0xn + a1xn-1 + …….. + an Algebraic Polynomial (ii) or trigonometric, exponential or logarithmic function f(x) = ax + b logx i.e. (Transcendental) if f(ξ) = 0 for some ξ, than x= ξ is said to be a zero is a root of multiplicity p if f (x) = (x- ξ)p g(x) = 0 where g(ξ) ≠ 0. We can define the root of an equation as the value of x that makes f(x) = 0. The roots are some limites called the zeros of the equation. There are many functions for which the root cannot be determined so easily.

3 One method to obtain an approx
One method to obtain an approx. solution is to plot the function and determine where it crosses X-axis. Graphical methods provide rough estimates of roots and lack precision. The standard methods for locating roots typically fall into some what related but primarily distinct problem areas

4 How to locate the real roots of pn(x) = 0, where
pn(x) = a0xn + a1xn-1 + …….+ an . The Number of positive roots of pn(x) = 0, where the coefficients ‘a’s are real cannot exceed the number of changes in signs of the coefficients in the polynomial pn(x) and the number of negative roots of pn(x) cannot exceed the number of changes of the sign of the coefficients in pn(-x) = 0 Largest rot of pn(x) = 0 is approximately equal to the root of a0x+a1=0. The smallest roots of pn(x)=0 may be approximated by an-1x + an = 0 If p(a) and p(b) have opposite signs, then there are odd number of real roots of pn(x) = 0 between (a,b). If p(a) + p(b) have the same sign than there are no or an even number of real roots between a and h.

5 The general technique to find the roots of an equation is to start with an initial appox. value and than find the better approximation successively by repeating the same method. The methods discussed here are (i) Bisection method (ii) Regula Falsi and (iii) Newton Raphson methods. Bisection Method: This method is based on the concept of incremental search methods by locating an interval where the function changes sign. Then the location of the sign change is identified more precisely by dividing the interval into a number of sub-intervals. Each of these sub-intervals is searched to locate the sign change.

6 we know that if a function f(x) is continuous between (a,b) and f(a) and f(b) are of opposite sign than there exists at least one real root between (a,b) In Bisection method we take the approx. values of root as If f(x0) = 0, than is a root of f(x) = 0 if f(x0) ≠ 0 than the root either lies between a and x0 or x0 and b depending upon whether f(x0) is positive or negative. Again Bisect the interval and repeat the process until the root is obtained to desired accuracy. The following is the algorithm for Bisection Method: Step I. Choose lower xl and upper xu estimates of the root which ensures f(xe) f(xu) < 0 Step II. A first estimate of the root xr is determined by

7 Step III Make the following evaluations to determine in which sub-interval the root lies
If f(xe) f(xr) < 0, root lies between xe and xr than set xu = xr and continue to step 4. (b) If f(xe) f(xr) > 0, root lies in xr and xu set xe = xr and go to step 4. (c) If f(xe) f(xr) = 0, than root lies in xr and Terminate the computation Step IV. Calculate a new estimate of the root by Step V. Decide if your new estimate is accurate enough to meet your requirement. If yes stop, If no goto step III.

8 Newton Raphson Method Let a be the approximate root and h be the correction applied, then for a+h to be a root of f(a+h) = 0. then by Taylor’s theorem , If h is small a2 = (a+h) + h1 in this method h is taken to be small quantity which will be small when is large. i.e. correct value of the root can be obtained more rapidly and with little labour when graph is nearly vertical where it crosses X-axis. Computer Program for Newton-Raphson Method can be improved by incorporating a number of additional features. If possible, a plotting routine should be included in the program.

9 2. At the end of the computation, the final root estimate should always be substituted into the original function to compute whether the result is close to zero. 3. The program should always include an upper limit on the number of iterations

10 The False Position or Regula-Falsi Method
The method exploits the graphical insight by joining the points by a straight line. The intersection of this line with x-axis represents an improved estimate of the root. It is also called the linear interpolation method. Here y=f(x) is taken as straight line between (x1,y1) and (x2,y2) where the two points are on the opposite sides of a-axis. the x coordinate of the line joining the intersection of (x1,y1) and (x2,y2)gives the desired root. Here Can be used to find h. The desired root then will be

11 Find If y1 and y(1) are of opposite sign then root lies between x1 and otherwise it lies between
The procedure is repeated until the root is estimated adequately.

12 Algorithm for Bisection Method
I. Take initial approx. for x1 and x2. II. Compute f(x1) and f(x2) III. If f(x1).f(x2)>0, then no root lies between x1 and x2 and goto step [V] otherwise goto step IV. IV. Calculate V. If f(x1) f(x0)<0 than take x2=x otherwise set x1=x0 VI. Next approx Repeat step IV VII. Stop.

13 Some Specific Comments:
I. f(x) is continuous in [a,b]. Bisection Method gives the real roots of f(x)=0 and is also known as BOLZANO METHOD OR INTERVAL HALVING METHOD. III. The Method always converges.

14 Algorithm for Regula Falsi Method:
Take Initial approx. x0 and x1 and find f(x0) and f(x1). II. Next approx Find f(x2) III. Stop. In iterative methods we start with some initial approx. solution and improve these solution step by step in such a manner that the revised value moves towards the true value in minimum number of steps. The fastness of convergence in any method is represented by its rate of convergence.

15 The iterative method is convergent if |g`(x)| < 1 If g`(x) is very small the number of iterations will be lesser. Let α denote the true value. If xi and xi+1 are the approx. at ith and i+1th iterations then error ei at ith iteration ei = xi- α and ei+1=xi+1-a or ei+1 ≤ eik where in(a,b) Since unchange is 1, the rate of convergence of iterative method is linear. Rate of convergence and Algorithm for Newton-Raphson Method: Let xn = a + en, xn+1 = a+en+1

16 Hence rate of convergence of Newton Raphson Method is QUADRATIC

17 Algorithm: Assign initial approx. for x say x=x0 Obtain f(x0) and Find the next estimate of x0 by Replace x0 by x1 Repeat step - 3

18 Define Function Bisect
Flow chart 10 START Define function f(x) Define Function Bisect Initialize itr Call function bisect with x,a,b,itr B A

19 Call function bisect with x,a,b,itr
yes No Is f(a)*f(x)<0 a=x b=x c A Call function bisect with x,a,b,itr B Is fabs(x1-x)<a err 20

20 Print ‘Solution does not converge’
10 C Is itr<maxitr 20 Print ‘Solution does not converge’ STOP Print itr,x1 No Yes

21 itr=itr+1 x = (a+b)/2.0 B Print itr, x1 Return

22 TEST Q.1 Find f’(0.6) and f’’ (0.6) from the following table:
X: F(x): Q.2 A curve passes through the points given by the following table: X: Y: Find the area bounded by the curve, the x-axis and the lines at x=1 and x=4 using Trapezoid Rule, Simpsons 1/3 and 3/8 rules. Q.3 Explain the terms Numerical Integration & Numerical Differentiation.

23 Regula Falsi Method Regula falsi method is faster than an Bisection method. algebric and transcedental equation f(x)=0. Here we find an interval with in which the root lies. If it is (a,b) then the value of the function at the two points shall be of opposite sign. i.e. If f(a) > 0 than f(b)<0 and vice versa. Now we try to find a line lying between [a,f(a)] and [b,f(b)] and find the point on this line which cuts the x-axis which can be considered to be a new approximation. The equation of the line is given by At the point x, y=0

24 Putting this value in I we get
In Regula Falsi method the successive approx. are achieved by using relation III. For converting x into simplified from we substitute the values of f(a) and f(b) in terms of a,b by finding f(a) and f(b) for the given function and substituting these in III

25 Eg. For the equation f(x) = x3 - 4x f(a) = a3 -4a -9 f(b) = b3 -4b -9 Putting these values in III, we get & simplifing But successively putting next values of a & b. we can find the new approximations. Successively in a easy way and it save out time and then getting the new interval (a,b) successively until the two approximations are same upto n places of decimals for n decimal accuracy. Here at each step like Bisection the value of a and b will change according to sign of f(x).

26 In Regula Falsi & Bisection method the difference is only in evolution of successive approximations.
The advantage is the Regula Falsi method will need lesser iteration to solve the problem than Bisection method.

27 Example : Find a real root of the equation x3 - 4x - 9 = 0 by Regula Falsi Method Correct to four decimal places. Solution : Here f(x) = x3 - 4x - 9 = 0 f(2.70) = and f(2.71) = which are the opposite sign. The root lies between 2.70 and 2.71 i.e. (a=2.70, b =2.71) The approximation to the root by Regula-falsi metehod is determined by

28 Putting these in (1) and after simplification we get
Now for the sake of simplicity we use equation (2) for the estimation of successive approximation for the latest interval (a,b) as follows. Now, the first approximation, using (2) for (a=2.7, b=2.71) a will be changed by x1 i.e. a = and b will be unchanged

29 The new interval enclosing the root become (a=2.706517, b = 2.71)
The Second approximation, x2 = Since in the first and second approximation x1 and x2, the four decimal place is same, so the iterative process will stop. x = is root correct to four decimal place using Regula falsi method. Note: The above problem was solved by the Bisection method taking the same initial approximation i.e. the intervals. But in Bisection it takes six approximation where as in Regula falsi it takes only two approximation. Thus it is clead that in case of Regula falsi, it is not necessary to take very small interval.

30 Newton Raphson Method:
This method is faster than bisection and regula falsi method. But the convergence in raphson method depends on choice/ selector of initial approximation. i.e. this method is more sensitive towards the initial selection. Here we use any value x0 which lies between a,b and then the point which lie on the curve x0,f(x0). Now new approximation x1 is obtained by drawing a tangent at x0,f(x0) that cuts x-axis. From the triangle PQR

31 Here we draw another tangent at x=x1 which cuts the x axis at x=x2 and this is the desired root.
Example : Find the real root of the equation x3 – 4x – 9 =0 using newton Raphson method. Solution : f(2) < 0 and f(3) > 0 Root lies between 2 & 3

32

33 Thus root correct upto 4 places of decimals x= 2.7065


Download ppt "Unit-I Roots of Equation"

Similar presentations


Ads by Google