Assignment 1: due 1/17/19 Estimate all of the zero of x3-x2-2x+1 graphically. Write a MatLab code for Newton’s method. Use your code to refine the graphical.

Slides:



Advertisements
Similar presentations
Numerical Integration
Advertisements

4.7 Write and Apply Exponential & Power Functions
MATHEMATICAL METHODS.
Numerical Integration of Functions
Today’s class Romberg integration Gauss quadrature Numerical Methods
MANE 4240 & CIVL 4240 Introduction to Finite Elements Numerical Integration in 1D Prof. Suvranu De.
Numerical Integration
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Chapter 10 ordinary differential equations (ODEs) Chapter 11 systems of ODEs (6 th edition)
Integration of Equations
Numerical Solution of Ordinary Differential Equation
Quadrature Greg Beckham. Quadrature Numerical Integration Goal is to obtain the integral with as few computations of the integrand as possible.
Using the Quadratic Formula to Solve a Quadratic Equation
Simpson’s 1/3 rd Rule of Integration. What is Integration? Integration The process of measuring the area under a.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
3. Numerical integration (Numerical quadrature) .
1 Chapter 7 NUMERICAL INTEGRATION. 2 PRELIMINARIES We use numerical integration when the function f(x) may not be integrable in closed form or even in.
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
4.6 Numerical Integration -Trapezoidal Rule -Simpson’s Rule
1 Simpson’s 1/3 rd Rule of Integration. 2 What is Integration? Integration The process of measuring the area under a curve. Where: f(x) is the integrand.
Chapters 5 and 6: Numerical Integration
CSE 330 : Numerical Methods
1 Trapezoidal Rule of Integration. What is Integration Integration: The process of measuring the area under a function.
MA2213 Lecture 4 Numerical Integration. Introduction Definition is the limit of Riemann sums I(f)
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Numerical Methods Applications of Loops: The power of MATLAB Mathematics + Coding 1.
5.1.  When we use the midpoint rule or trapezoid rule we can actually calculate the maximum error in the calculation to get an idea how much we are off.
Chapter 3 Roots of Equations. Objectives Understanding what roots problems are and where they occur in engineering and science Knowing how to determine.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 22.
Trapezoidal Rule of Integration
Quadrature rules 1Michael Sokolov / Numerical Methods for Chemical Engineers / Numerical Quadrature Michael Sokolov ETH Zurich, Institut für Chemie- und.
CHAPTER 3 NUMERICAL METHODS
MECN 3500 Inter - Bayamon Lecture 6 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Chapter 10 ordinary differential equations (ODEs) Chapter 11 systems of ODEs (6 th edition)
Finding zeros (also called roots) of a function Overview: Define the problem Methods of solution Graphical Newton’s Bisection Secant.
Antiderivatives and Indefinite Integration
6. Numerical Integration 6.1 Definition of numerical integration. 6.2 Reasons to use numerical integration. 6.3 Formulas of numerical Integration. 6.4.
Chapters 5 and 6: Numerical Integration Code development trapezoid rule Simpson’s rule Gauss quadrature Laguerre quadrature Analysis changing the variable.
Finding zeros (also called roots) of a function Overview: Define the problem Methods of solution Graphical Newton’s Bisection Secant.
Chapter 12: Data Analysis by linear least squares Overview: Formulate problem as an over-determined linear system of equations Solve the linear system.
Quadrature – Concepts (numerical integration) Don Allen.
Assignment 1: due 1/19/16 Estimate all of the zero of x3-x2-2x+1 graphically. Write a MatLab code for Newton’s method. Use your code to refine the graphical.
Answers for Review Questions for Lectures 1-4. Review Lectures 1-4 Problems Question 2. Derive a closed form for the estimate of the solution of the equation.
Trapezoidal Rule of Integration
CHAPTER 3 NUMERICAL METHODS
Air Force Admin College, Coimbatore
NUMERICAL DIFFERENTIATION Forward Difference Formula
1. 2 What is Integration? Integration The process of measuring the area under a curve. Where: f(x) is the integrand a= lower limit of integration b=
Newton’s Method for Systems of Non Linear Equations
Chapter 22.
ME 123 Computer Applications I Lecture 24: Character Strings 4/18/03
Trapezoidal Rule of Integration
Trapezoidal Rule of Integration
MATH-321 In One Slide MATH-321 & MATLAB Command.
Numerical Computation and Optimization
Simpson’s 1/3rd Rule of Integration
Finding zeros (also called roots) of a function
Chapters 5 and 6: Numerical Integration
SKTN 2393 Numerical Methods for Nuclear Engineers
Simpson’s 1/3rd Rule of Integration
Assignment 1: due 1/16/19 Estimate all of the zero of x3-x2-2x+1 graphically. Write a MatLab code for Newton’s method. Use your code to refine the graphical.
Numerical Integration (Chapters 5 & 6, C&K 6th edition)
Numerical Computation and Optimization
Objectives Approximate a definite integral using the Trapezoidal Rule.
Chapter 10 ordinary differential equations (ODEs)
ME 123 Computer Applications I Lecture 25: MATLAB Overview 4/28/03
Chapter 12: Data Analysis by linear least squares
Numerical Integration
Air Force Admin College, Coimbatore
Presentation transcript:

Assignment 1: due 1/17/19 Estimate all of the zero of x3-x2-2x+1 graphically. Write a MatLab code for Newton’s method. Use your code to refine the graphical estimates. Hand in copies of your graph and the command window where the functions were called and zeros returned.

Assignment 2, Due 1/22/19 f(x) = ex - 3x2 has a zero in the interval [-1, 0]. Modify your Newton’s method code to return convergence data as log10(re). Use plot to compare the rates of convergence to the root with initial guesses 0 and -1. Verify that both initial guesses converge to the same zero. Hand in a copy of command window where Newton’s method was called Hand in your plot with labels (by hand is OK) on axes and curves to show which curve goes with which initial guess.

Assignment 3, Due 1/24/19 Write bisection function that finds root and saves convergence data Use code to find the zero f(x) = ex - 3x2 in the interval [-1, 0]. On a semi-log plot, compare the rate of convergence of the bisection method with starting interval [-1,0] to that of Newton’s method with initial guesses -1 and 0. Verify that Bisection and Newton’s method converge to the same zero. Hand in a copy of the command window where functions were called. Hand in a plot of the convergence data for bisection and Newton’s method with axes and curves labeled.

Assignment 4, Due 1/29/19 Write secant function that finds root and saves convergence data Use code to find zero f(x) = ex - 3x2 in the interval [-1,0]. On a semi-log plot, compare the rate of convergence of the secant method to that of the bisection method with the same starting values [-1,0] and to Newton’s method with initial guesses -1 and 0. Hand in a copy of the command window where you verified that all methods converged to same zero. Hand in a plot of the convergence data for secant, bisection, and Newton’s method with axes and curves labeled.

Assignment 5, Due 1/31/19 On page 242 of the text (6th edition), the value of is given as -18.79829683678703, which can be taken as the “exact” value. Estimate this integral by the trapezoid rule with 10 points when the points are chosen in the following ways: 1. Equally spaced on [1, 3] 2. xk = exp(yk) where yk= linspace(0,ln(3),10) 3. Equally spaced on [0, ln(3)] in the new integration variable y = ln(x). Calculate the percent difference from the exact value in each case

Assignment 6, Due 2/7/19 Estimate an upper bound on the absolute error in approximating by the composite trapezoid rule with 10 points. Show a plot to determine the maximum absolute value of the second derivative of the integrand. Assume the exact value is 0.882081 What is the actual absolute error in this trapezoid rule approximation?

Assignment 7, Due 2/14/19 Find A and B as a function of a and b by requiring formula to be exact for f(x) = 1 and f(x) = x.

Assignment 8, Due 2/14/19 Approximate the integral by the trapezoid and Simpson rules with 3, 5, and 7 equally spaced points on [1,3]. Calculate the percent difference from the “exact” value, -18.79829683678703, in each case.

Assignment 9, Due 2/21/19: Write a MatLab code for Gauss quadrature with 2, 3, 4 and 5 points. Make a table that includes the estimated value and percent difference (100|(exact-estimate)/exact| in Gauss quadrature when the integrand is evaluated at 2, 3, 4, and 5 points. Take -18.79829683678703 as the exact value. Compare results with 3 and 5 points to results from HW 8 for trapezoid and Simpson’s rule. Quiz #2: numerical integration: 3/7/18

Assignment 10, Due 2/26/19: Approximate integral in x variable by Guass quadrature with 2, 3, 4, and 5 points Approximate integral in y variable by Laguerre quadrature with 2, 3, 4, and 5 points Report your results as a table with approximate values and percent difference from exact.

Assignment 11 Due 3-7-19 Problems from the text 6th edition 2.2-10 p69 2.2-26 p70 a, b, and c 2.2-29 p70

Use Euler’s method to solve Assignment 12, Due 3/21/19: Use Euler’s method to solve x’ = 1 + x2 + t3 for x(t=2) given x(t=1) = -4 using 10 points. Plot result. Display t(npts) and x(npts). Calculate percent difference of x(npts) from “exact” value x(t=2) = 4.371221866 (text p434) Repeat with Extended Euler method

on independent variable t and that x’ = t2 + x3 , Assignment 13, Due 3/21/19: Given that unknown function x has both explicit and implicit dependence on independent variable t and that x’ = t2 + x3 , Calculate by hand x’’(t,x), x’’’(t,x) and x(4)(t,x). Show all steps

Assignment 14 due 3/26/19 Use ode45 to solve x’ = 1 + x2 + t3 for x(t=2) given x(t=1) = -4. Use the same number of points as ode45 to solve for x(t) by Euler and extended Euler methods. In all 3 cases, calculate the percent difference from the exact value x(2) = 4.371221866 on p434 of text

Assignment 15, Due 4/2/19: Solve the system of equations x’=x – y + 2t – t2 – t3 y’=x + y – 4t2 + t3 for 0 < t < 3, subject to the initial condition x(0)=1, y(0)=0 Use Eulersys, ex_Eulersys, and ode45 with the same number of points Exact solutions are x(t)=exp(t)cos(t) + t2 and y(t)=exp(t)sin(t) - t3 For each method: Print out the values of x and y at t=3, Calculate the percent difference from the exact values at t=3 Make separate plots for each method that compare your results to the exact solution Make sure your plots can distinguish exact from numerical results)

Use your Cholesky factorization code to solve Ax = b where Assignment 16, Due 4/11/19 Write a MATLAB codes for forward substitution, backward substitution and Cholesky factorization. Use the MATLAB function lu(A) and your forward and backward substitution codes to solve Ax = b where A = and b = Use your Cholesky factorization code to solve Ax = b where and b = A = Test your results using MatLab’s method x = A\b. Hand in copies of your codes and the command window where they were called.

Assignment 17 due 4/18/19 Use normal equations to fit a parabola to the data set t=linspace(0,10,21) y=[2.9, 2.7, 4.8, 5.3, 7.1, 7.6, 7.7, 7.6, 9.4, 9, 9.6,10, 10.2, 9.7, 8.3, 8.4, 9, 8.3, 6.6, 6.7, 4.1] with weights that the reciprocal of the square of the uncertain in y, which is 10% of the value of y. Plot the data with error bars and the fit on the same set of axes. Use MatLab’s errorbar(t,y,dy,’*’) function. Show the optimum value of the parameters and calculate the sum of squared deviations between fit and data.