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.

Slides:



Advertisements
Similar presentations
Lecture 5.
Advertisements

Lecture 5 Newton-Raphson Method
Numerical Solution of Nonlinear Equations
Suggested problems from text (6 th edition) Chapter 3.1 p85 Problems 1, 4, 9, 10 Computer problems 1, 2, 4, 7 Chapter 3.2 p101 Problems 4, 15, 17, 19 Computer.
Numeriska beräkningar i Naturvetenskap och Teknik 1.Solving equations.
Today’s class Romberg integration Gauss quadrature Numerical Methods
Dr. Jie Zou PHY Chapter 2 Solution of Nonlinear Equations: Lecture (III)
MANE 4240 & CIVL 4240 Introduction to Finite Elements Numerical Integration in 1D Prof. Suvranu De.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 19 Solution of Linear System of Equations - Iterative Methods.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 9 Roots of Equations Open Methods.
Solution of Nonlinear Equations: Lecture (I)
The Derivative. Objectives Students will be able to Use the “Newton’s Quotient and limits” process to calculate the derivative of a function. Determine.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Chapter 10 ordinary differential equations (ODEs) Chapter 11 systems of ODEs (6 th edition)
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 8 Roots of Equations Open Methods.
Numerical Solution of Ordinary Differential Equation
Calculus and Analytic Geometry II Cloud County Community College Spring, 2011 Instructor: Timothy L. Warkentin.
Simpson’s 1/3 rd Rule of Integration. What is Integration? Integration The process of measuring the area under a.
Area of a single trapezoid = h
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
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.
1 Numerical Analysis Lecture 12 Numerical Integration Dr. Nader Okasha.
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
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
4.6 Numerical Integration Trapezoid and Simpson’s Rules.
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.
Numerical Computation Lecture 2: Introduction to Matlab Programming United International College.
MECH345 Introduction to Finite Element Methods Chapter 1 Numerical Methods - Introduction.
Quadrature rules 1Michael Sokolov / Numerical Methods for Chemical Engineers / Numerical Quadrature Michael Sokolov ETH Zurich, Institut für Chemie- und.
Numerical Differentiation and Quadrature (Integration)
CHAPTER 3 NUMERICAL METHODS
Intelligent Numerical Computation1 Numerical Analysis MATLAB programming Numerical Methods Applications Contents.
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.
4.8 Newton’s Method Mon Nov 9 Do Now Find the equation of a tangent line to f(x) = x^5 – x – 1 at x = 1.
Linearization, Newton’s Method
SOLVING NONLINEAR EQUATIONS. SECANT METHOD MATH-415 Numerical Analysis 1.
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.
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.
CMPSC 200 Fall 2013 Lecture 37 November 18, 2013.
Chapter 5 Numerical Root Findings
CHAPTER 3 NUMERICAL METHODS
Solving Graphically Ex 1: View using the following windows.
NUMERICAL DIFFERENTIATION Forward Difference Formula
LECTURE 4 OF SOLUTIONS OF NON-LINEAR EQUATIONS OBJECTIVES
Solution of Nonlinear Equations
MATH 2140 Numerical Methods
Section Euler’s Method
ME 123 Computer Applications I Lecture 24: Character Strings 4/18/03
Solving Quadratic Equations
Graphing Solutions of Trig Functions
Ch. 6 – The Definite Integral
MATH-321 In One Slide MATH-321 & MATLAB Command.
Section 4.8: Newton’s Method
3.8 Newton’s Method How do you find a root of the following function without a graphing calculator? This is what Newton did.
Finding zeros (also called roots) of a function
Numerical Integration (Chapters 5 & 6, C&K 6th edition)
Some Comments on Root finding
Chapter 10 ordinary differential equations (ODEs)
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.
11.1: Length of a Curve.
ME 123 Computer Applications I Lecture 25: MATLAB Overview 4/28/03
Reading Between the Lines!
Numerical Integration
Recapitulation of Lecture 12
Presentation transcript:

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 estimates. Hand in copies of your graph and the command window where the functions were called and zeros returned. Note: I am not asking to see your code. Feel free to use the code in the lecture slides.

Assignment 2, Due 1/23/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/28/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/30/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. Verify that all 3 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 on the 3 methods with axes and curves labeled.

Assignment 5, Due 2/27/19 Assume -18.79829683678703 is the “exact” value of the integral. Estimate this integral by the composite trapezoid rule with 3, 5, and 7 points. Calculate the percent difference from the exact value in each case using PD=100*abs((exact-trap)/exact).

Assignment 6, Due 3/6/19 Approximate the integral by 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. Compare with results using the trapezoid rule (assignment #5).

Assignment 7, Due 3/20/19: Write MatLab functions for Gauss quadrature with 2, 3, 4 and 5 points. Apply these function to the integral Take -18.79829683678703 as the exact value. Hand in a copy of the command window where you called the Gauss functions and calculated the percent differences from the exact value (100|(exact-Gauss)/exact|). Compare percent differences using Gauss quadrature with 3 and 5 points to results using trapezoid and Simpson’s rules (HW 5 and 6).

Use Euler’s method to solve Assignment 8, Due 4/3/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. Calculate percent difference of x(npts) from “exact” value of x(t=2) = 4.371221866 Display t(npts), x(npts) and percent difference from exact. Repeat with extended Euler method

Assignment 9 due 4/8/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 10, Due 4/15/2019: 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)