290 likes | 444 Views
Chem 302 - Math 252. Chapter 4 Differentiation & Integration. Differentiation & Integration. Experimental data at discrete points Need to know the rate of change of the dependent variable with respect to the independent variable Need to know area under curve
E N D
Chem 302 - Math 252 Chapter 4Differentiation & Integration
Differentiation & Integration • Experimental data at discrete points • Need to know the rate of change of the dependent variable with respect to the independent variable • Need to know area under curve • Need to integrate an analytic function that is too complicated to do analytically • Can do interpolation/curvefitting to get an analytic function
Linear Differentiation Smaller spacing not necessarily better
3 point Differentiation • Linear differentiation ignores actual point • Make exact for
Multi-point Differentiation • Formulae only derived for equal spacing • Non equal spacing solve equations numerically
Midpoint Formula • Uses value of function and slope at midpoint of interval • Determine w1 & w2
Composite Midpoint Formula • n subintervals (equal spacing)
Trapezoidal Integration • Approximate f(x) by a linear function over interval [a,b]
Trapezoidal Integration • Alternate derivation • Linear combination of endpoints that give best estimate of integral • Determine w1 & w2
Composite Trapezoidal Integration • n subintervals (equal spacing)
Simpson’s Rule • Combines Trapezoidal and Midpoint • Also referred to as 3 - point • Determine w1w2 & w3
Composite Simpson’s Rule • 2n subintervals (equal spacing)
Newton-Cotes Formula • Generalization to use more than 3 points • Trapezoidal exact up to linear – (1st order NC) • Simpson’s exact up to quadratic (by definition but turns out to be exact for up to cubic) – (2nd order NC) • Equivalent to integration of Lagrangian interpolation functions • 3rd order NC • Use 4 points and functions up to cubic • Higher orders can give larger errors
Gaussian Quadratures • So far evaluated function at fixed points & optimized coefficients • Optimize locations also • Optimize wi & zi
Gaussian Quadratures • 1-point • Need two equations • Make exact for f(z) = 1, & f(z) = z
Gaussian Quadratures • 2-point • Need four equations • Make exact for f(z) = 1, f(z) = z, f(z) = z2, f(z) = z3 • Does not give unique solution • Make symmetric about 0
Gaussian Quadratures • Other forms
Gaussian Quadratures - Example • Simpson’s Rule • Use 100 intervals • Gaussian Quadrature • 3 and 15 point