1 / 15

ES 314 Nov 27, 2012 Numerical Analysis

ES 314 Nov 27, 2012 Numerical Analysis Source: Maurice Herlihy, Brown Univ. Numerical Analysis Solving equations Finding min/max Integrating linear systems: eigenvalue, eigenvector computation Examples - applications. topics covered.

Download Presentation

ES 314 Nov 27, 2012 Numerical Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ES 314 Nov 27, 2012 Numerical Analysis Source: Maurice Herlihy, Brown Univ.

  2. Numerical Analysis Solving equations Finding min/max Integrating linear systems: eigenvalue, eigenvector computation Examples - applications topics covered

  3. Exact answers are sometimes hard or impossible to achieve in practice Numerical methods provide an approximation that is generally good enough Useful in all fields of engineering and physical sciences, but growing in utility in the life sciences and the arts Movement of planets, stars, and galaxies Investment portfolio management by hedge funds Quantitative psychology Simulations of living cells Airline ticket pricing, crew scheduling, fuel planning Why Numerical Methodsare Important Figure is a Babylonian clay tablet showing an approximation of 21/2.

  4. General form f (x ) = 0 Approximation may be good enough Iterative approach with the bisection method Equations in One Variable

  5. Function can be specified as a mathematical expression as a string with no predefined variables function handle name of an anonymous function Must be in the form f (x ) = 0 f (x ) = c f (x ) - c = 0 Equations in One Variable (cont.) x = fzero(function, x0) function: function to be solvedx0:initial guess at solutionx:the solution

  6. Find the solution of Rewrite as Plot it to get estimate Solving a Nonlinear Equation

  7. Solvef (x ) = 0 by repeating the assignment untilxis close enough to 0 Newton's Method

  8. Local minima or maxima occur when the derivative of the function is zero Finding Minima and Maxima x = fminbnd(function, x1, x2) function: function to be solvedx1,x2:interval for minimumx:function minimum m-files: lect12_1

  9. For best view in a theater, sit at distance x such that angleΘis maximum Find x with the configuration shown Applying Law of Cosines ExampleMaximum Viewing Angle

  10. Angle is between 0 andπ/2 Cosine decreases from 1 atΘ = 0, thus maximum angle corresponds to minimum cos(Θ) Do a quick plot of cos(Θ) as a function of xto estimate the solution range Find the minimum with fminbnd Maximum Viewing Angle

  11. Find the area under the curve of a function Examples Area and volume Velocity from acceleration Work from force and displacement Integrand can be a function or set of data points Numerical Integration

  12. Function must be written for element-by-element operations Function must be well-behaved between aandb(no vertical asymptote) Difference is in method of integration Integration in MATLAB q = quad(function, a, b)q = quadl(function, a, b) function: function to be solveda,b:integration limitsq:value of integral

  13. Example Integrating with Data Points q = trapz(x, y)x,y: vectors of data pointsq: value of integral

  14. To estimate the amount of water that flows in a river during a year, consider the cross section shown. The height h and speed v are measured on the first of each month. Water Flow in a River

  15. Flow rate (volume per second) Total amount of water Water Flow in a River

More Related