SlideShare uma empresa Scribd logo
1 de 27
AHSANULLAH UNIVERSITY OF
SCIENCE AND TECHNOLOGY
EEE 3110
NUMERICAL TECHNIQUE LABORATORY
PRESENTED BY :
AINUL ISLAM (ID 12-02-05-065)
SHADMAN SAKIB AOYON (ID 12-02-05-060)
MIRZA SHAMIM ARMAN (ID 12-02-05-072)
TAUHIDUR RAHMAN AKIF (ID 12-02-05-062)
KAZI WALIDA AFROZE (ID 12-02-05-079)
CONTENTS:
• INTRODUCTION TO NUMERICAL DIFFERENTIATION
• FORWARD DIFFERENCE FORMULA
• CENTRAL DIFFERENCE FORMULA
• RICHARDSON’S EXTRAPOLATION
• INTRODUCTION TO NUMERICAL INTEGRATION
• TRAPEZOIDAL RULE
• SIMPSON’S RULE
Numerical Differentiation :
Numerical differentiation deals with the following problem : we are given the function
y = f (x) and wish to obtain one of its derivatives at the point x = xk. The term “given”
means that we either have an algorithm for computing the function, or possess a
set of discrete data points (xi , yi ), i = 1, 2, . . . , n. In either case, we have access to a
finite number of (x, y) data pairs from which to compute the derivative. If you suspect
by now that numerical differentiation is related to interpolation, you are right—one
means of finding the derivative is to approximate the function locally by a polynomial
and then differentiate it. An equally effective tool is the Taylor series expansion of
f (x) about the point xk. The latter has the advantage of providing us with information
about the error involved in the approximation.
Numerical differentiation is not a particularly accurate process. It suffers from
a conflict between round off errors (due to limited machine precision) and errors
inherent in interpolation. For this reason, a derivative of a function can never be
computed with the same precision as the function itself
Taylor series expansion can be used to generate high-
accuracy formulas for derivatives by using linear algebra
to combine the expansion around several points.
We will discuss three categories of formula:
• Forward difference formula
•Centered difference formula
•Richardson Extrapolation formula
FORWARD DIFFERENCE FORMULA
EXAMPLE :
Given that f(x)=(sin x) and h=.001 find the first derivative f’(x)
using forward difference formula in MATLAB :
Code :-
clear all;
close all;
clc;
h=.001;
x=0:(.001):2*pi;
f=inline(‘sin (x)’)
q=f(x)
d=f(x+h)
a=((d-q)/h)
plot(x,a)
d
a
CENTRAL DIFFERENCE FORMULA :
Richardson Extrapolation
• As with integration, the Richardson extrapolation can be used to combine two lower-accuracy
estimates of the derivative to produce a higher-accuracy estimate.
• For the cases where there are two O(h2
) estimates and the interval is halved (h2=h1/2), an
improved O(h4
) estimate may be formed using:
• For the cases where there are two O(h4
) estimates and the interval is halved (h2=h1/2), an
improved O(h6
) estimate may be formed using:
D=
4
3
D(h2)−
1
3
D(h1)
D=
16
15
D(h2)−
1
15
D(h1)
Numerical integration, also known as quadrature, is intrinsically a much more accurate
procedure than numerical differentiation. Quadrature approximates the definite
Integral. Numerical integration is a widely encountered problem in economics.
All rules of quadrature are derived from polynomial interpolation of the
integrand. Therefore, they work best if f (x) can be approximated by a polynomial.
Methods of numerical integration can be divided into two groups:
1.Newton–Cotes formulas (The Trapezoidal Rule and Simpson’s Rule)
2.Gaussian quadrature.
Newton–Cotes formulas are characterized by
equally spaced abscissas, and include well-known methods such as the trapezoidal
rule and Simpson’s rule. They are most useful if f (x) has already been computed at
equal intervals, or can be computed at low cost. Since Newton–Cotes formulas are
based on local interpolation, they require only a piecewise fit to a polynomial
INTRODUCTION TO NUMERICAL INTEGRATION :
The trapezoidal rule uses trapezoids
to approximate area, which usually is
a much more accurate
approximation, even with just a few
subintervals.
Notice that the height of the
trapezoids will actually be Δx
(horizontal) and bases will be the parallel
f(xi) (vertical) on each side of the
subinterval.
( )trapezoid
1 2
A =
2
b b
h
+
×
THE TRAPEZOIDAL RULE
What is Trapezoidal Method ?
1
Observe that the coefficients are 1, 2, 2, 2, 2, . . . 2, 1
TRAPEZOIDAL RULE
4
The area of the first trapezoid would be
0 1( ) ( )
2
f x f x b a
n
+ −   
× ÷    
0 1 11 2( ) ( ) ( ) ( )( ) ( )
2 2 2
n nf x f x f x f xf x f xb a
n
−+ ++−   
+ +×× × + ÷ 
   
Area =
and then total area would be
Letting the number of trapezoids n approach infinity, you
improve the approximation to the exact answer.
( ) ( ) ( )0 1 1 2 1lim ( ) ( ) ( ) ( ) ( ) ( )
2
n n
n
b a
f x f x f x f x f x f x
n
−
→∞
−
+ + + +×× × + +  
There are many alternatives to the trapezoidal rule,
but this method deserves attention because of :
•Its ease of use
•The trapezoidal rule has faster convergence.
•Moreover, the trapezoidal rule tends to become extremely accurate than
periodic functions
•Powerful convergence properties
•Straightforward analysis
Advantages
7
Thomas Simpson (1710-1761) used second-degree polynomials
(a section of a quadratic) to approximate the graph for each subinterval.
Before we get into Simpson’s Rule, we need to list a theorem for evaluating
integrals of polynomials of degree 2 or less.
THE SIMPSON’S RULE
THE SIMPSON’S RULE
Notice the coefficients are 1, 4, 2, 4, . . . 2, 4, 1
EXAMPLE OF SIMPSON’S RULE :
Given, f=(cos x); n=12; low value=-1; high value=2;
Integrate the function over the values of x using Simpson’s 1/3 rule :
clear all;
close all;
clc;
h= -0.1;
n=12;
sum=0;
f=inline(‘ cos (x)’);
sum=sum + f(a)
for i=2 : 2 :n ;
x(i)=a + i*n;
sum=sum+4*f(x(i))
end
for i =3 : 2 : (n-1) ;
x( i )=a + i *n;
sum=sum+2*f(x(i))
end
sum=sum + f(a +n * h)
p=(sum*h)/3
ERRORS :
These two expressions tell how much of an error you can expect to
get using either the Trapezoidal Rule or Simpson’s Rule.
 http://en.wikipedia.org
 www.google.com
 http://slideshare.com
 And various relevant websites
References
15
Thank You

Mais conteúdo relacionado

Mais procurados

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
 
Presentation on Numerical Integration
Presentation on Numerical IntegrationPresentation on Numerical Integration
Presentation on Numerical IntegrationTausif Shahanshah
 
Newton raphson method
Newton raphson methodNewton raphson method
Newton raphson methodJayesh Ranjan
 
Numerical differentiation
Numerical differentiationNumerical differentiation
Numerical differentiationandrushow
 
Euler's Method
Euler's MethodEuler's Method
Euler's Methoddmidgette
 
Newton's Forward/Backward Difference Interpolation
Newton's Forward/Backward  Difference InterpolationNewton's Forward/Backward  Difference Interpolation
Newton's Forward/Backward Difference InterpolationVARUN KUMAR
 
trapezoidal and simpson's 1/3 and 3/8 rule
trapezoidal and simpson's 1/3 and 3/8 ruletrapezoidal and simpson's 1/3 and 3/8 rule
trapezoidal and simpson's 1/3 and 3/8 rulehitarth shah
 
Numerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential EquationsNumerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential EquationsMeenakshisundaram N
 
Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series IntroductionRizwan Kazi
 
03 truncation errors
03 truncation errors03 truncation errors
03 truncation errorsmaheej
 
Derivation of Simpson's 1/3 rule
Derivation of Simpson's 1/3 ruleDerivation of Simpson's 1/3 rule
Derivation of Simpson's 1/3 ruleHapPy SumOn
 
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
 
Laurent's Series & Types of Singularities
Laurent's Series & Types of SingularitiesLaurent's Series & Types of Singularities
Laurent's Series & Types of SingularitiesAakash Singh
 

Mais procurados (20)

Secant method
Secant method Secant method
Secant method
 
Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)
 
Presentation on Numerical Integration
Presentation on Numerical IntegrationPresentation on Numerical Integration
Presentation on Numerical Integration
 
Newton raphson method
Newton raphson methodNewton raphson method
Newton raphson method
 
Numerical differentiation
Numerical differentiationNumerical differentiation
Numerical differentiation
 
Euler's Method
Euler's MethodEuler's Method
Euler's Method
 
Newton's Forward/Backward Difference Interpolation
Newton's Forward/Backward  Difference InterpolationNewton's Forward/Backward  Difference Interpolation
Newton's Forward/Backward Difference Interpolation
 
Numerical analysis ppt
Numerical analysis pptNumerical analysis ppt
Numerical analysis ppt
 
Metric space
Metric spaceMetric space
Metric space
 
Unit4
Unit4Unit4
Unit4
 
trapezoidal and simpson's 1/3 and 3/8 rule
trapezoidal and simpson's 1/3 and 3/8 ruletrapezoidal and simpson's 1/3 and 3/8 rule
trapezoidal and simpson's 1/3 and 3/8 rule
 
Numerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential EquationsNumerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential Equations
 
Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series Introduction
 
NUMERICAL METHOD
NUMERICAL METHODNUMERICAL METHOD
NUMERICAL METHOD
 
Secant Method
Secant MethodSecant Method
Secant Method
 
Newton Raphson
Newton RaphsonNewton Raphson
Newton Raphson
 
03 truncation errors
03 truncation errors03 truncation errors
03 truncation errors
 
Derivation of Simpson's 1/3 rule
Derivation of Simpson's 1/3 ruleDerivation of Simpson's 1/3 rule
Derivation of Simpson's 1/3 rule
 
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
 
Laurent's Series & Types of Singularities
Laurent's Series & Types of SingularitiesLaurent's Series & Types of Singularities
Laurent's Series & Types of Singularities
 

Destaque

8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integrationdicosmo178
 
Applied numerical methods lec10
Applied numerical methods lec10Applied numerical methods lec10
Applied numerical methods lec10Yasser Ahmed
 
NUMERICAL INTEGRATION AND ITS APPLICATIONS
NUMERICAL INTEGRATION AND ITS APPLICATIONSNUMERICAL INTEGRATION AND ITS APPLICATIONS
NUMERICAL INTEGRATION AND ITS APPLICATIONSGOWTHAMGOWSIK98
 
Cyberwellness talk by mdm saedah 2011 160211
Cyberwellness talk by mdm saedah 2011 160211Cyberwellness talk by mdm saedah 2011 160211
Cyberwellness talk by mdm saedah 2011 160211Saedah
 
Cyberwellness 2011 hws
Cyberwellness 2011 hwsCyberwellness 2011 hws
Cyberwellness 2011 hwsAbel Kok
 
Cyber wellness 2
Cyber wellness 2Cyber wellness 2
Cyber wellness 2Chu Yuan
 
Bisection method solved questions
Bisection method solved questionsBisection method solved questions
Bisection method solved questionsSonia Pahuja
 
numerical method solutions
numerical method solutionsnumerical method solutions
numerical method solutionsSonia Pahuja
 
Multiple sagement trapezoidal rule
Multiple sagement trapezoidal ruleMultiple sagement trapezoidal rule
Multiple sagement trapezoidal ruleTanmoy Debnath
 
Cyberwellness Refers To The Positive Well Being Of Internet
Cyberwellness Refers To The Positive Well Being Of InternetCyberwellness Refers To The Positive Well Being Of Internet
Cyberwellness Refers To The Positive Well Being Of Internetbeh yong hua
 
MAT210/Integration/Basic 2013-14
MAT210/Integration/Basic 2013-14MAT210/Integration/Basic 2013-14
MAT210/Integration/Basic 2013-14John Ham
 
25285 mws gen_int_ppt_trapcontinuous
25285 mws gen_int_ppt_trapcontinuous25285 mws gen_int_ppt_trapcontinuous
25285 mws gen_int_ppt_trapcontinuousJyoti Parange
 
Gaussian Quadrature Formula
Gaussian Quadrature FormulaGaussian Quadrature Formula
Gaussian Quadrature FormulaDhaval Shukla
 

Destaque (20)

[4] num integration
[4] num integration[4] num integration
[4] num integration
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
 
Applied numerical methods lec10
Applied numerical methods lec10Applied numerical methods lec10
Applied numerical methods lec10
 
Es272 ch6
Es272 ch6Es272 ch6
Es272 ch6
 
NUMERICAL INTEGRATION AND ITS APPLICATIONS
NUMERICAL INTEGRATION AND ITS APPLICATIONSNUMERICAL INTEGRATION AND ITS APPLICATIONS
NUMERICAL INTEGRATION AND ITS APPLICATIONS
 
Cyberwellness talk by mdm saedah 2011 160211
Cyberwellness talk by mdm saedah 2011 160211Cyberwellness talk by mdm saedah 2011 160211
Cyberwellness talk by mdm saedah 2011 160211
 
Cyberwellness 2011 hws
Cyberwellness 2011 hwsCyberwellness 2011 hws
Cyberwellness 2011 hws
 
Romberg
RombergRomberg
Romberg
 
Cyber wellness 2
Cyber wellness 2Cyber wellness 2
Cyber wellness 2
 
Bisection method solved questions
Bisection method solved questionsBisection method solved questions
Bisection method solved questions
 
Cyber-Wellness
Cyber-WellnessCyber-Wellness
Cyber-Wellness
 
numerical method solutions
numerical method solutionsnumerical method solutions
numerical method solutions
 
Multiple sagement trapezoidal rule
Multiple sagement trapezoidal ruleMultiple sagement trapezoidal rule
Multiple sagement trapezoidal rule
 
Cyberwellness Refers To The Positive Well Being Of Internet
Cyberwellness Refers To The Positive Well Being Of InternetCyberwellness Refers To The Positive Well Being Of Internet
Cyberwellness Refers To The Positive Well Being Of Internet
 
MAT210/Integration/Basic 2013-14
MAT210/Integration/Basic 2013-14MAT210/Integration/Basic 2013-14
MAT210/Integration/Basic 2013-14
 
Calc 4.6
Calc 4.6Calc 4.6
Calc 4.6
 
1519 differentiation-integration-02
1519 differentiation-integration-021519 differentiation-integration-02
1519 differentiation-integration-02
 
Cyberwellness
CyberwellnessCyberwellness
Cyberwellness
 
25285 mws gen_int_ppt_trapcontinuous
25285 mws gen_int_ppt_trapcontinuous25285 mws gen_int_ppt_trapcontinuous
25285 mws gen_int_ppt_trapcontinuous
 
Gaussian Quadrature Formula
Gaussian Quadrature FormulaGaussian Quadrature Formula
Gaussian Quadrature Formula
 

Semelhante a MATLAB : Numerical Differention and Integration

Roots of equations
Roots of equationsRoots of equations
Roots of equationsMileacre
 
Efficient Accuracy: A Study on Numerical Integration.
Efficient Accuracy: A Study on Numerical Integration. Efficient Accuracy: A Study on Numerical Integration.
Efficient Accuracy: A Study on Numerical Integration. ShaifulIslam56
 
Overviewing the techniques of Numerical Integration.pdf
Overviewing the techniques of Numerical Integration.pdfOverviewing the techniques of Numerical Integration.pdf
Overviewing the techniques of Numerical Integration.pdfArijitDhali
 
NUMERICAL METHOD'S
NUMERICAL METHOD'SNUMERICAL METHOD'S
NUMERICAL METHOD'Ssrijanani16
 
HOME ASSIGNMENT (0).pptx
HOME ASSIGNMENT (0).pptxHOME ASSIGNMENT (0).pptx
HOME ASSIGNMENT (0).pptxSayedulHassan1
 
Newton's Raphson method
Newton's Raphson methodNewton's Raphson method
Newton's Raphson methodSaloni Singhal
 
Secent method
Secent methodSecent method
Secent methodritu1806
 
A Comparison Of Iterative Methods For The Solution Of Non-Linear Systems Of E...
A Comparison Of Iterative Methods For The Solution Of Non-Linear Systems Of E...A Comparison Of Iterative Methods For The Solution Of Non-Linear Systems Of E...
A Comparison Of Iterative Methods For The Solution Of Non-Linear Systems Of E...Stephen Faucher
 
HOME ASSIGNMENT omar ali.pptx
HOME ASSIGNMENT omar ali.pptxHOME ASSIGNMENT omar ali.pptx
HOME ASSIGNMENT omar ali.pptxSayedulHassan1
 
Non linearequationsmatlab
Non linearequationsmatlabNon linearequationsmatlab
Non linearequationsmatlabsheetslibrary
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equationsZunAib Ali
 
Non linearequationsmatlab
Non linearequationsmatlabNon linearequationsmatlab
Non linearequationsmatlabZunAib Ali
 
TIU CET Review Math Session 6 - part 2 of 2
TIU CET Review Math Session 6 - part 2 of 2TIU CET Review Math Session 6 - part 2 of 2
TIU CET Review Math Session 6 - part 2 of 2youngeinstein
 
Comparison Results of Trapezoidal, Simpson’s 13 rule, Simpson’s 38 rule, and ...
Comparison Results of Trapezoidal, Simpson’s 13 rule, Simpson’s 38 rule, and ...Comparison Results of Trapezoidal, Simpson’s 13 rule, Simpson’s 38 rule, and ...
Comparison Results of Trapezoidal, Simpson’s 13 rule, Simpson’s 38 rule, and ...BRNSS Publication Hub
 

Semelhante a MATLAB : Numerical Differention and Integration (20)

Roots of equations
Roots of equationsRoots of equations
Roots of equations
 
Efficient Accuracy: A Study on Numerical Integration.
Efficient Accuracy: A Study on Numerical Integration. Efficient Accuracy: A Study on Numerical Integration.
Efficient Accuracy: A Study on Numerical Integration.
 
Overviewing the techniques of Numerical Integration.pdf
Overviewing the techniques of Numerical Integration.pdfOverviewing the techniques of Numerical Integration.pdf
Overviewing the techniques of Numerical Integration.pdf
 
NUMERICAL METHOD'S
NUMERICAL METHOD'SNUMERICAL METHOD'S
NUMERICAL METHOD'S
 
OPERATIONS RESEARCH
OPERATIONS RESEARCHOPERATIONS RESEARCH
OPERATIONS RESEARCH
 
HOME ASSIGNMENT (0).pptx
HOME ASSIGNMENT (0).pptxHOME ASSIGNMENT (0).pptx
HOME ASSIGNMENT (0).pptx
 
Newton's Raphson method
Newton's Raphson methodNewton's Raphson method
Newton's Raphson method
 
Secent method
Secent methodSecent method
Secent method
 
A Comparison Of Iterative Methods For The Solution Of Non-Linear Systems Of E...
A Comparison Of Iterative Methods For The Solution Of Non-Linear Systems Of E...A Comparison Of Iterative Methods For The Solution Of Non-Linear Systems Of E...
A Comparison Of Iterative Methods For The Solution Of Non-Linear Systems Of E...
 
CALCULUS 2.pptx
CALCULUS 2.pptxCALCULUS 2.pptx
CALCULUS 2.pptx
 
HOME ASSIGNMENT omar ali.pptx
HOME ASSIGNMENT omar ali.pptxHOME ASSIGNMENT omar ali.pptx
HOME ASSIGNMENT omar ali.pptx
 
Secant method
Secant methodSecant method
Secant method
 
Quadrature
QuadratureQuadrature
Quadrature
 
Non linearequationsmatlab
Non linearequationsmatlabNon linearequationsmatlab
Non linearequationsmatlab
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equations
 
Non linearequationsmatlab
Non linearequationsmatlabNon linearequationsmatlab
Non linearequationsmatlab
 
TIU CET Review Math Session 6 - part 2 of 2
TIU CET Review Math Session 6 - part 2 of 2TIU CET Review Math Session 6 - part 2 of 2
TIU CET Review Math Session 6 - part 2 of 2
 
Optimization tutorial
Optimization tutorialOptimization tutorial
Optimization tutorial
 
v39i11.pdf
v39i11.pdfv39i11.pdf
v39i11.pdf
 
Comparison Results of Trapezoidal, Simpson’s 13 rule, Simpson’s 38 rule, and ...
Comparison Results of Trapezoidal, Simpson’s 13 rule, Simpson’s 38 rule, and ...Comparison Results of Trapezoidal, Simpson’s 13 rule, Simpson’s 38 rule, and ...
Comparison Results of Trapezoidal, Simpson’s 13 rule, Simpson’s 38 rule, and ...
 

Último

UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 

Último (20)

UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 

MATLAB : Numerical Differention and Integration

  • 1. AHSANULLAH UNIVERSITY OF SCIENCE AND TECHNOLOGY EEE 3110 NUMERICAL TECHNIQUE LABORATORY
  • 2.
  • 3. PRESENTED BY : AINUL ISLAM (ID 12-02-05-065) SHADMAN SAKIB AOYON (ID 12-02-05-060) MIRZA SHAMIM ARMAN (ID 12-02-05-072) TAUHIDUR RAHMAN AKIF (ID 12-02-05-062) KAZI WALIDA AFROZE (ID 12-02-05-079)
  • 4. CONTENTS: • INTRODUCTION TO NUMERICAL DIFFERENTIATION • FORWARD DIFFERENCE FORMULA • CENTRAL DIFFERENCE FORMULA • RICHARDSON’S EXTRAPOLATION • INTRODUCTION TO NUMERICAL INTEGRATION • TRAPEZOIDAL RULE • SIMPSON’S RULE
  • 5. Numerical Differentiation : Numerical differentiation deals with the following problem : we are given the function y = f (x) and wish to obtain one of its derivatives at the point x = xk. The term “given” means that we either have an algorithm for computing the function, or possess a set of discrete data points (xi , yi ), i = 1, 2, . . . , n. In either case, we have access to a finite number of (x, y) data pairs from which to compute the derivative. If you suspect by now that numerical differentiation is related to interpolation, you are right—one means of finding the derivative is to approximate the function locally by a polynomial and then differentiate it. An equally effective tool is the Taylor series expansion of f (x) about the point xk. The latter has the advantage of providing us with information about the error involved in the approximation. Numerical differentiation is not a particularly accurate process. It suffers from a conflict between round off errors (due to limited machine precision) and errors inherent in interpolation. For this reason, a derivative of a function can never be computed with the same precision as the function itself
  • 6. Taylor series expansion can be used to generate high- accuracy formulas for derivatives by using linear algebra to combine the expansion around several points. We will discuss three categories of formula: • Forward difference formula •Centered difference formula •Richardson Extrapolation formula
  • 7.
  • 9. EXAMPLE : Given that f(x)=(sin x) and h=.001 find the first derivative f’(x) using forward difference formula in MATLAB : Code :- clear all; close all; clc; h=.001; x=0:(.001):2*pi; f=inline(‘sin (x)’) q=f(x) d=f(x+h) a=((d-q)/h) plot(x,a) d a
  • 10.
  • 11.
  • 13.
  • 14. Richardson Extrapolation • As with integration, the Richardson extrapolation can be used to combine two lower-accuracy estimates of the derivative to produce a higher-accuracy estimate. • For the cases where there are two O(h2 ) estimates and the interval is halved (h2=h1/2), an improved O(h4 ) estimate may be formed using: • For the cases where there are two O(h4 ) estimates and the interval is halved (h2=h1/2), an improved O(h6 ) estimate may be formed using: D= 4 3 D(h2)− 1 3 D(h1) D= 16 15 D(h2)− 1 15 D(h1)
  • 15. Numerical integration, also known as quadrature, is intrinsically a much more accurate procedure than numerical differentiation. Quadrature approximates the definite Integral. Numerical integration is a widely encountered problem in economics. All rules of quadrature are derived from polynomial interpolation of the integrand. Therefore, they work best if f (x) can be approximated by a polynomial. Methods of numerical integration can be divided into two groups: 1.Newton–Cotes formulas (The Trapezoidal Rule and Simpson’s Rule) 2.Gaussian quadrature. Newton–Cotes formulas are characterized by equally spaced abscissas, and include well-known methods such as the trapezoidal rule and Simpson’s rule. They are most useful if f (x) has already been computed at equal intervals, or can be computed at low cost. Since Newton–Cotes formulas are based on local interpolation, they require only a piecewise fit to a polynomial INTRODUCTION TO NUMERICAL INTEGRATION :
  • 16. The trapezoidal rule uses trapezoids to approximate area, which usually is a much more accurate approximation, even with just a few subintervals. Notice that the height of the trapezoids will actually be Δx (horizontal) and bases will be the parallel f(xi) (vertical) on each side of the subinterval. ( )trapezoid 1 2 A = 2 b b h + × THE TRAPEZOIDAL RULE
  • 17. What is Trapezoidal Method ? 1
  • 18. Observe that the coefficients are 1, 2, 2, 2, 2, . . . 2, 1 TRAPEZOIDAL RULE
  • 19. 4
  • 20. The area of the first trapezoid would be 0 1( ) ( ) 2 f x f x b a n + −    × ÷     0 1 11 2( ) ( ) ( ) ( )( ) ( ) 2 2 2 n nf x f x f x f xf x f xb a n −+ ++−    + +×× × + ÷      Area = and then total area would be Letting the number of trapezoids n approach infinity, you improve the approximation to the exact answer. ( ) ( ) ( )0 1 1 2 1lim ( ) ( ) ( ) ( ) ( ) ( ) 2 n n n b a f x f x f x f x f x f x n − →∞ − + + + +×× × + +  
  • 21. There are many alternatives to the trapezoidal rule, but this method deserves attention because of : •Its ease of use •The trapezoidal rule has faster convergence. •Moreover, the trapezoidal rule tends to become extremely accurate than periodic functions •Powerful convergence properties •Straightforward analysis Advantages 7
  • 22. Thomas Simpson (1710-1761) used second-degree polynomials (a section of a quadratic) to approximate the graph for each subinterval. Before we get into Simpson’s Rule, we need to list a theorem for evaluating integrals of polynomials of degree 2 or less. THE SIMPSON’S RULE
  • 23. THE SIMPSON’S RULE Notice the coefficients are 1, 4, 2, 4, . . . 2, 4, 1
  • 24. EXAMPLE OF SIMPSON’S RULE : Given, f=(cos x); n=12; low value=-1; high value=2; Integrate the function over the values of x using Simpson’s 1/3 rule : clear all; close all; clc; h= -0.1; n=12; sum=0; f=inline(‘ cos (x)’); sum=sum + f(a) for i=2 : 2 :n ; x(i)=a + i*n; sum=sum+4*f(x(i)) end for i =3 : 2 : (n-1) ; x( i )=a + i *n; sum=sum+2*f(x(i)) end sum=sum + f(a +n * h) p=(sum*h)/3
  • 25. ERRORS : These two expressions tell how much of an error you can expect to get using either the Trapezoidal Rule or Simpson’s Rule.
  • 26.  http://en.wikipedia.org  www.google.com  http://slideshare.com  And various relevant websites References 15