Science and Computers I
Science and Computers I PHY 307
Popular in Course
Popular in Physics 2
This 5 page Class Notes was uploaded by Ms. Bryce Wisoky on Wednesday October 21, 2015. The Class Notes belongs to PHY 307 at Syracuse University taught by Staff in Fall. Since its upload, it has received 25 views. For similar materials see /class/225633/phy-307-syracuse-university in Physics 2 at Syracuse University.
Reviews for Science and Computers I
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 10/21/15
Lee a N umerical integrationdirect o PseudoRandom numbers 0 Monte Carlo integration Important numerical algorithms a We have learnt how to approximate deriva tives and to solve simple differential equa tions o Another important task integration o Like derivatives 2 types of problem Want essentially exact solution to problem with few variables Or wanting a good estimate with errors of a complex problem with very many variables Errors Consider area of one slice running from 13 O to a 613 Let a O y Taylor expand fx f0 y f0 yf 0 6x 6x 0 drums O dy f0 We Simple slicing result gotten by taking first term Error 06x Need small 61 for good answer How small Need 61 ltlt f O Aside random numbers Most computerslanguages provide a sim ple pseudorandom number generator eg random in python Often use deterministic algorithm to gen erate sequence rn1 2 am b mod m random number in range 01 isjust rnm Careful choices of abm generate long se quences of seemingly random numbers But such generators Will repeat eventually Care must be taken In principle should check all results with at least 2 different random number generators Implementation 0 Choose trial position mm mold 6 Calculate w ptrz azpold If w gt 1 accept xtmz o If w lt 1 generate random number 7 o If r g 111 accept change 0 If HOT xtrml mold Choose 6 so that 50 moves accepted approx 12