Root Finding. x 1. The solution of nonlinear equations and systems. The Newton-Raphson iteration for locating zeros. Vageli Coutsias, UNM, Fall 02

Similar documents
Outline. Review Homework Problem. Review Homework Problem II. Review Dimensionless Problem. Review Convection Problem

One of the common descriptions of curvilinear motion uses path variables, which are measurements made along the tangent t and normal n to the path of

ECSE Partial fraction expansion (m<n) 3 types of poles Simple Real poles Real Equal poles

Comparing Different Estimators for Parameters of Kumaraswamy Distribution

The Nehari Manifold for a Class of Elliptic Equations of P-laplacian Type. S. Khademloo and H. Mohammadnia. afrouzi

Suppose we have observed values t 1, t 2, t n of a random variable T.

Capítulo. of Particles: Energy and Momentum Methods

Optical flow equation

2-d Motion: Constant Acceleration

The sphere of radius a has the geographical form. r (,)=(acoscos,acossin,asin) T =(p(u)cos v, p(u)sin v,q(u) ) T.

Cameras and World Geometry

UNIT 1: ANALYTICAL METHODS FOR ENGINEERS

Physics 232 Exam I Feb. 14, 2005

Chapter Finite Difference Method for Ordinary Differential Equations

Curvilinear Motion: Normal and Tangential Components

1.225J J (ESD 205) Transportation Flow Systems

CHAPTER 2. Problem 2.1. Given: m k = k 1. Determine the weight of the table sec (b)

Supplementary Information

THE GENERATION OF THE CURVED SPUR GEARS TOOTHING

Single Degree of Freedom System Free Vibration

Single Degree of Freedom System Free Vibration

ON TOTAL TIME ON TEST TRANSFORM ORDER ABSTRACT

HYPOTHESIS TESTING. four steps

Physics 232 Exam I Feb. 13, 2006

Chapter 3: Vectors and Two-Dimensional Motion

CHATTERJEA CONTRACTION MAPPING THEOREM IN CONE HEPTAGONAL METRIC SPACE

Relations on the Apostol Type (p, q)-frobenius-euler Polynomials and Generalizations of the Srivastava-Pintér Addition Theorems

MATHS FOR ENGINEERS ALGEBRA TUTORIAL 8 MATHEMATICAL PROGRESSIONS AND SERIES

Big O Notation for Time Complexity of Algorithms

The Central Limit Theorems for Sums of Powers of Function of Independent Random Variables

On imploding cylindrical and spherical shock waves in a perfect gas

( ) ( ) Weibull Distribution: k ti. u u. Suppose t 1, t 2, t n are times to failure of a group of n mechanisms. The likelihood function is

Race Conditions and Cycles. Race Conditions. Outline. Example 3: Asynchronous Analysis. Race-Free State Assignment. Race-Free State Assignment

Section 8. Paraxial Raytracing

P a g e 5 1 of R e p o r t P B 4 / 0 9

Relative and Circular Motion

LIMITS OF FUNCTIONS (I)

Administrivia. Administrivia. Visual motion. CMPSCI 370: Intro. to Computer Vision. Optical flow

Viewing in 3D. Viewing in 3D. Planar Geometric Projections. Taxonomy of Projections. How to specify which part of the 3D world is to be viewed?

Coordinate Systems. Things to think about:

Sections 3.1 and 3.4 Exponential Functions (Growth and Decay)

Calculus Limits. Limit of a function.. 1. One-Sided Limits...1. Infinite limits 2. Vertical Asymptotes...3. Calculating Limits Using the Limit Laws.

1 Notes on Little s Law (l = λw)

Calculus BC 2015 Scoring Guidelines

Optical flow. Visual motion. Motion and perceptual organization. Motion and perceptual organization. Subhransu Maji. CMPSCI 670: Computer Vision

Lecture 4. Electrons and Holes in Semiconductors

Chapter 5. Long Waves

T h e C S E T I P r o j e c t

2 f(x) dx = 1, 0. 2f(x 1) dx d) 1 4t t6 t. t 2 dt i)

Algebra 2A. Algebra 2A- Unit 5

10.3 Autocorrelation Function of Ergodic RP 10.4 Power Spectral Density of Ergodic RP 10.5 Normal RP (Gaussian RP)

Representing Knowledge. CS 188: Artificial Intelligence Fall Properties of BNs. Independence? Reachability (the Bayes Ball) Example

Chapter 6 - Work and Energy

Homework 6 AERE331 Spring 2019 Due 4/24(W) Name Sec. 1 / 2

is monotonically decreasing function of Ω, it is also called maximally flat at the

Numerical KDV equation by the Adomian decomposition method

Dividing Algebraic Fractions

Mixture of a New Integral Transform and Homotopy Perturbation Method for Solving Nonlinear Partial Differential Equations

( ) ( ) ( ) ( ) (b) (a) sin. (c) sin sin 0. 2 π = + (d) k l k l (e) if x = 3 is a solution of the equation x 5x+ 12=

Review Answers for E&CE 700T02

th m m m m central moment : E[( X X) ] ( X X) ( x X) f ( x)

Fresnel Dragging Explained

Introduction to Earthquake Engineering Response Analysis

BINOMIAL THEOREM An expression consisting of two terms, connected by + or sign is called a

Electrical Engineering Department Network Lab.

CALCULUS BASIC SUMMER REVIEW

Numerical Method for Ordinary Differential Equation

OH BOY! Story. N a r r a t iv e a n d o bj e c t s th ea t e r Fo r a l l a g e s, fr o m th e a ge of 9

BINOMIAL THEOREM NCERT An expression consisting of two terms, connected by + or sign is called a

APPLICATION OF A Z-TRANSFORMS METHOD FOR INVESTIGATION OF MARKOV G-NETWORKS

VARIED SIZED FLOOR PLATE S O N - S I T E B U I L D I N G A M E N I T I E S

PHYS PRACTICE EXAM 2

1. Solve by the method of undetermined coefficients and by the method of variation of parameters. (4)

Lecture 4. Electrons and Holes in Semiconductors

ANALYSIS OF THE CHAOS DYNAMICS IN (X n,x n+1) PLANE

Appendix A. Expressions for equation of state parameters of TNT explosion products

On The Geometrıc Interpretatıons of The Kleın-Gordon Equatıon And Solution of The Equation by Homotopy Perturbation Method

Four equations describe the dynamic solution to RBC model. Consumption-leisure efficiency condition. Consumption-investment efficiency condition

F l a s h-b a s e d S S D s i n E n t e r p r i s e F l a s h-b a s e d S S D s ( S o-s ltiad t e D r i v e s ) a r e b e c o m i n g a n a t t r a c

Time Domain Modelling of Electromagnetic Field Propagation via Wave Potentials

Minimization of the quadratic test function

Pure Math 30: Explained!

8.5 Circles and Lengths of Segments

12 th Mathematics Objective Test Solutions

Moment Generating Function

Four equations describe the dynamic solution to RBC model. Consumption-leisure efficiency condition. Consumption-investment efficiency condition

Ideal Amplifier/Attenuator. Memoryless. where k is some real constant. Integrator. System with memory

Additional Tables of Simulation Results

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Statistics

ODEs II, Supplement to Lectures 6 & 7: The Jordan Normal Form: Solving Autonomous, Homogeneous Linear Systems. April 2, 2003

Section 8 Convolution and Deconvolution

Stenciling. 5 th Week, Reflection without Using the Stencil Buffer

CSE 202: Design and Analysis of Algorithms Lecture 16

At the end of this topic, students should be able to understand the meaning of finite and infinite sequences and series, and use the notation u

Crosscorrelation of m-sequences, Exponential sums and Dickson

Harmonic excitation (damped)

2012 GCE A Level H2 Maths Solution Paper Let x,

Math-303 Chapter 7 Linear systems of ODE November 16, Chapter 7. Systems of 1 st Order Linear Differential Equations.

CS 188: Artificial Intelligence Fall Probabilistic Models

Mathematical Statistics. 1 Introduction to the materials to be covered in this course

Transcription:

Roo idig The solio of oliea eqaios ad sysems Vageli Cosias, UNM, all The Newo-Raphso ieaio fo locaig zeos f ( )/ f ( ) ' f '( ) f ( )

Eample: fidig he sqae oo f f ( ) '( ) a a a Deails: iiial ieae ms be close o solio fo mehod o delie is pomise of qadaic coegece (he mbe of coec bis doblig wih eey sep) fcio sq(a) if A < beak;ed if A ; ; else TwoPowe ; m A; while m >, m m/4; TwoPowe *TwoPowe ;ed while m <.5, m m*4; TwoPowe TwoPowe/;ed (+*m)/3; fo k :4 (+ (m/))/; ed *TwoPowe; ed

clc; close all; clea all; foma log e; fame 'fc'; a ip('ee a ale:'); b ip('ee b ale:'); c ip('ee saig ale:'); ma c; mi c; fc feal(fame,c,a,b); dela.; fpc (feal(fame,c+dela,a,b)-fc)/dela; k; disp(spif('k fal fpal ')) while ip('newo sep? (o, yes)') kk+; (k) c; y(k) fc; ew c fc / fpc; c ew; fc feal(fame,c,a,b); fpc (feal(fame,c+dela,a,b)-fc)/dela; disp(spif('%.f %.5f %.5f %.5f',k,c,fc,fpc)) if ma < (k); ma (k); ed if mi > (k); mi (k); ed ed lispace(mi,ma,); y feal(fame,,a,b); plo(,y,'-',,y,'*') Ee a ale:. Ee b ale:.5 Ee saig ale: k fal Newo sep? (o, yes) -.454545455995.8975644793 -.486579595.3499895835 3 -.48646735955.6877535 4 -.486464797.76 5 -.4864647945. Newo sep? (o, yes) 3

% scip zeoi % ses malab bili oofide "ZERO" % o fid a zeo of a fcio 'fame' close all; clea all; foma log %fame 'fc'; % se defied fcio-ca also gie as @fc %fpame'dfc'; % se def. deiaie-o eqied by ZERO del.; % fcio ale limiig oleace a ip('ee a ale:'); b ip('ee b ale:'); lispace(-,,); y feal(@fc,,a,b); c ip('ee saig ale:'); %oo fzeo(@fc,c,.,,a,b); % gadfaheed foma OPTIONSopimse('MaIe',,'Tol',del,'TolX',del^); oo fzeo(@fc,c,options,a,b) y feal(@fc,oo,a,b) plo(,y,oo,y,'*') 4

The Seca ieaio fo locaig zeos fp f ( ) ( ) _ f ( _ ) f ( ) f ( _ ) f ( ) _ % scip SEC.M: ses seca mehod o fid zeo of UNC.M close all; clea all; clc; foma log e fame 'fc'; a ip('ee a:');b ip('ee b:'); c ip('ee saig ale:'); fc feal(fame,c,a,b); del.; k; disp(spif('k fal fpal ')) fpc (feal(fame,c+dela,a,b)-fc)/dela; while ip('seca sep? (o, yes)') kk+; (k) c; y(k) fc; f_ fc; ew c - fc/fpc; _ c; c ew; fc feal(fame,c,a,b); fpc (fc - f_)/(c-_); disp(spif('%.f %.5f %.5f %.5f',k,c,fc,fpc)) ed if () < (k); a floo(()-.5); b ceil((k)+.5); else; b floo(()-.5); a ceil((k)+.5); ed lispace(a,b,);yfeal(fame,,a,b);plo(,y,,y,'*') 5

Applicaio: solio of a BVP (Boday Vale Poblem) d y d y y + k y ( ) ; y( π ) + y' ( π ) ( ) Asi( k) ( kπ ) + k ( kπ ) si Solio Poblem (HW 5) Sole peios eqaio fo he smalles siable ozeo ale of k (eigeale) sig (a) The Newo mehod (scip NEWT.M ) (b) The bil-i Newo mehod (scip ZEROIN.M ) (c) The seca mehod (scip SEC.M ) 6

fcio f fc(,a,b) % ap ea % fo ieesig behaio, se a., b.,.4 f.5*.^+ *.^8 - a*.^6 + b; Newo s mehod fo oliea sysems: shoo dow he bogey! e [,, h] ( ), g 7

8 Eqaios of moio () () () h z y () ( ) () ( ) () ( ) ( ) si si g z y + iade defede ( ) ( ) ( ) ( ) ( ) + + δ δ δ Newo s mehod fo d o 3d fcios

9 o ballisic eample: ( ) ( ) ( ) ( ) ( ) + 3 3 3 3 si si h g z z y y ( ) ( ) ( ) ( ) ( ) ( ) si si si si si si Ieae, saig wih a siable gess, say: 4 / / π π ( ) δ

Pojec 5-a Add a small och of ealism: he cao eqies a fiie amo of ime o be ed o he fiig diecio. The ime depeds o he eac oaio. Ths, yo ms fige o a opimal oaio ais ad pefom a oaio ha is as fas as possible (gie he fied oaioal speed of he cao). The ballisic solio shold ake acco of he ime eqied fo he oaio, sice he fiig agles deemie he ime eqied fom he mome yo decide o fie o he mome he cao ca acally fie o he mome whe iecep is achieed. Specifically, he simlaio iese is a cbic bo wih a edge of legh of miles. A ime a bogey ees a he poi (,y,z) (,,h) moig i he posiie -diecio wih speed. The cao is siaed a he poi (,, ) ad pois iiially a a diecio chaaceized by agles (, ). As he bogey pogesses yo scip shold ask yo whehe yo wa o shoo i dow. If yo aswe ``o (), i shold adace he bogey by click ad ask agai. If yo aswe ``yes () he shoo-dow pocess shold ge saed. The cao shold adace fom is idle posiio o is fiig posiio by he bes oaio (which yo ms compe!). Is moio shold be show by a sccessio of images, whee cae shold be ake

o podce he sese of moio (e.g. ehibi ce 3 posiio as a aow ad peios posiio as a boke lie). Whe he cao eaches is fiig posiio i shold fie a pojecile. om ha poi o he cao sops ad he pogam shold display he pojecile ad bogey by appopiae symbols, adacig alog hei especie ajecoies each a is ow speed. Whe coac is achieed, a appopiae symbol shold be displayed ad saisics pied (e.g. ime ad locaio of iecep, fiig agles ec.). If a iecep solio is impossible a he poi yo decide o fie, he pogam ogh o op a faile comme (sch as: ``iecep impossible-abo lach ec.) ad he bogey shold complee is ajecoy eiig he domai (o hiig a age, if yo feel like addig fhe gaphic ealism o yo simlaio. 4 I ha case, he age is he eie plae. (Opioal: he age is locaed a he poi (,y,z) (,5,.) ad he bogey ees as befoe b i has a saigh lie moio headig fo he age. Oce yo specify he ajecoy of he bogey, all else woks as i he iial case of -paallel moio! o his case, he ey poi is a adom poi o he plae, ad he speed is dieced alog he saigh lie joiig he ey poi ad he age.) Yo shold i a caoo of yo simlaio, wih a sccessio of images i a comic book foma. Yo op shold gie a complee ad clea pice of wha is happeig as ime adaces.

ω α g 5 Aimig iiially a agles: Ms o agles: Toal oaio by agle: The ime eqied eqals: Gie agla speed: ( ), α ω (, ) α /ω T Iiial codiios ad ohe cosas 6 ( + 4* ad () )*.3( mi / sec) h.+ 9.9* ad().4 ( mi / sec) π ω sec 6 g 3. f / sec

ied-ale paamees 7,, ae bil-i cosas Sccess codiio 5 ( ) + + f 3 Discssio: modifyig he eqaios o acco fo he ig ime T + T T α, ( ) (, ) (, ) ω ( α ) (, ) ( ), 8 (, ) [, si, si] 3

Sice he lach ime ow depeds o he agles, he paial deiaies wih espec o he agles ms ow eflec ha depedece. o eample: ( + ( ) ) si ( ) 9 α ω α ( + si si ) + si si α α siα siα α 4

( α ) ( ( + si si )) ( + si si ) ( si + si ) MINBND Scala boded oliea fcio miimizaio. X MINBND(UN,,) sas a X ad fids a local miimize X of he fcio UN i he ieal < X <. UN acceps scala ip X ad es a scala fcio ale ealaed a X. 5

SPLINE Cbic splie daa iepolaio. YY SPLINE(X,Y,XX) ses cbic splie iepolaio o fid YY, he ales of he delyig fcio Y a he pois i he eco XX. The eco X specifies he pois a which he daa Y is gie. If Y is a mai, he he daa is ake o be eco-aled ad iepolaio is pefomed fo each colm of Y ad YY will be legh(xx)-by-size(y,). PP SPLINE(X,Y) es he piecewise polyomial fom of he cbic splie iepola fo lae se wih PPVAL ad he splie iliy UNMKPP. Odiaily, he o-a-ko ed codiios ae sed. Howee, if Y coais wo moe ales ha X has eies, he he fis ad las ale i Y ae sed as he edslopes fo he cbic splie. Namely: f(x) Y(:,:ed-), df(mi(x)) Y(:,), df(ma(x)) Y(:,ed) Eample: This geeaes a sie ce, he samples he splie oe a fie mesh: :; y si(); :.5:; yy splie(,y,); plo(,y,'o',,yy) PPVAL Ealae piecewise polyomial. V PPVAL(PP,XX) es he ale a he pois XX of he piecewise polyomial coaied i PP, as cosced by SPLINE o he splie iliy MKPP. V PPVAL(XX,PP) is also accepable, ad of se i cojcio wih MINBND, ZERO, QUAD, ad ohe fcio fcios. Eample: Compae he esls of iegaig he fcio ad his splie: a ; b ; i qad(@,a,b,[],[]); a : b; y (); pp splie(,y); i qad(@ppal,a,b,[],[],pp); i poides he iegal of he ie fcio oe he ieal [a,b] while i poides he iegal oe he same ieal of he piecewise polyomial pp which appoimaes he ie fcio by iepolaig he comped,y ales. 6