Shuai Dong. Isaac Newton. Gottfried Leibniz

Similar documents
Chapter 3 Differentiation and Integration

Numerical Differentiation

Summary with Examples for Root finding Methods -Bisection -Newton Raphson -Secant

ORDINARY DIFFERENTIAL EQUATIONS EULER S METHOD

Lecture 2 Solution of Nonlinear Equations ( Root Finding Problems )

The Karush-Kuhn-Tucker. Nuno Vasconcelos ECE Department, UCSD

OPTIMISATION. Introduction Single Variable Unconstrained Optimisation Multivariable Unconstrained Optimisation Linear Programming

CHAPTER 4d. ROOTS OF EQUATIONS

Lecture 26 Finite Differences and Boundary Value Problems

Single Variable Optimization

: Numerical Analysis Topic 2: Solution of Nonlinear Equations Lectures 5-11:

CISE301: Numerical Methods Topic 2: Solution of Nonlinear Equations

Work is the change in energy of a system (neglecting heat transfer). To examine what could

Solution for singularly perturbed problems via cubic spline in tension

Mathematical Economics MEMF e ME. Filomena Garcia. Topic 2 Calculus

, rst we solve te PDE's L ad L ad n g g (x) = ; = ; ; ; n () (x) = () Ten, we nd te uncton (x), te lnearzng eedbac and coordnates transormaton are gve

The Finite Element Method: A Short Introduction

CENTROID (AĞIRLIK MERKEZİ )

ˆ (0.10 m) E ( N m /C ) 36 ˆj ( j C m)

Spring Force and Power

A Tale of Friction Basic Rollercoaster Physics. Fahrenheit Rollercoaster, Hershey, PA max height = 121 ft max speed = 58 mph

CENTROID (AĞIRLIK MERKEZİ )

CHAPTER 5 NUMERICAL EVALUATION OF DYNAMIC RESPONSE

5 The Laplace Equation in a convex polygon

Root Finding

PES 1120 Spring 2014, Spendier Lecture 6/Page 1

Numerical Methods Solution of Nonlinear Equations

36.1 Why is it important to be able to find roots to systems of equations? Up to this point, we have discussed how to find the solution to

Finite Difference Method

Multivariate Ratio Estimator of the Population Total under Stratified Random Sampling

Physics 2A Chapters 6 - Work & Energy Fall 2017

Optimization. Nuno Vasconcelos ECE Department, UCSD

TR/95 February Splines G. H. BEHFOROOZ* & N. PAPAMICHAEL

Image classification. Given the bag-of-features representations of images from different classes, how do we learn a model for distinguishing i them?

The finite element method explicit scheme for a solution of one problem of surface and ground water combined movement

PHYS 1101 Practice problem set 12, Chapter 32: 21, 22, 24, 57, 61, 83 Chapter 33: 7, 12, 32, 38, 44, 49, 76

A New Recursive Method for Solving State Equations Using Taylor Series

Solutions to Homework 7, Mathematics 1. 1 x. (arccos x) (arccos x) 1

PHYS 1443 Section 004 Lecture #12 Thursday, Oct. 2, 2014

Inductance Calculation for Conductors of Arbitrary Shape

Kernel Methods and SVMs Extension

Not-for-Publication Appendix to Optimal Asymptotic Least Aquares Estimation in a Singular Set-up

Linear discriminants. Nuno Vasconcelos ECE Department, UCSD

PHYS 705: Classical Mechanics. Calculus of Variations II

Propagation of error for multivariable function

Chapter 7: Conservation of Energy

PHYS 705: Classical Mechanics. Newtonian Mechanics

Probability Theory. The nth coefficient of the Taylor series of f(k), expanded around k = 0, gives the nth moment of x as ( ik) n n!

Chapter 8. Potential Energy and Conservation of Energy

Physics 5153 Classical Mechanics. D Alembert s Principle and The Lagrangian-1

Numerical Solution of Singular Perturbation Problems Via Deviating Argument and Exponential Fitting

π e ax2 dx = x 2 e ax2 dx or x 3 e ax2 dx = 1 x 4 e ax2 dx = 3 π 8a 5/2 (a) We are considering the Maxwell velocity distribution function: 2πτ/m

PubH 7405: REGRESSION ANALYSIS. SLR: INFERENCES, Part II

ME 501A Seminar in Engineering Analysis Page 1

Complex Variables. Chapter 18 Integration in the Complex Plane. March 12, 2013 Lecturer: Shih-Yuan Chen

Parameter estimation class 5

On Pfaff s solution of the Pfaff problem

COMP4630: λ-calculus

Solution Set #3

First Law: A body at rest remains at rest, a body in motion continues to move at constant velocity, unless acted upon by an external force.

Formal solvers of the RT equation

Physics 181. Particle Systems

Lecture 10: Euler s Equations for Multivariable

Week3, Chapter 4. Position and Displacement. Motion in Two Dimensions. Instantaneous Velocity. Average Velocity

Chapter 21 - The Kinetic Theory of Gases

Numerical Simulation of One-Dimensional Wave Equation by Non-Polynomial Quintic Spline

Stanford University CS254: Computational Complexity Notes 7 Luca Trevisan January 29, Notes for Lecture 7

COSC 6374 Parallel Computation

TR/28. OCTOBER CUBIC SPLINE INTERPOLATION OF HARMONIC FUNCTIONS BY N. PAPAMICHAEL and J.R. WHITEMAN.

LECTURE 14 NUMERICAL INTEGRATION. Find

Chapter 07: Kinetic Energy and Work

APPROXIMATE PRICES OF BASKET AND ASIAN OPTIONS DUPONT OLIVIER. Premia 14

Numerical Differentiation

2.29 Numerical Fluid Mechanics

Physics 53. Rotational Motion 3. Sir, I have found you an argument, but I am not obliged to find you an understanding.

Degrees of Freedom. Spherical (ball & socket) 3 (3 rotation) Two-Angle (universal) 2 (2 rotation)

EE 330 Lecture 24. Small Signal Analysis Small Signal Analysis of BJT Amplifier

1. Inference on Regression Parameters a. Finding Mean, s.d and covariance amongst estimates. 2. Confidence Intervals and Working Hotelling Bands

b ), which stands for uniform distribution on the interval a x< b. = 0 elsewhere

Interconnect Modeling

Solutions to Problem Set 6

PES 2130 Fall 2014, Spendier Lecture 7/Page 1

4DVAR, according to the name, is a four-dimensional variational method.

Period & Frequency. Work and Energy. Methods of Energy Transfer: Energy. Work-KE Theorem 3/4/16. Ranking: Which has the greatest kinetic energy?

Week 11: Chapter 11. The Vector Product. The Vector Product Defined. The Vector Product and Torque. More About the Vector Product

Physics for Scientists and Engineers. Chapter 9 Impulse and Momentum

NUMERICAL DIFFERENTIATION

EMU Physics Department

Numerical Heat and Mass Transfer

Generalized Linear Methods

Conservation of Energy

12. The Hamilton-Jacobi Equation Michael Fowler

AERODYNAMICS I LECTURE 6 AERODYNAMICS OF A WING FUNDAMENTALS OF THE LIFTING-LINE THEORY

Chapter 3 and Chapter 4

Three views of mechanics

( ) [ ( k) ( k) ( x) ( ) ( ) ( ) [ ] ξ [ ] [ ] [ ] ( )( ) i ( ) ( )( ) 2! ( ) = ( ) 3 Interpolation. Polynomial Approximation.

A new Approach for Solving Linear Ordinary Differential Equations

University Mathematics 2

Physics 2A Chapter 3 HW Solutions

Week 9 Chapter 10 Section 1-5

Transcription:

Computatonal pyscs Sua Dong Isaac Newton Gottred Lebnz

Numercal calculus poston dervatve ntegral v velocty dervatve ntegral a acceleraton

Numercal calculus Numercal derentaton Numercal ntegraton Roots o an equaton Etremes o a uncton

Numercal derentaton Taylor epanson: To calculate ', '', '''... sngle-varable:!! n n n multvarable:,,!,,!,,!,,,,,,,, y y y y y y y y y y y y y y yy y y y /

Te rst-order dervatve o a sngle-varable uncton around a pont s dened rom te lmt. lm Δ Δ Δ Now we dvde te space nto dscrete ponts wt evenly spaced ntervals + - = and label te uncton at te lattce ponts as =, we obtan te smplest epresson or te rst-order dervatve. te two-pont ormula or te rst-order dervatve O

An mproved coce: Te accuracy s mproved rom O to O. 3 / 6 / / 6 / / 3 3 3 Te tree-pont ormula or te rst-order dervatve O O 3

8 8 8 4 O A ve-pont ormula can be derved by ncludng te epansons o + and - around. O 3 5 3 3 O 3 8 4 5 3 3

Summary number o ponts naccuracy O 3 O 5 O 4 More ponts Hger accuracy S m a l l e r

Smlarly, we can combne te epansons o ± and ± around and to cancel te ', 3, 4, and 5 terms; ten we ave te ve-pont ormula or te second-order dervatve O 6 3 6 4 Te tree-pont ormula or te second-order dervatve 6 / / 6 / / 3 3 O O 4

Eample Gven =sn, let's calculate ' & ''. Dvde te regon rom to p/ to equal-lengt ntervals wt ponts *p/ =,,... For boundary ponts =, & 99,, we can use Lagrange nterpolaton to etrapolate te dervatves.

Code eample: 3..Derentaton.cpp Tree-pont ormula or ' Tree-pont ormula or ''

Numercal calculus Numercal derentaton Numercal ntegraton Roots o an equaton Etremes o a uncton

Numercal ntegraton In general, we want to obtan te numercal value o an ntegral, dened n te regon [a, b], S b a d. Dvde te regon [a, b] nto n slces, evenly spaced wt an nterval. I we label te data ponts as wt =,,..., n, we can wrte te entre ntegral as a summaton o ntegrals, wt eac over an ndvdual slce.

n b a d d / O S n Te above quadrature s commonly reerred as te trapezodal rule, wc as an overall accuracy up to O. Te smplest quadrature s obtaned we appromate n te regon [, + ] lnearly, tat s,

Trapezodal rule

We can obtan a quadrature wt a ger accuracy by workng on two slces togeter. I we apply te Lagrange nterpolaton to te uncton n te regon [ -, + ], we ave 3 O 4 3 4 / O S n j j j j

Eample Gven =sn, ntegrate rom to p/. Te analytc uncton: -cos Te eact value: cos-cosp/=. We can use trapezodal rule to see ow te numercal value converges to.

3..Integraton.cpp Code eample

Homework Improved ntegraton wt te tree-pont Lagrange nterpolaton mplemented. Comparson wt te trapezodal rule metod. 4 3 4 / O S n j j j j

Numercal calculus Numercal derentaton Numercal ntegraton Roots o an equaton Etremes o a uncton

Roots o an equaton In pyscs, we oten encounter stuatons n wc we need to nd te possble value o tat ensures te equaton =, were can eter be an eplct or an mplct uncton o. I suc a value ests, we call t a root or zero o te equaton. I we need to nd a root or =a, ten ow? dene g=-a, and nd a root or g=.

Bsecton metod I we know tat tere s a root r n te regon [a,b] or =, we can use te bsecton metod to nd t wtn a requred accuracy. Most ntutve metod. a b < b= a = = a + b/ a < b < a < or b <? no <d? yes output!

Code Eample =sn=.5; s wtn to p/. Analytcally, we know te root s p/6. Numercally, te procedure s: snce [sn-.5]*[snp/-.5]< and [sn-.5]*[snp/4-.5]<, but [snp/-.5]*[snp/4-.5]>; ten te root must be wtn,p/4. Ten we calculate te value at p/8.... 3.3.Bsecton.cpp

Te Newton metod Ts metod s based on lnear appromaton o a smoot uncton around ts root. We can ormally epand te uncton r = n te negborood o te root r troug te Taylor epanson. r r were can be vewed as a tral value or te root o at te t step and te appromate value o te net step + can be derved.

/ =,,....

Code eample Eample: =sn=.5; g=-.5=sn-.5 g g ' -.5.5 3.4.NewtonRoot.cpp

Possble bugs I te uncton s not monotonous I ' = or very small at some ponts Works well wen te uncton s monotonous, especally wt moderate '.

Secant metod - dscrete Newton metod In many cases, especally wen as an mplct dependence on, an analytc epresson or te rst-order dervatve needed n te Newton metod may not est or may be very dcult to obtan. We ave to nd an alternatve sceme to aceve a smlar algortm. One way to do ts s to replace te analytc ' wt te two-pont ormula or te rst-order dervatve, wc gves /

Code eample Eample: =sn=.5; g=-.5=sn-.5 g -.5 p/.5 p/4 g / g g p p.5/.5.5 p 4 3.5.Secant.cpp

Numercal calculus Numercal derentaton Numercal ntegraton Roots o an equaton Etremes o a uncton

Etremes o a uncton An assocated problem to nd te root o an equaton s ndng te mama and/or mnma o a uncton. Eamples o suc stuatons n pyscs occur wen consderng te equlbrum poston o an object, te potental surace o a eld, and te optmzed structures o molecules and small clusters.

We know tat an etreme o g occurs at te pont wt dg d wc s a mnmum mamum ' = g'' s greater less tan zero. So all te root-searc scemes dscussed so ar can be generalzed ere to searc or te etremes o a sngle-varable uncton.

Eample Te onc bond lengt o te datomc molecule V r e 4p r V ep r r Na Cl were e s te carge o a proton, s te electrc permttvty o vacuum, and V and r are parameters o ts eectve nteracton. Te rst term comes rom te Coulomb nteracton between te two ons, but te second term s te result o te electron dstrbuton n te system.

Te orce: r dv r dr e 4p r V r ep r r At equlbrum, te orce between te two ons s zero. Tereore, we searc or te root o = -dv/d =.

parameters or NaCl e /4p = 4.4 AeV V =.9 3 ev r =.33 A code eample r starts rom A 3.6.NaCl.cpp

In te eample program above, te searc process s orced to move along te drecton o descendng te uncton g wen lookng or a mnmum. In oter words, or + = +, te ncrement as te sgn opposte to g'. Based on ts observaton, an update sceme can be ormulated: / ' wt 'a' beng a postve, small, and adjustable parameter. For te mnmum, ' or g'' must be postve. a g' a

Ts sceme can be generalzed to te multvarable case as a g / g were =,,..., l and g = g/, g/,..., g/ l. Note tat step ere s scaled by g and s orced to move toward te drecton o te steepest descent. Ts s wy ts metod s known as te steepest-descent metod.

Homework Searc or te mnmum o te uncton g,y=sn+y+cos+*y n te wole space