數值方法 2008, Applied Mathematics NDHU 1 Numerical Integration
數值方法 2008, Applied Mathematics NDHU 2 Four 2-variate Gaussians
數值方法 2008, Applied Mathematics NDHU 3 Four 2-variate Gaussians
數值方法 2008, Applied Mathematics NDHU 4 Gaussian pdf
數值方法 2008, Applied Mathematics NDHU 5 Weight sum of Gaussian pdfs
數值方法 2008, Applied Mathematics NDHU 6 myfx4.m
數值方法 2008, Applied Mathematics NDHU 7 Plot 4G plot_4G.m
數值方法 2008, Applied Mathematics NDHU 8 Integration of 4G demo_int_4G.m Double integration
數值方法 2008, Applied Mathematics NDHU 9 Numeric calculus for double integrals
數值方法 2008, Applied Mathematics NDHU 10 Example Approx. integral True Integral demo_ex2_4G.m by dblquard.m
exp(cos(x)) 數值方法 2008, Applied Mathematics NDHU 11 plot_expcos.m
Definite Integration 數值方法 2008, Applied Mathematics NDHU 12 demo_quad.m
Symbolic integration 數值方法 2008, Applied Mathematics NDHU 13 demo_int.m
Example 數值方法 2008, Applied Mathematics NDHU 14 function of x:x.^2+2*x-5 fx1 = Inline function: fx1(x) = 1./3.*x.^3+x.^2-5.*x
數值方法 2008, Applied Mathematics NDHU 15 Numerical integration - quadrature
數值方法 2008, Applied Mathematics NDHU 16 Counter example >> demo_int function of x:(1-sin(x.^2)).^(1/3) Warning: Explicit integral could not be found.
數值方法 2008, Applied Mathematics NDHU 17
數值方法 2008, Applied Mathematics NDHU 18 plot_sin13.m
數值方法 2008, Applied Mathematics NDHU 19 Numerical integration demo_quad2.m
數值方法 2008, Applied Mathematics NDHU 20 Mesh
數值方法 2008, Applied Mathematics NDHU 21 Lower and upper sum
數值方法 2008, Applied Mathematics NDHU 22 Lower sum : lower bound
數值方法 2008, Applied Mathematics NDHU 23 Upper sum : upper bound
數值方法 2008, Applied Mathematics NDHU 24 Composite Trapezoid rule
數值方法 2008, Applied Mathematics NDHU 25 Uniform mesh
數值方法 2008, Applied Mathematics NDHU 26 Error Analysis
數值方法 2008, Applied Mathematics NDHU 27 Partition size
Composite Trapezoid rule input s, a and b f = inline(s); Set n h = (b-a)/n; ans = 1/2*(f(a)+f(b)) for i=1:n-1 add f(a+i*h) to ans ans= ans*h 數值方法 2008, Applied Mathematics NDHU 28
f = inline(s); Set n h = (b-a)/n; ans = 1/2*(f(a)+f(b)) Input s,a,b Flow Chart 數值方法 2008, Applied Mathematics NDHU 29 for i=1:n-1 add f(a+i*h) to ansans= ans*h EXIT
Simpson rule for numerical integration 數值方法 2008, Applied Mathematics NDHU 30
Exercise Draw a flow chart to illustrate integration by the composite Trapezoid rule Implement the composite Trapezoid rule for numerical integration, including flow chart and Matlab codes Test your matlab function with the following integration * Test your matlab function with definite integration of the weight sum of four Gaussian pdfs * Compare your results with those obtained by using quad.m 數值方法 2008, Applied Mathematics NDHU 31 f(x)=exp(cos(x))