SlideShare a Scribd company logo
1 of 27
NUMERICAL      METHOD
             &
 INTERpOLATION      TECHNIqUEs




                    Presented By :-
Guided By :-
                    Rakhi Kumari    Roll No :- 38
Prof. N N Mahajan
                    Kumar Gaurav Roll No :- 26
What Is Numerical computing ?
• Numerical Computing is an approach for solving complex
  mathematical problems using only simple arithmetic
  operations.
• The approach involves formulation of model of physical
  situations that can be solved with arithmetic operations.
• Steps involved
  1. Formulation of mathematical model.
  2. Construction of an appropriate numerical method.
  3. Implementation of the method to obtain a solution.
  4. Validation of the solution.
Unlike Linear equations in which f(x) is directly dependent upon
(x) ; in Non Linear equation f(x) is not in exact proportion to the
   changes of variable (x). Ex amples
   f(x) = x2 +2x+3
   f(x) = x3 + 7
Method of solution
There are a number of method to solve a Non linear equation.
1. Direct Analytical method
2. Graphical method
3. Trial and Error method
4. Iterative Method
Iterative Methods
Iterative method being there in the process of one or more
guesses at the solution being sought. Iterative method based on
number of guesses they use can be grouped into two categories:

1. Bracketing method
    Bisection Method
    Regula Falsi Method

2.Open end method
   Newton Raphson Method
   Secant Method
   Fixed Point Method
1. Bisection Method
1.   Declare the function f(x)=0
     //For finding initial guesses
2. For i=0 Compute f(i) & f(i+1)
     if f(i)*f(i+1) <0
     then
      break the loop
     else
     Continue by incrementing (i) by 1.
     //setting initial roots
3. x0= i ; x1= i+1
4.Enter the number of iteration , n
//calculation of next root
5.Compute x2 by taking Arithmetic Mean of x0 and x1.
                   x2=(x0+x1)/2
6. Compute f(x2)
// checking the roots and interchanging the values
7. If f(x0)*f(x2) <0 then
                 x1=x2
                 else
                 x0=x2
8. n=n-1
9.If n >0 Goto step 5
10. The root of equation is x2
11. Exit
Additional information
• In this method we choose a mid point x2 in between x0 and
  x1. Depending upon sign of f(x0), f(x1), f(x2); x1 or x0 is
  replaced by x2. such that root lie between the new interval.
• In this the interval of root reduced by a factor of 2 every time
• So after n step the interval reduced to (x1-x0)/2n   =∆x/2n
   After n iteration root must lie between ± ∆x/2n of our
   estimate. This means that the error bound at the nth iteration
   is
      En = ∆x/2n
Similarly
        En+1 =   ∆x/2n+1
        Thus the bisection method is linearly convergent
2. Regula Falsi method
1. Declare the function f(x)=0
     //For finding initial guesses
2. For i=0 Compute f(i) & f(i+1)
     if f(i)*f(i+1) <0
     then
     break the loop
     else
     Continue by incrementing (i) by 1.
     //setting initial roots
3. x0= i ; x1= i+1
4. Compute f(x0) and f(x1) by putting x0 and x1 in the equation.
//calculation of next root
5.Compute x2 by using formula
      x2= x0* f(x1) – x1*f(x0)
                 f(x1)-f(x0)
6. Compute f(x2)
// checking the roots and interchanging the values
7. If f(x0)*f(x2) < 0 then
                 x1=x2
                 else
                 x0=x2
8. If |x1-x0| > 0.0005 Goto step 4
9. The root of equation is x2
11. Exit
3. Newton- Raphson Method
1. Declare the function f(x)=0
     // computing Differentiation
2. Compute the differentiation of the function
    Let it be df(x)=0
    //For finding initial guesses
3. if f(i)*f(i+1) <0 break the loop
     else Continue by incrementing (i) by 1.
     //setting initial roots
4. x0= i ; x1= i+1
5. Take a value either x0 or x1 to proceed further
6. Compute f(x0) and df(x0)
//calculation of next root
5.Compute x1by using formula
        x1= x0- f(x0)
               df(x0)

6. Compute f(x1)
// checking the roots and interchanging the values
7. If |x1-x0| > 0.0005 then x0 = x1 ;Goto step 4
8. The root of equation is x0
10. Exit
4. Secant Method
1. Declare the function f(x)=0
     //For finding initial guesses
2. For i=0 Compute f(i) & f(i+1)
      if f(i)*f(i+1) <0
      then
      break the loop
       else
     Continue by incrementing (i) by 1.
     //setting initial roots
3. x0= i ; x1= i+1
4. Compute f(x0) and f(x1) by putting x0 and x1 in the equation.
//calculation of next root
5.Compute x2 by using formula
         x2= x1 - f(x1) *      x1 - x0
                               f(x1)-f(x0)
6. Compute f(x2)
// checking the roots and interchanging the values
7. If f(x0)*f(x2) < 0 then
                 x1=x2
                 else
                 x0=x2
8. If |x1-x0| > 0.0005 Goto step 4
9. The root of equation is x2
11. Exit
5. Fixed Point Method
• In Numerical analysis, Fixed point iteration is a method of
  computing fixed points of iterated functions.
• More specifically, given a function f(x) defined on the real
  numbers with real values and given a point x0 in
  the domain of f(x), the fixed point iteration is
• which gives rise to the sequence which is hoped
  to converge to a point x. If f(x) is continuous, then one can
  prove that the obtained x is a fixed point of f(x), i.e.,
                       f(x) = x.
Example :-Babylonian method
Babylonian method ( for finding square root)
1. Begin with an arbitrary positive starting value x0 (the closer to
   the root, the better).
2. Let xn+1 be the average of xn and S / xn (using the Arithmetic
   Mean to approximate the Geometric Mean).



3. Repeat step 2 until the desired accuracy is achieved.
       Xo =√s
Interpolation Techniques
• In the mathematical subfield of Numerical analysis, interpolation is
  a method of constructing new data points within the range of
  a discrete set of known data points.
• For example, suppose we have a table like this, which gives some
  values of an unknown function f(x).
       x       f(x)
       0      0                     Interpolation provides a means of
       1      0.8415                estimating the function at
                                    intermediate points,
       2      0.9093                 such as x = 2.5
       3      0.1411
       4      -0.7568
       5      −0.9589
1. Lagrange Interpolation
• Let y=f(x) be a function which takes values (x0,y0),(x1,y1),_ _ ,
  ( xn, yn). Since there are (n+1) pairs of values of (x) and (y).
• Lagrange’s Formula state that

   Y=    (x-x1) (x-x2)……. (x-xn) * y0 + (x-x0) (x-x2)……. (x-xn) *y1

        (x0-x1)(x0-x2)…..(x0-xn)         (x1-x2)(x0-x2)…..(x0-xn)

      + …. ……+        (x-x0) (x-x1) (x-x2)……. (x-xn-1) *yn
                         (xn-x0)(xn-x1)…..(xn-xn-1)
1. Read the Number of values to be entered be (n)
2. Read the value of X for which the f(x) is to be find.
3. Start a loop from 0 to n store value of (x) and f(x) is array of
     length n . x[n], y[n]
4. Declare a variable Sum=0 .
5. Start a loop from ( i= 0 to n-1 )
6. Product =1
7. Start another loop from ( j=0 to n-1)
8. If ( i ≠ j ) then
         product= product * (x- x[j]) / (x[i] - x[j] )
     end j loop
9. Sum = sum + y[i] * product
         end i loop
10. f(x)= sum
11. Exit
• We wish to interpolate ƒ(x) = x3 over the range 1 ≤ x ≤ 3, given
  these 3 points:
  The interpolating polynomial is:
  x0 = 1      f(x0) = 1
  x1 = 2      f(x2) = 8
  x3 = 3      f(x3) =27
  x4= 4       f(x4) =64
  x(5)= ?
2.Newton Interpolation method
• There are two types of newtons Interpolation Methods

1 . Newton’s forward method
        It is applicable when the asked x value does not lie
    between last given x interval

2. Newton’s backward method
      It is applicable when the asked x value lie between last
      given x interval
Newton’s forward method
1. Read the Number of values to be entered be (n)
2. Read the value of X for which the f(x) is to be find.
3. Start a loop from 0 to n store value of (x) and f(x) is array of
    length n . x[n], y[n]
4. Compute h= x[n+1] – x[n]
5. Compute u = x - x[0]         // step differ in both method
                        h
6. Declare a two Dimensional array.
7. Compute the Difference table
Y0          ∆Y 1             ∆Y 2                 ∆Y 3                    ∆Y n
                                                                           ….
0   Y[0,0]   ∆ Y1(0,1)=             ∆ Y2(0,2)=            ∆ Y3(0,3)=            n-1
             Y[1,0]-Y[0,0]   ∆ Y1(1,1) -∆ Y1(0,1)   ∆ Y2(2,1) -∆ Y1(0,2)


1   Y[1,0]   ∆ Y1(1,1)=             ∆ Y2(2,1)=
             Y[2,0]-Y[1,0]   ∆ Y1(2,1) -∆ Y1(1,1)


2   Y[2,0]   ∆ Y1(2,1)=
             Y[3,0]-Y[2,0]

3   Y[3,0]
8. Start a loop from 0 to n-1 , save value of first row of previous
   array in that name it Ynew[].
9. Start a loop from (i= 0 to n-1 )
                 declare product = 1
10. Start a loop from (j= 0 to i)
                prod= prod * u – j
                                  j+1
   end j loop
11. Value = prod* Ynew[(i+1)]
            sum=sum+value
             end I loop
12. The value of function at given x ie f(x) is sum.
Newton’s Backward method
1. Read the Number of values to be entered be (n)
2. Read the value of X for which the f(x) is to be find.
3. Start a loop from 0 to n store value of (x) and f(x) is array of
    length n . x[n], y[n]
4. Compute h= x[n+1] – x[n]
5. Compute u = x - x[n]         // step differ in both method
                        h
6. Declare a two Dimensional array.
7. Compute the Difference table
Y0          ∆Y 1             ∆Y 2                 ∆Y 3                    ∆Y n
                                                                           ….
0   Y[0,0]   ∆ Y1(0,1)=             ∆ Y2(0,2)=            ∆ Y3(0,3)=            n-1
             Y[1,0]-Y[0,0]   ∆ Y1(1,1) -∆ Y1(0,1)   ∆ Y2(2,1) -∆ Y1(0,2)


1   Y[1,0]   ∆ Y1(1,1)=             ∆ Y2(2,1)=
             Y[2,0]-Y[1,0]   ∆ Y1(2,1) -∆ Y1(1,1)


2   Y[2,0]   ∆ Y1(2,1)=
             Y[3,0]-Y[2,0]

3   Y[3,0]
8. Start a loop from ( i=0 to n-1) ,
   Start a loop from ( j=n to 0) ,
        assign Ynew[i] = difference[n][i]
    end loop j
End loop I
9. Start a loop from (i= 0 to n-1 )
                 declare product = 1
10. Start a loop from (j= 0 to i)
                prod= prod * u – j
                                  j+1
   end j loop
11. Value = prod* Ynew[(i+1)]
            sum = sum+ value
   end i loop
12. The value of function at given x ie f(x) is sum.
Numerical method

More Related Content

What's hot

Numerical Methods - Oridnary Differential Equations - 1
Numerical Methods - Oridnary Differential Equations - 1Numerical Methods - Oridnary Differential Equations - 1
Numerical Methods - Oridnary Differential Equations - 1Dr. Nirav Vyas
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve Mukuldev Khunte
 
Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series IntroductionRizwan Kazi
 
Roots of Nonlinear Equations - Open Methods
Roots of Nonlinear Equations - Open MethodsRoots of Nonlinear Equations - Open Methods
Roots of Nonlinear Equations - Open MethodsMohammad Tawfik
 
Bisection method in maths 4
Bisection method in maths 4Bisection method in maths 4
Bisection method in maths 4Vaidik Trivedi
 
Numerical Differentiation and Integration
 Numerical Differentiation and Integration Numerical Differentiation and Integration
Numerical Differentiation and IntegrationMeenakshisundaram N
 
introduction to Numerical Analysis
introduction to Numerical Analysisintroduction to Numerical Analysis
introduction to Numerical AnalysisGhulam Mehdi Sahito
 
Finite difference method
Finite difference methodFinite difference method
Finite difference methodDivyansh Verma
 
Numerical Methods - Oridnary Differential Equations - 3
Numerical Methods - Oridnary Differential Equations - 3Numerical Methods - Oridnary Differential Equations - 3
Numerical Methods - Oridnary Differential Equations - 3Dr. Nirav Vyas
 
Presentation on Solution to non linear equations
Presentation on Solution to non linear equationsPresentation on Solution to non linear equations
Presentation on Solution to non linear equationsRifat Rahamatullah
 
Newton's forward difference
Newton's forward differenceNewton's forward difference
Newton's forward differenceRaj Parekh
 
Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)Syed Ahmed Zaki
 
Newton’s Divided Difference Formula
Newton’s Divided Difference FormulaNewton’s Divided Difference Formula
Newton’s Divided Difference FormulaJas Singh Bhasin
 
Application of analytic function
Application of analytic functionApplication of analytic function
Application of analytic functionDr. Nirav Vyas
 

What's hot (20)

Runge kutta
Runge kuttaRunge kutta
Runge kutta
 
Numerical Methods - Oridnary Differential Equations - 1
Numerical Methods - Oridnary Differential Equations - 1Numerical Methods - Oridnary Differential Equations - 1
Numerical Methods - Oridnary Differential Equations - 1
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve
 
Interpolation
InterpolationInterpolation
Interpolation
 
Secant Method
Secant MethodSecant Method
Secant Method
 
Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series Introduction
 
Numerical methods
Numerical methodsNumerical methods
Numerical methods
 
Roots of Nonlinear Equations - Open Methods
Roots of Nonlinear Equations - Open MethodsRoots of Nonlinear Equations - Open Methods
Roots of Nonlinear Equations - Open Methods
 
Bisection method in maths 4
Bisection method in maths 4Bisection method in maths 4
Bisection method in maths 4
 
Numerical Differentiation and Integration
 Numerical Differentiation and Integration Numerical Differentiation and Integration
Numerical Differentiation and Integration
 
Metric space
Metric spaceMetric space
Metric space
 
introduction to Numerical Analysis
introduction to Numerical Analysisintroduction to Numerical Analysis
introduction to Numerical Analysis
 
Finite difference method
Finite difference methodFinite difference method
Finite difference method
 
Numerical Methods - Oridnary Differential Equations - 3
Numerical Methods - Oridnary Differential Equations - 3Numerical Methods - Oridnary Differential Equations - 3
Numerical Methods - Oridnary Differential Equations - 3
 
Es272 ch2
Es272 ch2Es272 ch2
Es272 ch2
 
Presentation on Solution to non linear equations
Presentation on Solution to non linear equationsPresentation on Solution to non linear equations
Presentation on Solution to non linear equations
 
Newton's forward difference
Newton's forward differenceNewton's forward difference
Newton's forward difference
 
Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)
 
Newton’s Divided Difference Formula
Newton’s Divided Difference FormulaNewton’s Divided Difference Formula
Newton’s Divided Difference Formula
 
Application of analytic function
Application of analytic functionApplication of analytic function
Application of analytic function
 

Viewers also liked

Applications of numerical methods
Applications of numerical methodsApplications of numerical methods
Applications of numerical methodsTarun Gehlot
 
Application of Numerical method in Real Life
Application of Numerical method in Real LifeApplication of Numerical method in Real Life
Application of Numerical method in Real LifeTaqwa It Center
 
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONS
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONSNUMERICAL METHODS MULTIPLE CHOICE QUESTIONS
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONSnaveen kumar
 
NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)krishnapriya R
 
Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)Asad Ali
 
Engineering Numerical Analysis Lecture-1
Engineering Numerical Analysis Lecture-1Engineering Numerical Analysis Lecture-1
Engineering Numerical Analysis Lecture-1Muhammad Waqas
 
Numerical analysis (Bisectional method) application
Numerical analysis (Bisectional method) applicationNumerical analysis (Bisectional method) application
Numerical analysis (Bisectional method) applicationMonsur Ahmed Shafiq
 
interpolation
interpolationinterpolation
interpolation8laddu8
 
Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Asad Ali
 
Multiple Choice:.doc
Multiple Choice:.docMultiple Choice:.doc
Multiple Choice:.docbutest
 
Numerical on bisection method
Numerical on bisection methodNumerical on bisection method
Numerical on bisection methodSumita Das
 
Interpolation with unequal interval
Interpolation with unequal intervalInterpolation with unequal interval
Interpolation with unequal intervalDr. Nirav Vyas
 
Newton’s Forward & backward interpolation
Newton’s Forward &  backward interpolation Newton’s Forward &  backward interpolation
Newton’s Forward & backward interpolation Meet Patel
 
Simpson’s one third and weddle's rule
Simpson’s one third and weddle's ruleSimpson’s one third and weddle's rule
Simpson’s one third and weddle's rulezahid6
 

Viewers also liked (20)

Applications of numerical methods
Applications of numerical methodsApplications of numerical methods
Applications of numerical methods
 
APPLICATION OF NUMERICAL METHODS IN SMALL SIZE
APPLICATION OF NUMERICAL METHODS IN SMALL SIZEAPPLICATION OF NUMERICAL METHODS IN SMALL SIZE
APPLICATION OF NUMERICAL METHODS IN SMALL SIZE
 
Application of Numerical method in Real Life
Application of Numerical method in Real LifeApplication of Numerical method in Real Life
Application of Numerical method in Real Life
 
bisection method
bisection methodbisection method
bisection method
 
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONS
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONSNUMERICAL METHODS MULTIPLE CHOICE QUESTIONS
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONS
 
Bisection method
Bisection methodBisection method
Bisection method
 
NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)
 
Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)
 
Engineering Numerical Analysis Lecture-1
Engineering Numerical Analysis Lecture-1Engineering Numerical Analysis Lecture-1
Engineering Numerical Analysis Lecture-1
 
weddle's rule
weddle's ruleweddle's rule
weddle's rule
 
Numerical analysis (Bisectional method) application
Numerical analysis (Bisectional method) applicationNumerical analysis (Bisectional method) application
Numerical analysis (Bisectional method) application
 
interpolation
interpolationinterpolation
interpolation
 
Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2Numerical Analysis (Solution of Non-Linear Equations) part 2
Numerical Analysis (Solution of Non-Linear Equations) part 2
 
Multiple Choice:.doc
Multiple Choice:.docMultiple Choice:.doc
Multiple Choice:.doc
 
Numerical on bisection method
Numerical on bisection methodNumerical on bisection method
Numerical on bisection method
 
Interpolation with unequal interval
Interpolation with unequal intervalInterpolation with unequal interval
Interpolation with unequal interval
 
Newton’s Forward & backward interpolation
Newton’s Forward &  backward interpolation Newton’s Forward &  backward interpolation
Newton’s Forward & backward interpolation
 
Interpolation Methods
Interpolation MethodsInterpolation Methods
Interpolation Methods
 
Simpson’s one third and weddle's rule
Simpson’s one third and weddle's ruleSimpson’s one third and weddle's rule
Simpson’s one third and weddle's rule
 
Numerical Methods 3
Numerical Methods 3Numerical Methods 3
Numerical Methods 3
 

Similar to Numerical method

Naville's Interpolation
Naville's InterpolationNaville's Interpolation
Naville's InterpolationVARUN KUMAR
 
Chapter 4 solving systems of nonlinear equations
Chapter 4 solving systems of nonlinear equationsChapter 4 solving systems of nonlinear equations
Chapter 4 solving systems of nonlinear equationsssuser53ee01
 
Maths iii quick review by Dr Asish K Mukhopadhyay
Maths iii quick review by Dr Asish K MukhopadhyayMaths iii quick review by Dr Asish K Mukhopadhyay
Maths iii quick review by Dr Asish K MukhopadhyayDr. Asish K Mukhopadhyay
 
Interpolation techniques - Background and implementation
Interpolation techniques - Background and implementationInterpolation techniques - Background and implementation
Interpolation techniques - Background and implementationQuasar Chunawala
 
Numarical values
Numarical valuesNumarical values
Numarical valuesAmanSaeed11
 
Numarical values highlighted
Numarical values highlightedNumarical values highlighted
Numarical values highlightedAmanSaeed11
 
Newton’s Divided Difference Interpolation 18.pptx
Newton’s Divided Difference Interpolation 18.pptxNewton’s Divided Difference Interpolation 18.pptx
Newton’s Divided Difference Interpolation 18.pptxRishabhGupta238479
 
Limits and Continuity of Functions
Limits and Continuity of Functions Limits and Continuity of Functions
Limits and Continuity of Functions OlooPundit
 
Applications of Differential Calculus in real life
Applications of Differential Calculus in real life Applications of Differential Calculus in real life
Applications of Differential Calculus in real life OlooPundit
 
C2 st lecture 4 handout
C2 st lecture 4 handoutC2 st lecture 4 handout
C2 st lecture 4 handoutfatima d
 
polynomial interpolation
polynomial interpolationpolynomial interpolation
polynomial interpolationRohanDhage2
 
1. newtonsforwardbackwordinterpolation-190305095001.pdf
1. newtonsforwardbackwordinterpolation-190305095001.pdf1. newtonsforwardbackwordinterpolation-190305095001.pdf
1. newtonsforwardbackwordinterpolation-190305095001.pdfFaisalMehmood887349
 
Mit18 330 s12_chapter4
Mit18 330 s12_chapter4Mit18 330 s12_chapter4
Mit18 330 s12_chapter4CAALAAA
 
Differential Calculus
Differential Calculus Differential Calculus
Differential Calculus OlooPundit
 
PROBABILITY DISTRIBUTION
PROBABILITY DISTRIBUTIONPROBABILITY DISTRIBUTION
PROBABILITY DISTRIBUTIONshahzadebaujiti
 
Numericals Reasoning.pdf
Numericals Reasoning.pdfNumericals Reasoning.pdf
Numericals Reasoning.pdfAvirup Pal
 

Similar to Numerical method (20)

Naville's Interpolation
Naville's InterpolationNaville's Interpolation
Naville's Interpolation
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Chapter 4 solving systems of nonlinear equations
Chapter 4 solving systems of nonlinear equationsChapter 4 solving systems of nonlinear equations
Chapter 4 solving systems of nonlinear equations
 
104newton solution
104newton solution104newton solution
104newton solution
 
Maths iii quick review by Dr Asish K Mukhopadhyay
Maths iii quick review by Dr Asish K MukhopadhyayMaths iii quick review by Dr Asish K Mukhopadhyay
Maths iii quick review by Dr Asish K Mukhopadhyay
 
Interpolation techniques - Background and implementation
Interpolation techniques - Background and implementationInterpolation techniques - Background and implementation
Interpolation techniques - Background and implementation
 
Numarical values
Numarical valuesNumarical values
Numarical values
 
Numarical values highlighted
Numarical values highlightedNumarical values highlighted
Numarical values highlighted
 
Newton’s Divided Difference Interpolation 18.pptx
Newton’s Divided Difference Interpolation 18.pptxNewton’s Divided Difference Interpolation 18.pptx
Newton’s Divided Difference Interpolation 18.pptx
 
Limits and Continuity of Functions
Limits and Continuity of Functions Limits and Continuity of Functions
Limits and Continuity of Functions
 
Applications of Differential Calculus in real life
Applications of Differential Calculus in real life Applications of Differential Calculus in real life
Applications of Differential Calculus in real life
 
C2 st lecture 4 handout
C2 st lecture 4 handoutC2 st lecture 4 handout
C2 st lecture 4 handout
 
polynomial interpolation
polynomial interpolationpolynomial interpolation
polynomial interpolation
 
Chapter 5 assignment
Chapter 5 assignmentChapter 5 assignment
Chapter 5 assignment
 
1. newtonsforwardbackwordinterpolation-190305095001.pdf
1. newtonsforwardbackwordinterpolation-190305095001.pdf1. newtonsforwardbackwordinterpolation-190305095001.pdf
1. newtonsforwardbackwordinterpolation-190305095001.pdf
 
Mit18 330 s12_chapter4
Mit18 330 s12_chapter4Mit18 330 s12_chapter4
Mit18 330 s12_chapter4
 
Differential Calculus
Differential Calculus Differential Calculus
Differential Calculus
 
PROBABILITY DISTRIBUTION
PROBABILITY DISTRIBUTIONPROBABILITY DISTRIBUTION
PROBABILITY DISTRIBUTION
 
Numericals Reasoning.pdf
Numericals Reasoning.pdfNumericals Reasoning.pdf
Numericals Reasoning.pdf
 
1249320870000 asgn 1-jm (1)
1249320870000 asgn 1-jm (1)1249320870000 asgn 1-jm (1)
1249320870000 asgn 1-jm (1)
 

More from Kumar Gaurav

More from Kumar Gaurav (6)

Cellular network History
Cellular network HistoryCellular network History
Cellular network History
 
Cellular networks
Cellular networksCellular networks
Cellular networks
 
Standard Template Library
Standard Template LibraryStandard Template Library
Standard Template Library
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
J2ME
J2MEJ2ME
J2ME
 
Python
PythonPython
Python
 

Numerical method

  • 1. NUMERICAL METHOD & INTERpOLATION TECHNIqUEs Presented By :- Guided By :- Rakhi Kumari Roll No :- 38 Prof. N N Mahajan Kumar Gaurav Roll No :- 26
  • 2. What Is Numerical computing ? • Numerical Computing is an approach for solving complex mathematical problems using only simple arithmetic operations. • The approach involves formulation of model of physical situations that can be solved with arithmetic operations. • Steps involved 1. Formulation of mathematical model. 2. Construction of an appropriate numerical method. 3. Implementation of the method to obtain a solution. 4. Validation of the solution.
  • 3. Unlike Linear equations in which f(x) is directly dependent upon (x) ; in Non Linear equation f(x) is not in exact proportion to the changes of variable (x). Ex amples f(x) = x2 +2x+3 f(x) = x3 + 7 Method of solution There are a number of method to solve a Non linear equation. 1. Direct Analytical method 2. Graphical method 3. Trial and Error method 4. Iterative Method
  • 4. Iterative Methods Iterative method being there in the process of one or more guesses at the solution being sought. Iterative method based on number of guesses they use can be grouped into two categories: 1. Bracketing method Bisection Method Regula Falsi Method 2.Open end method Newton Raphson Method Secant Method Fixed Point Method
  • 5. 1. Bisection Method 1. Declare the function f(x)=0 //For finding initial guesses 2. For i=0 Compute f(i) & f(i+1) if f(i)*f(i+1) <0 then break the loop else Continue by incrementing (i) by 1. //setting initial roots 3. x0= i ; x1= i+1 4.Enter the number of iteration , n //calculation of next root 5.Compute x2 by taking Arithmetic Mean of x0 and x1. x2=(x0+x1)/2
  • 6. 6. Compute f(x2) // checking the roots and interchanging the values 7. If f(x0)*f(x2) <0 then x1=x2 else x0=x2 8. n=n-1 9.If n >0 Goto step 5 10. The root of equation is x2 11. Exit
  • 7. Additional information • In this method we choose a mid point x2 in between x0 and x1. Depending upon sign of f(x0), f(x1), f(x2); x1 or x0 is replaced by x2. such that root lie between the new interval. • In this the interval of root reduced by a factor of 2 every time • So after n step the interval reduced to (x1-x0)/2n =∆x/2n After n iteration root must lie between ± ∆x/2n of our estimate. This means that the error bound at the nth iteration is En = ∆x/2n Similarly En+1 = ∆x/2n+1 Thus the bisection method is linearly convergent
  • 8. 2. Regula Falsi method 1. Declare the function f(x)=0 //For finding initial guesses 2. For i=0 Compute f(i) & f(i+1) if f(i)*f(i+1) <0 then break the loop else Continue by incrementing (i) by 1. //setting initial roots 3. x0= i ; x1= i+1 4. Compute f(x0) and f(x1) by putting x0 and x1 in the equation.
  • 9. //calculation of next root 5.Compute x2 by using formula x2= x0* f(x1) – x1*f(x0) f(x1)-f(x0) 6. Compute f(x2) // checking the roots and interchanging the values 7. If f(x0)*f(x2) < 0 then x1=x2 else x0=x2 8. If |x1-x0| > 0.0005 Goto step 4 9. The root of equation is x2 11. Exit
  • 10. 3. Newton- Raphson Method 1. Declare the function f(x)=0 // computing Differentiation 2. Compute the differentiation of the function Let it be df(x)=0 //For finding initial guesses 3. if f(i)*f(i+1) <0 break the loop else Continue by incrementing (i) by 1. //setting initial roots 4. x0= i ; x1= i+1 5. Take a value either x0 or x1 to proceed further 6. Compute f(x0) and df(x0)
  • 11. //calculation of next root 5.Compute x1by using formula x1= x0- f(x0) df(x0) 6. Compute f(x1) // checking the roots and interchanging the values 7. If |x1-x0| > 0.0005 then x0 = x1 ;Goto step 4 8. The root of equation is x0 10. Exit
  • 12. 4. Secant Method 1. Declare the function f(x)=0 //For finding initial guesses 2. For i=0 Compute f(i) & f(i+1) if f(i)*f(i+1) <0 then break the loop else Continue by incrementing (i) by 1. //setting initial roots 3. x0= i ; x1= i+1 4. Compute f(x0) and f(x1) by putting x0 and x1 in the equation.
  • 13. //calculation of next root 5.Compute x2 by using formula x2= x1 - f(x1) * x1 - x0 f(x1)-f(x0) 6. Compute f(x2) // checking the roots and interchanging the values 7. If f(x0)*f(x2) < 0 then x1=x2 else x0=x2 8. If |x1-x0| > 0.0005 Goto step 4 9. The root of equation is x2 11. Exit
  • 14. 5. Fixed Point Method • In Numerical analysis, Fixed point iteration is a method of computing fixed points of iterated functions. • More specifically, given a function f(x) defined on the real numbers with real values and given a point x0 in the domain of f(x), the fixed point iteration is • which gives rise to the sequence which is hoped to converge to a point x. If f(x) is continuous, then one can prove that the obtained x is a fixed point of f(x), i.e., f(x) = x. Example :-Babylonian method
  • 15. Babylonian method ( for finding square root) 1. Begin with an arbitrary positive starting value x0 (the closer to the root, the better). 2. Let xn+1 be the average of xn and S / xn (using the Arithmetic Mean to approximate the Geometric Mean). 3. Repeat step 2 until the desired accuracy is achieved. Xo =√s
  • 16. Interpolation Techniques • In the mathematical subfield of Numerical analysis, interpolation is a method of constructing new data points within the range of a discrete set of known data points. • For example, suppose we have a table like this, which gives some values of an unknown function f(x). x f(x) 0 0 Interpolation provides a means of 1 0.8415 estimating the function at intermediate points, 2 0.9093 such as x = 2.5 3 0.1411 4 -0.7568 5 −0.9589
  • 17. 1. Lagrange Interpolation • Let y=f(x) be a function which takes values (x0,y0),(x1,y1),_ _ , ( xn, yn). Since there are (n+1) pairs of values of (x) and (y). • Lagrange’s Formula state that Y= (x-x1) (x-x2)……. (x-xn) * y0 + (x-x0) (x-x2)……. (x-xn) *y1 (x0-x1)(x0-x2)…..(x0-xn) (x1-x2)(x0-x2)…..(x0-xn) + …. ……+ (x-x0) (x-x1) (x-x2)……. (x-xn-1) *yn (xn-x0)(xn-x1)…..(xn-xn-1)
  • 18. 1. Read the Number of values to be entered be (n) 2. Read the value of X for which the f(x) is to be find. 3. Start a loop from 0 to n store value of (x) and f(x) is array of length n . x[n], y[n] 4. Declare a variable Sum=0 . 5. Start a loop from ( i= 0 to n-1 ) 6. Product =1 7. Start another loop from ( j=0 to n-1) 8. If ( i ≠ j ) then product= product * (x- x[j]) / (x[i] - x[j] ) end j loop 9. Sum = sum + y[i] * product end i loop 10. f(x)= sum 11. Exit
  • 19. • We wish to interpolate ƒ(x) = x3 over the range 1 ≤ x ≤ 3, given these 3 points: The interpolating polynomial is: x0 = 1 f(x0) = 1 x1 = 2 f(x2) = 8 x3 = 3 f(x3) =27 x4= 4 f(x4) =64 x(5)= ?
  • 20. 2.Newton Interpolation method • There are two types of newtons Interpolation Methods 1 . Newton’s forward method It is applicable when the asked x value does not lie between last given x interval 2. Newton’s backward method It is applicable when the asked x value lie between last given x interval
  • 21. Newton’s forward method 1. Read the Number of values to be entered be (n) 2. Read the value of X for which the f(x) is to be find. 3. Start a loop from 0 to n store value of (x) and f(x) is array of length n . x[n], y[n] 4. Compute h= x[n+1] – x[n] 5. Compute u = x - x[0] // step differ in both method h 6. Declare a two Dimensional array. 7. Compute the Difference table
  • 22. Y0 ∆Y 1 ∆Y 2 ∆Y 3 ∆Y n …. 0 Y[0,0] ∆ Y1(0,1)= ∆ Y2(0,2)= ∆ Y3(0,3)= n-1 Y[1,0]-Y[0,0] ∆ Y1(1,1) -∆ Y1(0,1) ∆ Y2(2,1) -∆ Y1(0,2) 1 Y[1,0] ∆ Y1(1,1)= ∆ Y2(2,1)= Y[2,0]-Y[1,0] ∆ Y1(2,1) -∆ Y1(1,1) 2 Y[2,0] ∆ Y1(2,1)= Y[3,0]-Y[2,0] 3 Y[3,0]
  • 23. 8. Start a loop from 0 to n-1 , save value of first row of previous array in that name it Ynew[]. 9. Start a loop from (i= 0 to n-1 ) declare product = 1 10. Start a loop from (j= 0 to i) prod= prod * u – j j+1 end j loop 11. Value = prod* Ynew[(i+1)] sum=sum+value end I loop 12. The value of function at given x ie f(x) is sum.
  • 24. Newton’s Backward method 1. Read the Number of values to be entered be (n) 2. Read the value of X for which the f(x) is to be find. 3. Start a loop from 0 to n store value of (x) and f(x) is array of length n . x[n], y[n] 4. Compute h= x[n+1] – x[n] 5. Compute u = x - x[n] // step differ in both method h 6. Declare a two Dimensional array. 7. Compute the Difference table
  • 25. Y0 ∆Y 1 ∆Y 2 ∆Y 3 ∆Y n …. 0 Y[0,0] ∆ Y1(0,1)= ∆ Y2(0,2)= ∆ Y3(0,3)= n-1 Y[1,0]-Y[0,0] ∆ Y1(1,1) -∆ Y1(0,1) ∆ Y2(2,1) -∆ Y1(0,2) 1 Y[1,0] ∆ Y1(1,1)= ∆ Y2(2,1)= Y[2,0]-Y[1,0] ∆ Y1(2,1) -∆ Y1(1,1) 2 Y[2,0] ∆ Y1(2,1)= Y[3,0]-Y[2,0] 3 Y[3,0]
  • 26. 8. Start a loop from ( i=0 to n-1) , Start a loop from ( j=n to 0) , assign Ynew[i] = difference[n][i] end loop j End loop I 9. Start a loop from (i= 0 to n-1 ) declare product = 1 10. Start a loop from (j= 0 to i) prod= prod * u – j j+1 end j loop 11. Value = prod* Ynew[(i+1)] sum = sum+ value end i loop 12. The value of function at given x ie f(x) is sum.