Numerical integration

Size: px
Start display at page:

Download "Numerical integration"

Transcription

1 Class Progress Basics of Linux, gnuplot, C Visualization of numerical data Roots of nonlinear equations (Midterm 1) Solutions of systems of linear equations Solutions of systems of nonlinear equations Monte Carlo simulation Interpolation of sparse data points Numerical integration (Midterm ) Solutions of ordinary differential equations 1

2 Integration of a Function from Known Data Points f(x) Integrand function x x x1 x x Known data points (xi,yi) from computation or measurement

3 Integration of a Function with Trapezoidal Rule f(x) x Approximate integral as sum of trapezoids x1 x x x

4 Sum the Area of Each Trapezoid f(x) y Area = (x - x1)(y1 + y)/ Sum up the trapezoidal areas to find final approximation to the integral y1 x coordinates do not have to be uniformly spaced x x1 x x x 4

5 Integration C Code for Tabulated Data Points int trapezoidal_data(int n,struct pointd *sample) { double integral; int i; integral =.; i = 1; while (i < n) { integral +=.5 * (sample[i].y + sample[i-1].y) * (sample[i].x sample[i-1].x); i++; } printf("%.1g\n",integral); return(); } 5

6 Trapezoidal Rule with Uniformly Spaced x Values f(x) Integrand function x x+h x+h x+h xn-1=x+4h x Define h = xi+1 - xi as the step size Four steps shown in this example 6

7 Integration of a Function with Trapezoidal Rule h Each trapezoidal area now = ( y i + y i+ 1 ) So sum up the areas of all the trapezoids: h h y + y 1 h h y 1+ y h h y + y... + h h y n + y n 1 h h y + h y 1 + h y + + h y n + y n 1 7

8 Integration of a Function with Trapezoidal Rule For n uniformly spaced data points: xn 1 x [ ( y + y n 1 ) n f ( x)dx h + yi i=1 ] 1 ( x n 1 x )h f ' ' (ξ) 1 ( ) Error term = 8

9 Simpson's Rule with Uniformly Spaced x Values f(x) Consider data point steps in consecutive pairs Fit a quadratic polynomial to three data points Fit a quadratic polynomial to three data points a a+h a+h Integrate under quadratic polynomial to find this area a+h b=a+4h x Integrate under quadratic polynomial to find this area 9

10 Integration of a Function with Simpson's 1/ Rule Fit second order Lagrange interpolation polynomial to first three data points: ( x x 1 )( x x ) ( x x )( x x ) ( x x )( x x 1 ) f ( x)= y + y 1+ y ( x x 1 )( x x ) ( x 1 x )( x1 x ) ( x x )( x x 1 ) Change x axis so that x= x1=h x=h and rewrite Lagrange interpolation polynomial for uniformly spaced data points: ( x h)( x h) x ( x h) x ( x h) f ( x)= y y 1+ y h h h Integrate under quadratic polynomial from to h: h h f ( x) dx ( ) [ y + 4 y1 + y ] 1

11 Integration of a Function with Simpson's 1/ Rule So sum up the areas under all the quadratic polynomials: h 4h h y + y 1+ y h 4h h y+ y + y 4 h 4h h y 4+ y 5+ y h 4h h y n + y n + y n 1 h 4h h 4h h h 4h h y+ y1+ y+ y+ y y n + y n + y n 1 11

12 Integration of a Function with Simpson's 1/ Rule So for n uniformly spaced data points: x n 1 x [ n n h f ( x) dx ( ) ( y + y n 1 ) + 4 y i + y i i=1, i odd i=,i even ] Applicable for only an even number of steps, so n-1 must be an even number, or the number of function points must be odd 1 ( x n 1 x )h 4 f (4) (ξ) 18 ( ) Error term = 1

13 Integration C Code for C Function #include <stdio.h> #include <stdlib.h> #include "integrate.h" int trapezoidal(double (*func)(double x),double xstart,double xstop,double xinc) { double x,integral; x = xstart; Note '-' sign to stop loop before the last desired point! integral =.5 * xinc * (*func)(x); x = x + xinc; xstop = xstop - (xinc *.5); while (((xinc >.) && (x < xstop)) ((xinc <.) && (x > xstop))) { integral += xinc * (*func)(x); x = x + xinc; } integral +=.5 * xinc * (*func)(x); printf("%.8g\n",integral); return(); } 1

14 Integration C Code for C Function int simpson(double (*func)(double x),double xstart,double xstop,double xinc) { double x,integral; int state; x = xstart; integral = xinc * (*func)(x) /.; x = x + xinc; xstop = xstop - (xinc *.5); state = ; while (((xinc >.) && (x < xstop)) ((xinc <.) && (x > xstop))) { if (state == ) { integral += 4. * xinc * (*func)(x) /.; state = 1; } else { integral +=. * xinc * (*func)(x) /.; state = ; } x = x + xinc; } if (state!= 1) { fprintf(stderr,"warning: Odd number of integration segments\n"); } integral += xinc * (*func)(x) /.; printf("%.8g\n",integral); return(); } 14

15 Integration C Code #include #include #include #include #include <stdio.h> <stdlib.h> <math.h> "integrate.h" "constants.h" double mu,sigma; double gaussian(double x) { return(exp(-(x - mu) * (x - mu) / (. * sigma * sigma)) / (sqrt(. * PI) * sigma)); } int main(int argc,char *argv[]) { double xstart,xstop,xinc; if (argc!= 6) { fprintf(stderr,"%s <mu> <sigma> <xstart> <xstop> <xinc>\n",argv[]); exit(1); } mu = atof(argv[1]); sigma = atof(argv[]); xstart = atof(argv[]); xstop = atof(argv[4]); xinc = atof(argv[5]); printf("trapezoidal rule:\n"); trapezoidal(gaussian,xstart,xstop,xinc); printf("simpson's rule:\n"); simpson(gaussian,xstart,xstop,xinc); exit(); } 15

16 Rotational Inertia For a given object, define I = r dm As the rotational inertia of an object about a particular axis of rotation Then simple rotational equivalent of the Newtonian translational relationships can be derived, such as Torque τ= I α 1 Kinetic energy K = I ω 16

17 Sample Rotational Inertia Integrals 17

18 Simple Rotational Inertial Problem dm = μrdθ r θ π Circular hoop Total mass = M Linear mass density = μ I = r dm= r (μ r d θ) Let r= R, a constant π I =R μ d θ= π R μ =( π R μ) R = M R 18

19 Not So Simple Rotational Inertial Problem dm = μrdθ r(θ) θ Not so circular hoop Total mass = M Linear mass density = μ π I = r (θ) dm= r (θ) (μ r (θ)d θ) π =μ r (θ)d θ 19

20 Rocket Propulsion Mass m Velocity v Initial state:

21 Rocket Propulsion Mass m+dm Final state, after small mass of fuel consumed and propelled out the nozzle is -dm: Velocity v+dv Mass -dm Velocity u 1

22 Rocket Propulsion Conservation of linear momentum: Pi= P f mv = dm u + (m+ dm)(v+ dv) Look at velocity of rocket relative to the exhaust in final state v rel v+ dv = v rel + u or u = v+ dv v rel Substituting for u : dm v rel = m dv Divide by dt to see thrust and acceleration of rocket: dm dv v rel = T = m dt dt

23 Rocket Propulsion Or integrate dv to find increase in rocket velocity over time: dm dv = v rel m vf mf i i dm dv = v rel m v m If v rel is constant mi v f v i = v rel ln ( ) mf But in general mf v rel (m) v f v i = dm m m i

24 Circumference of Elliptical Orbits a = Semi-major axis b = Semi-minor axis Comet in highly eccentric elliptical orbit b a Sun at one focus of ellipse b Eccentricity ϵ= 1 a 4

25 Circumference of Elliptical Orbits The circumference of an elliptical orbit C = 4 a E (ϵ) where a is the length of the semi-major axis, ϵ is the eccentricity and where the function E is the complete elliptic integral of the second kind: π E (ϵ) = 1 ϵ sin (θ)d θ This integral cannot be evaluated analytically. Note: for a circular orbit, a=b=radius, ϵ= and π E (ϵ) = π d θ = so C = 4 a π = π a as expected 5

26 Plotting Vectors with gnuplot We have used: plot 'problem1.dat' using 1: with lines plot 'problem.dat' using 1: with points Column with X coordinate Column with Y coordinate Another plot mode: plot 'helmholtz.dat' using 1:::4 with vectors Column with starting X coordinate Column with starting Y coordinate Column with X distance Column with Y distance 6

27 Electric Field Vectors for Dipole

28 Electric Field Vectors for Quadrapole

29 Electric Field Vectors for Example Arbitrary Charges

30 C Code for Mapping Electric Field Vectors xstop = xstop + xinc *.5; ystop = ystop + yinc *.5; rtest = 1.e-6 * (xinc*xinc + yinc*yinc); x = xstart; while (((xinc >.) && (x < xstop)) ((xinc <.) && (x > xstop))) { y = ystart; while (((yinc >.) && (y < ystop)) ((yinc <.) && (y > ystop))) { ex =.; ey =.; i = ; while (i < n) { rsq = (x-chg[i].x)*(x-chg[i].x) + (y-chg[i].y)*(y-chg[i].y); if (rsq < rtest) break; r = sqrt(rsq); Loop over n charges. ex += chg[i].q * (x-chg[i].x) / (r * rsq); Structure array chg[] holds ey += chg[i].q * (y-chg[i].y) / (r * rsq); each charge qi and i++; } xi and yi coordinates if (i >= n) { emag = sqrt(ex*ex + ey*ey); vx = xinc * ex / emag; vy = yinc * ey / emag; printf("%.8g %.8g %.8g %.8g\n",x-.5*vx,y-.5*vy,vx,vy); } y = y + yinc; } x = x + xinc; }

31 Classical Electric Field Lines Note that the vectors plotted by this method only record the direction of the E field vector at an array of sampled points. These are not quite equivalent to the classical field lines, which convey both the direction of the field and its magnitude from the density of drawn lines. 1

32 Helmholtz Coil for Uniform Magnetic Field

33 Magnetic Field of a Helmholtz Coil Coordinates of two conductors follow the parameterized equations x= R cos(θ) y=r sin(θ) R z=±d=± for π θ π R = coil radius D = z distance from D = R/ for best uniform fields z R current I D (Region of approximately uniform magnetic field in z direction) y D x current I

34 Finding Magnetic Field with Biot-Savart Law d B =d B 1 +d B probe at ( x, y, z ) z d l 1 r 1 r current I μ I d l i ri d Bi= 4π ri y B ( r )= d B d l x current I 4

35 Review of Vector Cross Product = A if C B then C x = A y Bz A z B y C y = A z B x A x Bz C z = A x B y A y Bx When computing d l r for this geometry, look for several components and terms that are zero! 5

36 Magnetic Field Along z-axis R=1m I=1A x= y= 1.e-6 Total Top coil Bottom coil z component of B field (T) 8.e-7 6.e-7 4.e-7.e-7.e z-coordinate (m) 6

37 Magnetic Field Off Of z-axis R=1m I=1A y= 1.e-6 x= x=.5m x=.1m x=.15m x=.m z component of B field (T) 8.e-7 6.e-7 4.e-7.e-7.e z-coordinate (m) 7

38 Vector Plot of Magnetic Field in Y-Z Plane Bottom Coil Only Z-coordinate Y-coordinate 8

39 Vector Plot of Magnetic Field in Y-Z Plane Top Coil Only Z-coordinate Y-coordinate 9

40 Vector Plot of Magnetic Field in Y-Z Plane Both Coils Z-coordinate Y-coordinate 4

41 Magnetic Field of a Real Solenoid B=μ i n where n=turns per unit length 41

42 Magnetic Field of a Real Solenoid N = number of turns H = height z R Coordinates of solenoid conductor follow the parameterized equations x=r cos(θ) y= R sin (θ) z=a θ H/ y for N π θ N π H/ and where a= H π N x current I 4

43 Finding Magnetic Field with Biot-Savart Law z d l = db r d B probe at ( x, y, z ) μ I d l r 4π r B ( r )= d B y x current I 4

44 Beware of Random Walks of Roundoff Error! Example: edit integration lab program to try to compute pi: 1 π= 4 1 x dx 44

45 Beware of Random Walks of Roundoff Error! #include #include #include #include <stdio.h> <stdlib.h> <math.h> "integrate.h" double func(double x) { return(4. * sqrt(1. - x*x)); } int main(int argc,char *argv[]) { double xinc; if (argc!= ) { fprintf(stderr,"%s <xinc>\n",argv[]); exit(1); } xinc = atof(argv[1]); printf("trapezoidal rule:\n"); trapezoidal(func,.,1.,xinc); printf("simpson's rule:\n"); simpson(func,.,1.,xinc); exit();} 45

46 Beware of Random Walks of Roundoff Error! $./pi_integrate.1 Trapezoidal rule: -nan Simpson's rule: -nan $./pi_integrate.5 Trapezoidal rule: Simpson's rule: Try two different step sizes through the integration routines So what is this nan business??? 46

47 NaN Binary Storage Convention 1. = s= e = 1-1 = q = 1. 1.=( 1) 1.. = 1. s=. by convention all actual bits NaN = s=1 all exponent bits =1 Most significant mantissa bit=1 NaN by convention 47

48 The man Page for sqrt() SQRT() NAME Linux Programmer's Manual SQRT() sqrt, sqrtf, sqrtl - square root function SYNOPSIS #include <math.h> double sqrt(double x); float sqrtf(float x); long double sqrtl(long double x); Link with -lm. DESCRIPTION The sqrt() function returns the nonnegative square root of x. RETURN VALUE!!! On success, these functions return the square root of x. If x is a NaN, a NaN is returned. If x is + (-), + (-) is returned. If x is positive infinity, positive infinity is returned. If x is less than -, a domain error occurs, and a NaN is returned. 48

Visualization of numerical data

Visualization of numerical data Class Progress Basics of Linux, gnuplot, C Visualization of numerical data Roots of nonlinear equations (Midterm 1) Solutions of systems of linear equations Solutions of systems of nonlinear equations

More information

Satellite Orbital Maneuvers and Transfers. Dr Ugur GUVEN

Satellite Orbital Maneuvers and Transfers. Dr Ugur GUVEN Satellite Orbital Maneuvers and Transfers Dr Ugur GUVEN Orbit Maneuvers At some point during the lifetime of most space vehicles or satellites, we must change one or more of the orbital elements. For example,

More information

Midterm Review. Igor Yanovsky (Math 151A TA)

Midterm Review. Igor Yanovsky (Math 151A TA) Midterm Review Igor Yanovsky (Math 5A TA) Root-Finding Methods Rootfinding methods are designed to find a zero of a function f, that is, to find a value of x such that f(x) =0 Bisection Method To apply

More information

TP 3:Runge-Kutta Methods-Solar System-The Method of Least Squares

TP 3:Runge-Kutta Methods-Solar System-The Method of Least Squares TP :Runge-Kutta Methods-Solar System-The Method of Least Squares December 8, 2009 1 Runge-Kutta Method The problem is still trying to solve the first order differential equation dy = f(y, x). (1) dx In

More information

Physics 208, Spring 2016 Exam #3

Physics 208, Spring 2016 Exam #3 Physics 208, Spring 206 Exam #3 A Name (Last, First): ID #: Section #: You have 75 minutes to complete the exam. Formulae are provided on an attached sheet. You may NOT use any other formula sheet. You

More information

Electromagnetism Answers to Problem Set 9 Spring 2006

Electromagnetism Answers to Problem Set 9 Spring 2006 Electromagnetism 70006 Answers to Problem et 9 pring 006. Jackson Prob. 5.: Reformulate the Biot-avart law in terms of the solid angle subtended at the point of observation by the current-carrying circuit.

More information

Lesson 7. Luis Anchordoqui. Physics 168. Tuesday, October 10, 17

Lesson 7. Luis Anchordoqui. Physics 168. Tuesday, October 10, 17 Lesson 7 Physics 168 1 Eruption of a large volcano on Jupiter s moon When volcano erupts speed of effluence exceeds escape speed of Io and so a stream of particles is projected into space Material in stream

More information

Phys 7221, Fall 2006: Midterm exam

Phys 7221, Fall 2006: Midterm exam Phys 7221, Fall 2006: Midterm exam October 20, 2006 Problem 1 (40 pts) Consider a spherical pendulum, a mass m attached to a rod of length l, as a constrained system with r = l, as shown in the figure.

More information

Question 1: A particle starts at rest and moves along a cycloid whose equation is. 2ay y a

Question 1: A particle starts at rest and moves along a cycloid whose equation is. 2ay y a Stephen Martin PHYS 10 Homework #1 Question 1: A particle starts at rest and moves along a cycloid whose equation is [ ( ) a y x = ± a cos 1 + ] ay y a There is a gravitational field of strength g in the

More information

Answers to Homework 9: Numerical Integration

Answers to Homework 9: Numerical Integration Math 8A Spring Handout # Sergey Fomel April 3, Answers to Homework 9: Numerical Integration. a) Suppose that the function f x) = + x ) is known at three points: x =, x =, and x 3 =. Interpolate the function

More information

Lecture 15 - Orbit Problems

Lecture 15 - Orbit Problems Lecture 15 - Orbit Problems A Puzzle... The ellipse shown below has one focus at the origin and its major axis lies along the x-axis. The ellipse has a semimajor axis of length a and a semi-minor axis

More information

Magnetism. February 27, 2014 Physics for Scientists & Engineers 2, Chapter 27 1

Magnetism. February 27, 2014 Physics for Scientists & Engineers 2, Chapter 27 1 Magnetism February 27, 2014 Physics for Scientists & Engineers 2, Chapter 27 1 Force on a Current Carrying Wire! The magnitude of the magnetic force on a wire of length L carrying a current i is F = il

More information

CP1 REVISION LECTURE 1 INTRODUCTION TO CLASSICAL MECHANICS. Prof. N. Harnew University of Oxford TT 2017

CP1 REVISION LECTURE 1 INTRODUCTION TO CLASSICAL MECHANICS. Prof. N. Harnew University of Oxford TT 2017 CP1 REVISION LECTURE 1 INTRODUCTION TO CLASSICAL MECHANICS Prof. N. Harnew University of Oxford TT 2017 1 OUTLINE : CP1 REVISION LECTURE 1 : INTRODUCTION TO CLASSICAL MECHANICS 1. Force and work 1.1 Newton

More information

Torque on a Current Loop

Torque on a Current Loop Today Chapter 19 Magnetism Torque on a current loop, electrical motor Magnetic field around a current carrying wire. Ampere s law Solenoid Material magnetism Clicker 1 Which of the following is wrong?

More information

Calculus II Practice Test Problems for Chapter 7 Page 1 of 6

Calculus II Practice Test Problems for Chapter 7 Page 1 of 6 Calculus II Practice Test Problems for Chapter 7 Page of 6 This is a set of practice test problems for Chapter 7. This is in no way an inclusive set of problems there can be other types of problems on

More information

B r Solved Problems Magnetic Field of a Straight Wire

B r Solved Problems Magnetic Field of a Straight Wire (4) Equate Iencwith d s to obtain I π r = NI NI = = ni = l π r 9. Solved Problems 9.. Magnetic Field of a Straight Wire Consider a straight wire of length L carrying a current I along the +x-direction,

More information

Fundamental Constants

Fundamental Constants Fundamental Constants Atomic Mass Unit u 1.660 540 2 10 10 27 kg 931.434 32 28 MeV c 2 Avogadro s number N A 6.022 136 7 36 10 23 (g mol) 1 Bohr magneton μ B 9.274 015 4(31) 10-24 J/T Bohr radius a 0 0.529

More information

Biot-Savart. The equation is this:

Biot-Savart. The equation is this: Biot-Savart When a wire carries a current, this current produces a magnetic field in the vicinity of the wire. One way of determining the strength and direction of this field is with the Law of Biot-Savart.

More information

Physics 121, March 25, Rotational Motion and Angular Momentum. Department of Physics and Astronomy, University of Rochester

Physics 121, March 25, Rotational Motion and Angular Momentum. Department of Physics and Astronomy, University of Rochester Physics 121, March 25, 2008. Rotational Motion and Angular Momentum. Physics 121. March 25, 2008. Course Information Topics to be discussed today: Review of Rotational Motion Rolling Motion Angular Momentum

More information

Conservation of Momentum. Last modified: 08/05/2018

Conservation of Momentum. Last modified: 08/05/2018 Conservation of Momentum Last modified: 08/05/2018 Links Momentum & Impulse Momentum Impulse Conservation of Momentum Example 1: 2 Blocks Initial Momentum is Not Enough Example 2: Blocks Sticking Together

More information

( )( )( ) Model: The magnetic field is that of a moving charged particle. Visualize: 10 T m/a C m/s sin T. 1.

( )( )( ) Model: The magnetic field is that of a moving charged particle. Visualize: 10 T m/a C m/s sin T. 1. 33.3. Model: The magnetic field is that of a moving charged particle. Visualize: The first point is on the x-axis, with θ a = 90. The second point is on the y-axis, with θ b = 180, and the third point

More information

Cyclotron, final. The cyclotron s operation is based on the fact that T is independent of the speed of the particles and of the radius of their path

Cyclotron, final. The cyclotron s operation is based on the fact that T is independent of the speed of the particles and of the radius of their path Cyclotron, final The cyclotron s operation is based on the fact that T is independent of the speed of the particles and of the radius of their path K 1 qbr 2 2m 2 = mv = 2 2 2 When the energy of the ions

More information

m e = m/s. x = vt = t = x v = m

m e = m/s. x = vt = t = x v = m 5. (a) The textbook uses geomagnetic north to refer to Earth s magnetic pole lying in the northern hemisphere. Thus, the electrons are traveling northward. The vertical component of the magnetic field

More information

Handout 8: Sources of magnetic field. Magnetic field of moving charge

Handout 8: Sources of magnetic field. Magnetic field of moving charge 1 Handout 8: Sources of magnetic field Magnetic field of moving charge Moving charge creates magnetic field around it. In Fig. 1, charge q is moving at constant velocity v. The magnetic field at point

More information

3 2 6 Solve the initial value problem u ( t) 3. a- If A has eigenvalues λ =, λ = 1 and corresponding eigenvectors 1

3 2 6 Solve the initial value problem u ( t) 3. a- If A has eigenvalues λ =, λ = 1 and corresponding eigenvectors 1 Math Problem a- If A has eigenvalues λ =, λ = 1 and corresponding eigenvectors 1 3 6 Solve the initial value problem u ( t) = Au( t) with u (0) =. 3 1 u 1 =, u 1 3 = b- True or false and why 1. if A is

More information

Rotational Motion, Torque, Angular Acceleration, and Moment of Inertia. 8.01t Nov 3, 2004

Rotational Motion, Torque, Angular Acceleration, and Moment of Inertia. 8.01t Nov 3, 2004 Rotational Motion, Torque, Angular Acceleration, and Moment of Inertia 8.01t Nov 3, 2004 Rotation and Translation of Rigid Body Motion of a thrown object Translational Motion of the Center of Mass Total

More information

Chapter 19. Magnetism

Chapter 19. Magnetism Chapter 19 Magnetism Magnetic Fields When moving through a magnetic field, a charged particle experiences a magnetic force This force has a maximum value when the charge moves perpendicularly to the magnetic

More information

CP1 REVISION LECTURE 3 INTRODUCTION TO CLASSICAL MECHANICS. Prof. N. Harnew University of Oxford TT 2017

CP1 REVISION LECTURE 3 INTRODUCTION TO CLASSICAL MECHANICS. Prof. N. Harnew University of Oxford TT 2017 CP1 REVISION LECTURE 3 INTRODUCTION TO CLASSICAL MECHANICS Prof. N. Harnew University of Oxford TT 2017 1 OUTLINE : CP1 REVISION LECTURE 3 : INTRODUCTION TO CLASSICAL MECHANICS 1. Angular velocity and

More information

Physics 202 Laboratory 3. Root-Finding 1. Laboratory 3. Physics 202 Laboratory

Physics 202 Laboratory 3. Root-Finding 1. Laboratory 3. Physics 202 Laboratory Physics 202 Laboratory 3 Root-Finding 1 Laboratory 3 Physics 202 Laboratory The fundamental question answered by this week s lab work will be: Given a function F (x), find some/all of the values {x i }

More information

Two-Dimensional Rotational Kinematics

Two-Dimensional Rotational Kinematics Two-Dimensional Rotational Kinematics Rigid Bodies A rigid body is an extended object in which the distance between any two points in the object is constant in time. Springs or human bodies are non-rigid

More information

t 2 + 2t dt = (t + 1) dt + 1 = arctan t x + 6 x(x 3)(x + 2) = A x +

t 2 + 2t dt = (t + 1) dt + 1 = arctan t x + 6 x(x 3)(x + 2) = A x + MATH 06 0 Practice Exam #. (0 points) Evaluate the following integrals: (a) (0 points). t +t+7 This is an irreducible quadratic; its denominator can thus be rephrased via completion of the square as a

More information

Exam 2 Solutions. ε 3. ε 1. Problem 1

Exam 2 Solutions. ε 3. ε 1. Problem 1 Exam 2 Solutions Problem 1 In the circuit shown, R1=100 Ω, R2=25 Ω, and the ideal batteries have EMFs of ε1 = 6.0 V, ε2 = 3.0 V, and ε3 = 1.5 V. What is the magnitude of the current flowing through resistor

More information

Elements of Floating-point Arithmetic

Elements of Floating-point Arithmetic Elements of Floating-point Arithmetic Sanzheng Qiao Department of Computing and Software McMaster University July, 2012 Outline 1 Floating-point Numbers Representations IEEE Floating-point Standards Underflow

More information

SOLUTIONS FOR PRACTICE FINAL EXAM

SOLUTIONS FOR PRACTICE FINAL EXAM SOLUTIONS FOR PRACTICE FINAL EXAM ANDREW J. BLUMBERG. Solutions () Short answer questions: (a) State the mean value theorem. Proof. The mean value theorem says that if f is continuous on (a, b) and differentiable

More information

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method COURSE 7 3. Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method The presence of derivatives in the remainder difficulties in applicability to practical problems

More information

Chapters 10 & 11: Rotational Dynamics Thursday March 8 th

Chapters 10 & 11: Rotational Dynamics Thursday March 8 th Chapters 10 & 11: Rotational Dynamics Thursday March 8 th Review of rotational kinematics equations Review and more on rotational inertia Rolling motion as rotation and translation Rotational kinetic energy

More information

PHY321 Homework Set 10

PHY321 Homework Set 10 PHY321 Homework Set 10 1. [5 pts] A small block of mass m slides without friction down a wedge-shaped block of mass M and of opening angle α. Thetriangular block itself slides along a horizontal floor,

More information

A study upon Eris. I. Describing and characterizing the orbit of Eris around the Sun. I. Breda 1

A study upon Eris. I. Describing and characterizing the orbit of Eris around the Sun. I. Breda 1 Astronomy & Astrophysics manuscript no. Eris c ESO 2013 March 27, 2013 A study upon Eris I. Describing and characterizing the orbit of Eris around the Sun I. Breda 1 Faculty of Sciences (FCUP), University

More information

Numerical Analysis Homework, Problems

Numerical Analysis Homework, Problems Numerical Analysis Homework, Problems. Modify the following program to return the sum, the product and the difference of the two arguments #include #include mainint argc, char **argv)

More information

Elements of Floating-point Arithmetic

Elements of Floating-point Arithmetic Elements of Floating-point Arithmetic Sanzheng Qiao Department of Computing and Software McMaster University July, 2012 Outline 1 Floating-point Numbers Representations IEEE Floating-point Standards Underflow

More information

Currents (1) Line charge λ (C/m) with velocity v : in time t, This constitutes a current I = λv (vector). Magnetic force on a segment of length dl is

Currents (1) Line charge λ (C/m) with velocity v : in time t, This constitutes a current I = λv (vector). Magnetic force on a segment of length dl is Magnetostatics 1. Currents 2. Relativistic origin of magnetic field 3. Biot-Savart law 4. Magnetic force between currents 5. Applications of Biot-Savart law 6. Ampere s law in differential form 7. Magnetic

More information

I am a real person in real space in real time in real fight with modern and Nobel

I am a real person in real space in real time in real fight with modern and Nobel I am a real person in real space in real time in real fight with modern and Nobel Modern and Nobel physicists and astronomers measure in present time (real time = measured time) and calculate in past time

More information

F = ma. G mm r 2. S center

F = ma. G mm r 2. S center In the early 17 th century, Kepler discovered the following three laws of planetary motion: 1. The planets orbit around the sun in an ellipse with the sun at one focus. 2. As the planets orbit around the

More information

AP Physics C Textbook Problems

AP Physics C Textbook Problems AP Physics C Textbook Problems Chapter 13 Pages 412 416 HW-16: 03. A 200-kg object and a 500-kg object are separated by 0.400 m. Find the net gravitational force exerted by these objects on a 50.0-kg object

More information

Physics 235 Chapter 7. Chapter 7 Hamilton's Principle - Lagrangian and Hamiltonian Dynamics

Physics 235 Chapter 7. Chapter 7 Hamilton's Principle - Lagrangian and Hamiltonian Dynamics Chapter 7 Hamilton's Principle - Lagrangian and Hamiltonian Dynamics Many interesting physics systems describe systems of particles on which many forces are acting. Some of these forces are immediately

More information

Physics 115/242 The Kepler Problem

Physics 115/242 The Kepler Problem Physics 115/242 The Kepler Problem Peter Young (Dated: April 21, 23) I. INTRODUCTION We consider motion of a planet around the sun, the Kepler problem, see e.g. Garcia, Numerical Methods for Physics, Sec.

More information

Chapter 4 Integration

Chapter 4 Integration Chapter 4 Integration SECTION 4.1 Antiderivatives and Indefinite Integration Calculus: Chapter 4 Section 4.1 Antiderivative A function F is an antiderivative of f on an interval I if F '( x) f ( x) for

More information

Physics 141. Lecture 18. Frank L. H. Wolfs Department of Physics and Astronomy, University of Rochester, Lecture 18, Page 1

Physics 141. Lecture 18. Frank L. H. Wolfs Department of Physics and Astronomy, University of Rochester, Lecture 18, Page 1 Physics 141. Lecture 18. Frank L. H. Wolfs Department of Physics and Astronomy, University of Rochester, Lecture 18, Page 1 Physics 141. Lecture 18. Course Information. Topics to be discussed today: A

More information

10/24/2012 PHY 102. (FAWOLE O.G.) Good day. Here we go..

10/24/2012 PHY 102. (FAWOLE O.G.) Good day. Here we go.. Good day. Here we go.. 1 PHY102- GENERAL PHYSICS II Text Book: Fundamentals of Physics Authors: Halliday, Resnick & Walker Edition: 8 th Extended Lecture Schedule TOPICS: Dates Ch. 28 Magnetic Fields 12

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Physics Department. Problem Set 8

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Physics Department. Problem Set 8 MASSACHUSETTS INSTITUTE OF TECHNOLOGY Physics Department Physics 8.033 October 31, 003 Due: Friday, November 7 (by 4:30 pm) Reading: Chapter 8 in French. Problem Set 8 Reminder: Quiz will be given on Friday,

More information

PRE-LEAVING CERTIFICATE EXAMINATION, 2010

PRE-LEAVING CERTIFICATE EXAMINATION, 2010 L.7 PRE-LEAVING CERTIFICATE EXAMINATION, 00 MATHEMATICS HIGHER LEVEL PAPER (300 marks) TIME : ½ HOURS Attempt SIX QUESTIONS (50 marks each). WARNING: Marks will be lost if all necessary work is not clearly

More information

Physics 8.02 Exam Two Mashup Spring 2003

Physics 8.02 Exam Two Mashup Spring 2003 Physics 8.0 Exam Two Mashup Spring 003 Some (possibly useful) Relations: closedsurface da Q κ d = ε E A inside points from inside to outside b V = V V = E d s moving from a to b b a E d s = 0 V many point

More information

Practice problems from old exams for math 132 William H. Meeks III

Practice problems from old exams for math 132 William H. Meeks III Practice problems from old exams for math 32 William H. Meeks III Disclaimer: Your instructor covers far more materials that we can possibly fit into a four/five questions exams. These practice tests are

More information

Chapter 13. Gravitation

Chapter 13. Gravitation Chapter 13 Gravitation e = c/a A note about eccentricity For a circle c = 0 à e = 0 a Orbit Examples Mercury has the highest eccentricity of any planet (a) e Mercury = 0.21 Halley s comet has an orbit

More information

Physics 472 Final Computational Project

Physics 472 Final Computational Project Physics 472 Final Computational Project Goal: The goal of this project is to numerically integrate the Time Independent Schrodinger Equation (TISE) (Griffiths, 2005) and reproduce the energy band structure

More information

Calculus II Practice Test 1 Problems: , 6.5, Page 1 of 10

Calculus II Practice Test 1 Problems: , 6.5, Page 1 of 10 Calculus II Practice Test Problems: 6.-6.3, 6.5, 7.-7.3 Page of This is in no way an inclusive set of problems there can be other types of problems on the actual test. To prepare for the test: review homework,

More information

Scientific Computing

Scientific Computing 2301678 Scientific Computing Chapter 2 Interpolation and Approximation Paisan Nakmahachalasint Paisan.N@chula.ac.th Chapter 2 Interpolation and Approximation p. 1/66 Contents 1. Polynomial interpolation

More information

Notes 10-3: Ellipses

Notes 10-3: Ellipses Notes 10-3: Ellipses I. Ellipse- Definition and Vocab An ellipse is the set of points P(x, y) in a plane such that the sum of the distances from any point P on the ellipse to two fixed points F 1 and F

More information

Chapter 21. Magnetism

Chapter 21. Magnetism Chapter 21 Magnetism Magnets Poles of a magnet are the ends where objects are most strongly attracted Two poles, called north and south Like poles repel each other and unlike poles attract each other Similar

More information

Integration. Topic: Trapezoidal Rule. Major: General Engineering. Author: Autar Kaw, Charlie Barker.

Integration. Topic: Trapezoidal Rule. Major: General Engineering. Author: Autar Kaw, Charlie Barker. Integration Topic: Trapezoidal Rule Major: General Engineering Author: Autar Kaw, Charlie Barker 1 What is Integration Integration: The process of measuring the area under a function plotted on a graph.

More information

Ch. 28: Sources of Magnetic Fields

Ch. 28: Sources of Magnetic Fields Ch. 28: Sources of Magnetic Fields Electric Currents Create Magnetic Fields A long, straight wire A current loop A solenoid Slide 24-14 Biot-Savart Law Current produces a magnetic field The Biot-Savart

More information

CLASSIFICATION AND PRINCIPLE OF SUPERPOSITION FOR SECOND ORDER LINEAR PDE

CLASSIFICATION AND PRINCIPLE OF SUPERPOSITION FOR SECOND ORDER LINEAR PDE CLASSIFICATION AND PRINCIPLE OF SUPERPOSITION FOR SECOND ORDER LINEAR PDE 1. Linear Partial Differential Equations A partial differential equation (PDE) is an equation, for an unknown function u, that

More information

Universal Gravitation

Universal Gravitation Universal Gravitation Newton s Law of Universal Gravitation Every particle in the Universe attracts every other particle with a force that is directly proportional to the product of their masses and inversely

More information

Satellite meteorology

Satellite meteorology GPHS 422 Satellite meteorology GPHS 422 Satellite meteorology Lecture 1 6 July 2012 Course outline 2012 2 Course outline 2012 - continued 10:00 to 12:00 3 Course outline 2012 - continued 4 Some reading

More information

DRAFT - Math 102 Lecture Note - Dr. Said Algarni

DRAFT - Math 102 Lecture Note - Dr. Said Algarni Math02 - Term72 - Guides and Exercises - DRAFT 7 Techniques of Integration A summery for the most important integrals that we have learned so far: 7. Integration by Parts The Product Rule states that if

More information

Physics 200 Lecture 4. Integration. Lecture 4. Physics 200 Laboratory

Physics 200 Lecture 4. Integration. Lecture 4. Physics 200 Laboratory Physics 2 Lecture 4 Integration Lecture 4 Physics 2 Laboratory Monday, February 21st, 211 Integration is the flip-side of differentiation in fact, it is often possible to write a differential equation

More information

Lecture 2c: Satellite Orbits

Lecture 2c: Satellite Orbits Lecture 2c: Satellite Orbits Outline 1. Newton s Laws of Mo3on 2. Newton s Law of Universal Gravita3on 3. Kepler s Laws 4. Pu>ng Newton and Kepler s Laws together and applying them to the Earth-satellite

More information

Numerical Methods. King Saud University

Numerical Methods. King Saud University Numerical Methods King Saud University Aims In this lecture, we will... find the approximate solutions of derivative (first- and second-order) and antiderivative (definite integral only). Numerical Differentiation

More information

Physics Tutorial MF1 Magnetic Forces

Physics Tutorial MF1 Magnetic Forces Physics Tutorial MF1 Magnetic Forces 1 Magnetic Forces The force F on a charge q moving with velocity v in a magnetic field is: F = qv The force F on a straight conductor of length L carrying a current

More information

Monte Carlo Sampling

Monte Carlo Sampling Monte Carlo Sampling Sampling from PDFs: given F(x) in analytic or tabulated form, generate a random number ξ in the range (0,1) and solve the equation to get the randomly sampled value X X ξ = F(x)dx

More information

In the presence of viscous damping, a more generalized form of the Lagrange s equation of motion can be written as

In the presence of viscous damping, a more generalized form of the Lagrange s equation of motion can be written as 2 MODELING Once the control target is identified, which includes the state variable to be controlled (ex. speed, position, temperature, flow rate, etc), and once the system drives are identified (ex. force,

More information

Lecture 31: MON 30 MAR Review Session : Midterm 3

Lecture 31: MON 30 MAR Review Session : Midterm 3 Physics 2113 Jonathan Dowling Lecture 31: MON 30 MAR Review Session : Midterm 3 EXAM 03: 8PM MON 30 MAR in Cox Auditorium The exam will cover: Ch.26 through Ch.29 The exam will be based on: HW07 HW10.

More information

Sources of Magnetic Field

Sources of Magnetic Field Chapter 28 Sources of Magnetic Field PowerPoint Lectures for University Physics, Thirteenth Edition Hugh D. Young and Roger A. Freedman Lectures by Wayne Anderson Goals for Chapter 28 To determine the

More information

Nov. 27, 2017 Momentum & Kinetic Energy in Collisions elastic collision inelastic collision. completely inelastic collision

Nov. 27, 2017 Momentum & Kinetic Energy in Collisions elastic collision inelastic collision. completely inelastic collision Nov. 27, 2017 Momentum & Kinetic Energy in Collisions In our initial discussion of collisions, we looked at one object at a time, however we'll now look at the system of objects, with the assumption that

More information

Physics 5A Final Review Solutions

Physics 5A Final Review Solutions Physics A Final Review Solutions Eric Reichwein Department of Physics University of California, Santa Cruz November 6, 0. A stone is dropped into the water from a tower 44.m above the ground. Another stone

More information

Rotation. EMU Physics Department. Ali ÖVGÜN.

Rotation. EMU Physics Department. Ali ÖVGÜN. Rotation Ali ÖVGÜN EMU Physics Department www.aovgun.com Rotational Motion Angular Position and Radians Angular Velocity Angular Acceleration Rigid Object under Constant Angular Acceleration Angular and

More information

Magnets. Domain = small magnetized region of a magnetic material. all the atoms are grouped together and aligned

Magnets. Domain = small magnetized region of a magnetic material. all the atoms are grouped together and aligned Magnetic Fields Magnets Domain = small magnetized region of a magnetic material all the atoms are grouped together and aligned Magnets Ferromagnetic materials domains can be forced to line up by applying

More information

5/2/2012 Miscellaneous exercises Orbital motion 1

5/2/2012 Miscellaneous exercises Orbital motion 1 5/2/22 Miscellaneous exercises Orbital motion Orbital motion This exercise explores the motion of a particle in a spherical Coulomb potential. The equations of motion are similar to those for a planet

More information

Final Exam 2011 Winter Term 2 Solutions

Final Exam 2011 Winter Term 2 Solutions . (a Find the radius of convergence of the series: ( k k+ x k. Solution: Using the Ratio Test, we get: L = lim a k+ a k = lim ( k+ k+ x k+ ( k k+ x k = lim x = x. Note that the series converges for L

More information

Translational and Rotational Dynamics!

Translational and Rotational Dynamics! Translational and Rotational Dynamics Robert Stengel Robotics and Intelligent Systems MAE 345, Princeton University, 217 Copyright 217 by Robert Stengel. All rights reserved. For educational use only.

More information

V sphere = 4 3 πr3. a c = v2. F c = m v2. F s = k s. F ds. = dw dt. P W t. K linear 1 2 mv2. U s = 1 2 kx2 E = K + U. p mv

V sphere = 4 3 πr3. a c = v2. F c = m v2. F s = k s. F ds. = dw dt. P W t. K linear 1 2 mv2. U s = 1 2 kx2 E = K + U. p mv v = v i + at x = x i + v i t + 1 2 at2 v 2 = v 2 i + 2a x F = ma F = dp dt P = mv R = v2 sin(2θ) g v dx dt a dv dt = d2 x dt 2 x = r cos(θ) V sphere = 4 3 πr3 a c = v2 r = rω2 F f = µf n F c = m v2 r =

More information

Chapter 4. Motion in Two Dimensions. Professor Wa el Salah

Chapter 4. Motion in Two Dimensions. Professor Wa el Salah Chapter 4 Motion in Two Dimensions Kinematics in Two Dimensions Will study the vector nature of position, velocity and acceleration in greater detail. Will treat projectile motion and uniform circular

More information

Section 6.6 Gaussian Quadrature

Section 6.6 Gaussian Quadrature Section 6.6 Gaussian Quadrature Key Terms: Method of undetermined coefficients Nonlinear systems Gaussian quadrature Error Legendre polynomials Inner product Adapted from http://pathfinder.scar.utoronto.ca/~dyer/csca57/book_p/node44.html

More information

Induction and Inductance

Induction and Inductance Welcome Back to Physics 1308 Induction and Inductance Michael Faraday 22 September 1791 25 August 1867 Announcements Assignments for Tuesday, November 6th: - Reading: Chapter 30.6-30.8 - Watch Videos:

More information

Get Discount Coupons for your Coaching institute and FREE Study Material at Force System

Get Discount Coupons for your Coaching institute and FREE Study Material at   Force System Get Discount Coupons for your Coaching institute and FEE Study Material at www.pickmycoaching.com Mechanics Force System When a member of forces simultaneously acting on the body, it is known as force

More information

Math 265H: Calculus III Practice Midterm II: Fall 2014

Math 265H: Calculus III Practice Midterm II: Fall 2014 Name: Section #: Math 65H: alculus III Practice Midterm II: Fall 14 Instructions: This exam has 7 problems. The number of points awarded for each question is indicated in the problem. Answer each question

More information

PLANAR KINETIC EQUATIONS OF MOTION (Section 17.2)

PLANAR KINETIC EQUATIONS OF MOTION (Section 17.2) PLANAR KINETIC EQUATIONS OF MOTION (Section 17.2) We will limit our study of planar kinetics to rigid bodies that are symmetric with respect to a fixed reference plane. As discussed in Chapter 16, when

More information

Rotational Dynamics continued

Rotational Dynamics continued Chapter 9 Rotational Dynamics continued 9.4 Newton s Second Law for Rotational Motion About a Fixed Axis ROTATIONAL ANALOG OF NEWTON S SECOND LAW FOR A RIGID BODY ROTATING ABOUT A FIXED AXIS I = ( mr 2

More information

1. (a) Describe the difference between over-expanded, under-expanded and ideallyexpanded

1. (a) Describe the difference between over-expanded, under-expanded and ideallyexpanded Code No: R05322106 Set No. 1 1. (a) Describe the difference between over-expanded, under-expanded and ideallyexpanded rocket nozzles. (b) While on its way into orbit a space shuttle with an initial mass

More information

Central force motion/kepler problem. 1 Reducing 2-body motion to effective 1-body, that too with 2 d.o.f and 1st order differential equations

Central force motion/kepler problem. 1 Reducing 2-body motion to effective 1-body, that too with 2 d.o.f and 1st order differential equations Central force motion/kepler problem This short note summarizes our discussion in the lectures of various aspects of the motion under central force, in particular, the Kepler problem of inverse square-law

More information

Chapter 8. Orbits. 8.1 Conics

Chapter 8. Orbits. 8.1 Conics Chapter 8 Orbits 8.1 Conics Conic sections first studied in the abstract by the Greeks are the curves formed by the intersection of a plane with a cone. Ignoring degenerate cases (such as a point, or pairs

More information

Magnetostatics and the vector potential

Magnetostatics and the vector potential Magnetostatics and the vector potential December 8, 2015 1 The divergence of the magnetic field Starting with the general form of the Biot-Savart law, B (x 0 ) we take the divergence of both sides with

More information

Physics 8, Fall 2011, equation sheet work in progress

Physics 8, Fall 2011, equation sheet work in progress 1 year 3.16 10 7 s Physics 8, Fall 2011, equation sheet work in progress circumference of earth 40 10 6 m speed of light c = 2.9979 10 8 m/s mass of proton or neutron 1 amu ( atomic mass unit ) = 1 1.66

More information

Chapter 8: Momentum, Impulse, & Collisions. Newton s second law in terms of momentum:

Chapter 8: Momentum, Impulse, & Collisions. Newton s second law in terms of momentum: linear momentum: Chapter 8: Momentum, Impulse, & Collisions Newton s second law in terms of momentum: impulse: Under what SPECIFIC condition is linear momentum conserved? (The answer does not involve collisions.)

More information

Chapter 9. Linear Momentum and Collisions

Chapter 9. Linear Momentum and Collisions Chapter 9 Linear Momentum and Collisions Momentum Analysis Models Force and acceleration are related by Newton s second law. When force and acceleration vary by time, the situation can be very complicated.

More information

force per unit length

force per unit length Physics 153 Sample Examination for Fourth Unit As you should know, this unit covers magnetic fields, how those fields interact with charged particles, how they are produced, how they can produce electric

More information

Chapter 6: Vector Analysis

Chapter 6: Vector Analysis Chapter 6: Vector Analysis We use derivatives and various products of vectors in all areas of physics. For example, Newton s 2nd law is F = m d2 r. In electricity dt 2 and magnetism, we need surface and

More information

n Higher Physics 1B (Special) (PHYS1241) (6UOC) n Advanced Science n Double Degree (Science/Engineering) n Credit or higher in Physics 1A

n Higher Physics 1B (Special) (PHYS1241) (6UOC) n Advanced Science n Double Degree (Science/Engineering) n Credit or higher in Physics 1A Physics in Session 2: I n Physics / Higher Physics 1B (PHYS1221/1231) n Science, dvanced Science n Engineering: Electrical, Photovoltaic,Telecom n Double Degree: Science/Engineering n 6 UOC n Waves n Physical

More information

Translational vs Rotational. m x. Connection Δ = = = = = = Δ = = = = = = Δ =Δ = = = = = 2 / 1/2. Work

Translational vs Rotational. m x. Connection Δ = = = = = = Δ = = = = = = Δ =Δ = = = = = 2 / 1/2. Work Translational vs Rotational / / 1/ Δ m x v dx dt a dv dt F ma p mv KE mv Work Fd / / 1/ θ ω θ α ω τ α ω ω τθ Δ I d dt d dt I L I KE I Work / θ ω α τ Δ Δ c t s r v r a v r a r Fr L pr Connection Translational

More information