Skip to main content

Posts

Showing posts from October, 2009

False Position Method

This is the oldest method for finding the real root of a nonlinear equation f(x) = 0 and closely resembles the bisection method. In this method, also known as regula falsi or the method of chords , we choose two points a and b such that f(a) and f(b) are of opposite signs. Hence, a root must lie in between these points. Now, the equation of the chord joining the two points [a, f(a)] and [b, f(b)] is given by {y – f(a)}/{x – a} = {f(b) – f(a)}/{b – a} The method consists in replacing the part of the curve between the points [a, f(a)] and [b, f(b)] by means of the chord joining these points, and taking the point of intersection of the chord with the x-axis as an approximation to the root. The point of intersection in the present case is obtained by putting y = 0 in first equation. Thus, we obtain x 1 = a – {(b – a)f(a)}/{f(b) – f(a)} = {af(b) – bf(a)}/{f(b) – f(a)} Which is the first approximation to the root of f(x) = 0. If now f(x 1 ) and f(a) are of opposite sign...

Newton-Raphson Method

This method is generally used to improve the result obtained by one of the previous methods. Let x o be an approximate root of f(x) = 0 and let x 1 = x o + h be the correct root so that f(x 1 ) = 0. Expanding f(x o + h) by Taylor ’s series, we obtain f(x o ) + hf’(x o ) + h 2 f’’(x o )/2! +-----= 0 Neglecting the second and higher order derivatives, we have f(x o ) + hf’(x o ) = 0 Which gives h = - f(x o )/f’(x o ) A better approximation than x o is therefore given be x 1 , where x 1 = x o – f(x o )/f’(x o ) Successive approximations are given by x 2 , x 3 ,----,x n+1 , where x n+1 = x n – f(x n )/f’(x n ) Which is the Newton-Raphson formula. Example: - Find a real root of the equation x 3 -5x + 3 = 0. Sol n : - Let, f(x) = x 3 -5x + 3 = 0 f’(x) = 3x 2 - 5 Choosing x o = 1 Step-1: f(x o ) = -1 f(x o ) = -2 So, x 1 =1 – ½ = 0.5 Step-2: f(x 1 ) = 0.625 f’(x 1 ) = -4.25 x 2 = 0.5 + 0.625/4.25 = 0.647 S...

The Bisection Method

If a function f(x) is continuous between a and b, and f(a) and f(b) are of opposite signs, then there exists at least one root between a and b. For definiteness, let f(a) be negative and f(b) be positive. Then the root lies between a and b and let its approximate value be given by x 0 = (a+b)/2. If f(x 0 )=0, we conclude that x 0 is a root of the equation f(x) =0. Otherwise, the root lies either between x 0 and b, or between x 0 and a depending on whether f(x 0 ) is negative or positive. The method is shown graphically on the below Example: - Find a real root of the equation f(x) = x 3 – x – 1 = 0. Sol n : - Given, f(x) = x 3 – x – 1 And f(1) = -1 f(2) = 5 Since f(1) is negative and f(2) is positive, a root lies between 1 and 2, Step-1: Here, a = 1 and b = 2 So, xo =(1+2)/2=1.5 f(x o ) = 0.875 x o =1.5 Step-2: a = 1 , b = 1.5 x 1 = (1+1.5)/2 = 1.25 f (x 1 ) = -0.296875 x 1 = 1.25 ...