fun with formulas !

42
W.Joho 1 Werner Joho Paul Scherrer Institute (PSI) CH5232 Villigen, Switzerland Fun with Formulas ! 4.July 2003 (updated 1.10.2010)

Upload: perrin

Post on 18-Jan-2016

76 views

Category:

Documents


0 download

DESCRIPTION

Fun with Formulas !. Werner Joho Paul Scherrer Institute (PSI) CH5232 Villigen, Switzerland. 4.July 2003 (updated 1.10.2010). Introduction. Formulas can be fun. They often can be made to look simple, transparent and thus beautiful (in the spirit of Einstein and Chandrasekhar). - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Fun with Formulas !

W.Joho1

Werner Joho

Paul Scherrer Institute (PSI)

CH5232 Villigen, Switzerland

Fun with Formulas !

4.July 2003

(updated 1.10.2010)

Page 2: Fun with Formulas !

W.Joho2

Introduction

Formulas can be fun. They often can be made to look simple,

transparent and thus beautiful (in the spirit of Einstein and

Chandrasekhar).

This can be achieved with some simple rules and a few tricks

of the trade.

This paper is a sample of some simple formulas, collected

during my career as a physicist.

The following material was presented (but not published)

at a seminar talk given at the CERN Accelerator School on

Synchrotron Radiation and Free Electron Lasers,

Brunnen, Switzerland, 2-9 July 2003

(this file is available on the WEB with google:

„JOHO PSI“)

Page 3: Fun with Formulas !

W.Joho3

Content

• philosophy for formulas

• capital growth

• new interpretation of Ohm‘s law

• logarithmic derivatives

• the relativistic equations of Einstein

• the magic triangle formed by the logarithmic

derivatives of the relativistic parameters

• Alternative Gradient Focusing, constructed by hand

• binomial curves everywhere,

approximation of a variety of functions, like

beam profiles, the fringe field of magnets,

the flux and brightness of synchrotron radiation etc.

• simple representation of phase space ellipses

• how to win money with statistics !

• design of beautiful tables with a Hamiltonian

Page 4: Fun with Formulas !

W.Joho4

simplify formulas, they should look „beautiful“

formula should indicate the proper dimensions

use units of 1'000 (cm should not exist in formulas!)

choose right scales for plots (e.g. logarithmic)

philosophy for formulas

example:

c = 3 ·108 m/s ?? better is:

c = 0.3·109 m/s or 300 m/s or 0.3 mm/ps !!

for comparison of electric forces: q·Є (kV/mm) with magnetic forces: q·v·B = q·β·c·B

c = 300 (kV/mm)/T !!

0 = 410-7 Vs/Am ?? better is:

0 = 0.4H/m = 0.4T/(kA/mm)

Page 5: Fun with Formulas !

W.Joho5

how to avoid akward numbers in electrodynamics

Page 6: Fun with Formulas !

W.Joho6

use logarithmic derivatives !use logarithmic derivatives !

3max0

Example: Magnet Weight W of a Cyclotron:

(W.Joho, Aarhus 1986, CERN Accelerator school)

=> for a plot : take logarithmic scale both for (B ) and W

=> take logarithm

W W ( )

B

max

and then derivative

( ) 3

( )

=> 1% change in (B ) gives 3% change in weight

or

ˆ p =

dW d B

W B

dp d d

p

Page 7: Fun with Formulas !

W.Joho7

Einstein triangle

Page 8: Fun with Formulas !

W.Joho8

„Magic Triangles” (W.Joho) with logarithmic derivatives of

relativistic parameter p~,,

2~p

dd

p

pd~

~

d

d

p

pd~

~2

2

p

pdddp

dd

p

pd~

~,~,~

~222

democracy! equally treatedare ~,, p

multiplication factors form inverse triangle

Page 9: Fun with Formulas !

W.Joho9

trigonometric functions for relativistic formula !

)momentum"(" tan~cos

1,sin

)1(

12

p

thenif

Page 10: Fun with Formulas !

W.Joho10

highly relativistic case

Page 11: Fun with Formulas !

W.Joho11

Undulator Radiation

IR-FEL

= 1.5 mm

= 2‘500 mm

SLS

ESR

F

K-e

dg

es

2

*

TESLA

undulator) of(property 2

12

222

*

K

nu

produced by an electron beam

of energy E = mc2

Page 12: Fun with Formulas !

W.Joho12

AG-focusingAG-focusing

simple example of alternative gradient focusing:

FODO-lattice with thin lenses (focal length f)

if L = 2f => construction is possible by hand !

it takes 6 periods to get a 3600-oscillation

i.e. the phase advance/period is = 600

fL

42sin

for L = 2f => = 600 (graphic example)

for L = 4f => = 1800 (instability !)

exact solution with transfer matrices gives

Page 13: Fun with Formulas !

W.Joho13

magnetic fringe field with binomial

1/

1/

1( ) , ,

(1 )

, 7 , 3 ,

3

(80% )

:

1( 1)

N SL

L

NS

xB x u

u x

x gap N S

free parameter for fit

origin of x at x field gap

inverse

uB

magnet edge

0.0

0.2

0.4

0.6

0.8

1.0

0 1 2 3 4u

B

N=7, S=-3

Page 14: Fun with Formulas !

W.Joho14

0.001

0.01

0.1

1

0.001 0.01 0.1 1 10x = c

50%

~ 2.1x

13

13

~ 1.3 x e– x

Flux Spectrum of synchrotron radiation

G1 x = x K5 35 3

xdxx

c eV = 665 E2 GeV B T

spectral flux F of electrons with energy E and current I

from a bending magnet with magnetic field B.

F = 2.46 ·1013 E[GeV] I[A] G1(x)

(photons/(s ·mrad ·0.1% bandwidth)

x=ε/εc , ε = photon energy , εc = critical photon energy

x

G1

Page 15: Fun with Formulas !

W.Joho15

Flux-Spectrum of Synchrotron Radiation

from Bending Magnet with Field B

G1 = normalized Flux

0.001

0.01

0.1

1

0.001 0.01 0.1 1 10x

G1

G1 x = x K5 35 3

xdxx

Fit with G1(x) = A x1/3 g(x) ,

SN

Lx

xxg

1

])(1[()(

fit of binomial g(x) with 8 data points to ±1.5%:

A = 2.11 , N = 0.848 , xL = 28.17 , S = 0.0513

Page 16: Fun with Formulas !

W.Joho16

general binomial curves

Page 17: Fun with Formulas !

W.Joho17

bottom

mid

mid

top

4bottom

mid

1/4top

x

x B ,

x

x A

0.0625 0.5 y

0.5 y

0.841 0.5 y

Diagram - B)(A,in

binomials oftion Classifica

reference points for binomial curve

0.00.1

0.20.30.4

0.50.60.70.8

0.91.0

0 0.5 1 1.5 2 2.5 3X

Y

0.0625

Xmid Xbottom

0.841

Xtop

top

mid

bottom

0.0

0.5

1.0

0 0.5 1A

B short range (s>0)

long range (s<0)

exponentials (s=>0)

Gaussian

square

SN

Lx

xssignxybinomial

1

])()(1[)( : any 3 reference points will give a fit for

N, S and xL. But the chosen points

top, mid and bottom allow a convenient

classification in the (A,B)-Diagram

Classification of binomial curvesClassification of binomial curves

Page 18: Fun with Formulas !

W.Joho18

properties of binomials

Page 19: Fun with Formulas !

W.Joho19

typical profiles y(u) in (A,B)-plottypical profiles y(u) in (A,B)-plot

12

Gaussian 11

decay lexponentia 10

9

18

circlequarter 17

concave parabola, 16

cbiquadrati )1(5

14

triangle 13

convex parabola, )1(2

11

6

2

4

2

2

22

2

u

u

u

u

ey

ey

ey

ey

uy

uy

uy

uy

uy

uy

uy

uy

12

3/17

3

22

2

2

2

1

121

field fringe magnetic )1(

120

1

119

Lorentzian-bi )1(

118

Lorentzian 1

117

1

116

)1(

1 15

1

114

square 113

uy

uy

uy

uy

uy

uy

uy

uy

y

14

17

1820

Gaussian

=square

B=A4

unaccessible

regio

nlong ra

nge regio

n

short ra

nge regio

n

exponen

tials 11

1

2

3

4

5

6

7 8

9

10

12

1516

19

21

13

Page 20: Fun with Formulas !

W.Joho20

representations of beam profiles with binomials

Tails of Profiles

(full width at 10% level :

≈ 4.4 σ for large range of m)

Profiles

Page 21: Fun with Formulas !

W.Joho21

clipped binomial phase space densities

1/2by reducedexponent with thebinomial aagain get we

:profile projected 2/12

'

'222

12'

)1()(

),,1(

)1(),(

m

LL

m

uxy

x

xv

x

xuvua

axx

for m1.5 the curves have a crossing point at εp ≈ ε and p ≈ 13%; i.e. ca. 87% of all particles are inside an ellipse with emittance ε=(2σ)·(2σ‘) , independent of m.

For a Gaussian distribution we have p=exp(-2εp/ε), which gives a straight line in this diagram (m=).

W.Joho, 1980 PSI report TM 11-4

εp/ε

Sacherer,

Lapostolle

big trick:

plot fraction

which is outside

of ellipse!

Page 22: Fun with Formulas !

W.Joho22

correlations x y

example:

income and research for 50 US companies in 1976

(from journal „Physics Today“, march and september 1978 )

x = income / sales

y = research budget / sales

There are 3 possibilities to show a correlation:

1. linear fit of y(x) : income stimulates research !

2. linear fit of x(y) : research stimulates income !

3. correlation ellipse from <x y> : high income strong research

Y=

X=

fit: y(x)

fit: x(y)

Page 23: Fun with Formulas !

W.Joho23

Representation of rms beam

ellipse

in phase space (x, x‘)

Page 24: Fun with Formulas !

W.Joho24

The parametric representation of the

rms beam ellipse in phase space (x, x‘)

Page 25: Fun with Formulas !

W.Joho25

Dictionary for Beam Parameters

Some useful quantities are easy to guess from the factors

sin or cos ( is 0 at a waist!) and dimensional arguments

(using m, mm and mrad)

emittance: = cos [mm mrad]

slope of envellope: d/ds = sin [mrad]

virtual waist size: xw = cos [mm]

-function at virtual waist: min = (/) cos [m]

distance from virtual waist: Lw = (/) sin [m]

= min tan

phase advance from virtual waist: =

the dictionary between the 2 representations is: (as a check : = 1/cos2 = 1 + tan2 = 1 + 2 )

= - tan = - 'xx ( = - x3/x1 = -x2/x4 ) [1]

= 2

= cos'

( = x2/x4 ) [m]

= 2'

= cos

' ( = x3/x1 ) [m-1]

Page 26: Fun with Formulas !

W.Joho26

Convolution of two ellipses

Example: convolution of the electron beam ellipse (x1, x1),

with parameter σ1,σ1’,1 and the diffraction limited photon

beam (x2, x2), with parameter σ2,σ2’,2 from an undulator.

Simple recipe:

add variances and correlations linearly

to form the combined ellipse (X,X’) with parameter ,’,

or

the convoluted emittance is

= cos ( 1 + 2) with the dictionary one can, if necessary, transform these

values back to the Courand-Snyder values , , .

2 = 12 + 2

2 2 = 1

2 + 22

sin = 11

sin1 + 22 sin2

<X2> = <x12> + <x2

2> <X2> = <x1

2> + <x22>

<XX> = <x1x1> + <x2x2>

Page 27: Fun with Formulas !

W.Joho27

in the the same spirit one can write:

6543 3333

23333 )...321(...321 nn

4

)1( 22nn 2]2

)1([

nn

This formula from Euler combines beautifully

3 fundamental numbers in mathematics

1ie

another „gem“ from Euler is:

(I figured this out myself, but I am sure it exists somewhere in the literature, but I could not find yet the proper reference)

12 1109 3333

or from Ramanujan comes:

Page 28: Fun with Formulas !

W.Joho28

treacherous predictions !treacherous predictions !

1) If you see a series of numbers: 2, 4, 6, 8, 10, 12, …

created by a formula F(n), for n=1, 2, 3, …6

you probably guess, that the next term is 14 !?

Now give me the number Y, your year of birth.

I give you below a formula F(n), where the next term

in the series (for n=7) is not 14, but exactly Y !

F(n)=2n+ (Y-14)(n-1)(n-2)(n-3)(n-4)(n-5)(n-6)/6!

------------------------The above example was easy to construct.

But what about the next treacherous example?

2) The following formula was constructed by the

Swiss

Physicist Leonard Euler:

P(n)=n(n-1)+41

Believe it or not, but for n=1, 2, 3….up to 40

this formula gives a prime number !

It fails the first time at n=41, where

P(41)=41*41=1‘681

(It then fails further at n=42, 45, 50, 57, 66 etc.)

Page 29: Fun with Formulas !

W.Joho29

winning money with statistics !winning money with statistics !

throw simultaneously 6 dices:

If all 6 dices show different

numbers (1, 2, 3, 4, 5, 6)

I give you 20 times your betting sum

…..but chance is only 1.5% !!

to be fair, I should offer you

65 times your betting sum!

5

5 4 3 2 1 5! 5( p = = = = 1.54% )

6 6 6 6 6 6 324

Page 30: Fun with Formulas !

W.Joho30

winning money with statistics !winning money with statistics !

Chance for double or triple birthday

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

0 10 20 30 40 50 60 70 80

Persons

Chance

[%

]

double or more

triple or more

what is the chance, that in a group of n persons, 2

people have the same birthday (disregarding the year

of birth and the 29th february)?

365

)366(

365

362

365

363

365

3641y wprobabilit

n

with 23 people the chance is already 50%,

with 40 people it is 87% and with 80 people a

double coincidence is a „sure bet“ and a

triple coincidence has a 42% chance!

Page 31: Fun with Formulas !

W.Joho31

exponential growth with compound interest

exponential growth with compound interest

e7 ≈ 210 ≈ 103

For a quick estimate of exponential growth one can use:

example:

With an interest rate of p(%) it takes T2

years

to double an initial capital investment C0.

T2 = 70 years/p(%)(70≈100 ln2)

To have an increase by a factor of 1‘000 (≈210)

it takes T1000 years:

T1000 = 10 T2 = 700 years/p(%)

With an interest rate of 2% it takes 35 years to

double the income (50 years without

compound interest)

How can we get this result very quickly?

Page 32: Fun with Formulas !

W.Joho32

Growth of CapitalGrowth of Capital

Growth of Capital

0

1

10

100

1,000

10,000

100,000

1,000,000

10,000,000

100,000,000

1,000,000,000

0 100 200 300 400 500 600 700

year

valu

e

2% interest

3% interest

difference

William Tell deposited 1 Fr. in a bank account, 700 years ago!

=> assume he gets 3% interest before taxes,

and 2% netto after taxes

The difference goes to the government

(which does not pay taxes)!!

after 700 years the government has 109 Fr.

the descendents of William Tell „only“ 106 Fr. !?

Page 33: Fun with Formulas !

W.Joho33

You want to construct a nice table for

your living room with this shape?

„Hamiltonian Table“„Hamiltonian Table“

Page 34: Fun with Formulas !

W.Joho34

„Hamiltonian“ Plots

Try to plot a curve F(x,y)=const.=c ,

where F(x,y) can be quite complex like

y). F(x,function desired thealong

smoothly move y(t)x(t), points dt the step nintegratio givena For

:method thisofbeauty The

. ingcorrespond get the toc ,0)f(x solve thenand

0 ye.g. choose can one conditions initial someget To

,,

. methodKutta - Rungeor the nintegratioCauchy - Euler the with(e.g.

motion of equations theSolve 2)

y(t)) H(x(t),iana Hamilton is y)f(x, function that the Pretend1)

:following theis methodelegant more A

x. of choicenext for the procedure srepeat thi Then

methods. iterative for y with equationnonlinear ingcorrespond the

solve thenandx certaina choose tois method One

]2)(exp[]2)(exp[

)()(),(

0

0

0 x

x

Hy

y

Hx

yL

yy

G

xL

xxG

yySx

xSn

b

yna

xyxF

Page 35: Fun with Formulas !

W.Joho35

Example of „Hamiltonian“ Plots

with F(x,y)=const.

])(exp[])(exp[)()(),( 22

yy

xxyx

nn

L

yG

L

xGySxS

b

y

a

xyxF

You want to construct a nice table for your living room with one

of these shapes?

I give you the corresponding parameters for a modest royalty!

Page 36: Fun with Formulas !

W.Joho36

„real fun“ with formulas !„real fun“ with formulas !

two very famous equations are:

a2 + b2 = c2 Pythagoras (500 BC)

E = mc2 Einstein (1905)

with some easy Algebra we get:

a2 + b2 = E/m Pythagoras–Einstein-Joho (2008)

The Swiss physicist Paul Scherrer gave a beautiful analogy for the famous Einstein equation:

„This energy E (=mc2) is deposited on a blocked bank account“!

(this analogy is mentioned by the author Max Frisch in his

book „Stiller“)

Page 37: Fun with Formulas !

W.Joho37

VariaVaria

Page 38: Fun with Formulas !

W.Joho38

35 eV 35 nmVUV-region

soft X-rays 1.1 keV 1.1 nm

„old fashioned“ 3.5 keV 3.5 Å

„infrared-people“ use wavenumber k in [cm-1]

100 cm-1 100 m

(correlations for arbitrary numbers are then quickly estimated

by multiplication resp. division)

use of magic numbers to memorize the relation

= 1240 eV nm (=hc)

trick => take square root !

photon energy wavelength

Page 39: Fun with Formulas !

W.Joho39

Graphical solution of the lens equation

1 1 1= +

f u v

same graph for resistances in parallel,

capacitances in series etc.!

symmetric case:

u = v = 2f

the lens equation (Newton) solved for a

thin lens with focal length f

Page 40: Fun with Formulas !

W.Joho40

Brightness of Synchrotron Radiation

from Bending Magnet with Field B

Fit with H2(x) = A x2/3 h(x) ,

])(exp[)( N

Lx

xxh

fit of binomial h(x) with 8 data points to ±2%:

A = 2.95 , N = 1.11 , xL = 1.336

,)2

()( 23/2

22

xKxxH

H2 = normalized Brightness

0.001

0.010

0.100

1.000

10.000

0.001 0.01 0.1 1 10x

H2

Page 41: Fun with Formulas !

W.Joho41

exponentials (s=0)Y =exp (-uN) , u = x/xL

0.00.10.20.30.40.50.60.70.80.91.0

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5x

Ycase 9, N=0.5

case 10, N=1

case 11, N=2

case 12, N=6

long range binomials (s<0) Y = (1+uN)1/S , u = x/xL

0.00.10.20.30.40.50.60.70.80.91.0

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5x

Ycase 14, N=1, S= -1

case 15, N=1, S= -0.5

case 16, N=2, S= -2

case 17, N=2, S= -1

long range binomials (s<0) Y = (1+uN)1/S , u = x/xL

0.00.10.20.30.40.50.60.70.80.91.0

0 0.5 1 1.5 2 2.5 3 3.5 4x

Y case 18, N=2, S= -0.5

case 19, N=3, S= -1

case 20, N=7, S= -3

case 21, N=12, S= -2

short range binomials (s>0) Y = (1-uN)1/S , u = x/xL

0.00.1

0.20.3

0.40.50.6

0.70.8

0.91.0

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2X

Y case 5, N=2, S=0.5

case 6, N=2, S=1

case 7, N=2, S=2

case 8, N=4, S=2

short range binomials (s>0) Y = (1-uN)1/S , u = x/xL

0.00.10.20.30.40.50.60.70.80.91.0

0 0.5 1 1.5 2 2.5 3 3.5 4x

Ycase 1, N=0.5, S=1

case 2, N=1, S=0.5

case 3, N=1, S=1

case 4, N=1, S=2

binomials

Page 42: Fun with Formulas !

W.Joho42

Heart MotorHeart Motor

Who is more reliable, your heart or the motor of your car ?

Assumptions:

• a car makes about 200’000 km with an average

speed of 40km/h

=> runs for about 5’000 h or 300’000 min.

• the motor runs at an average of 2’000 cycles/min

=> the motor makes about 0.6 ·109 cycles,

by the way:

during your life you experience some special dates:

after ≈ 11 years and 41 weeks you lived 100’000 h

after ≈ 27 years and 20 weeks you lived 10’000 days

after ≈ 31 years and 36 weeks you lived 109 s

If you live 80 years, your heart has made about

2.5 ·109 heart beats

=> your heart will make about a factor 4 more

cycles

than the motor of a car!!