6.2 Some Functions y = f(x) that are important in Physics

The following simulation shown in Fig.6.3 uses the basic structure of the previous example.

In this simulation some important formulas of physics of the type y = f(x) are shown, whose parameters have been chosen in such a way, that the variable x and the adjustable parameters correspond to simple, physical quantities. In the second column of the following table the well known formulas from physics are given and the formulation in the simulation syntax is given in the second line. Calling the function random(n) creates a random number between 0 and n. A random distribution with maximum deviation that is symmetric to zero is obtained as random(n)-n/2.

In the third column the meaning of the corresponding variable x and the parameters used are given. Gaussian

1 σπ exp x-x0 σ 2
a = standard deviation σ
area normalized to 11/(a*sqrt(pi))*exp(-((x-b)/a)ˆ2) b = symmetry variable

1 σπ exp -x-x0 σ 2 + noise
a = standard deviation σ
with additive noise 1/(a*sqrt(pi))*exp(-((x-b)/a)ˆ2) + b = symmetry variable
random(c/10) - c/20) c10= maximum added

1 σπ exp -x-x0 σ 2 (1+ noise)
a = standard deviation σ
with multiplicative 1/(a*sqrt(pi))*exp(-((x-b)/a)ˆ2) *(1 b = symmetry variable
noise random(c/10) - c/20)) c10= maximum
multiplicative noise

x + x0 p exp -(x + x0)p!
x + x0: expectation value of p
distribution (x+10)p^*exp(-x-10)/faculty(p) p= 1,2,3,

x = ωt angular frequency
modulation a*sin(10*x)*cos(b*x) 10x: carrier frequency
bx:modulating frequency

sin(ω1t + cos(ω2t))
x = ωt angular frequency
modulation a*sin(10*x)*cos(b*x) 5x: carrier frequency
2bx:modulating frequency

sin(ω1t cos(ω2t))
x = ωt angular frequency
modulation a*sin(5*x*cos(b/10*x)) 5x: carrier frequency
b/10 x:modulating frequency

special theory
1 - v c 2
x = β = v/c
of relativity: sqrt(1-xˆ2) v: velocity
length change c: speed of light

special theory
1 1-v c2
x = β = v/c
of relativity: 1/sqrt(1-xˆ2) v: velocity
mass change c: speed of light

2πhc2 λ5 1 e hc λkT -1
x + 2 = wavelength λ in μm
radiation law a*23340/(x+2)ˆ5/(exp(8.958/((x+2)*b))-1)a: scale factor
b: temperature in 103 K

For calculating the factorial p! this file contains some special code; in other simulation files this function cannot be used.

Fig.6.3 shows a normalized Gaussian impulse with additive noise superimposed on it, and its integral, that in spite of the perturbation reaches 1 quite smoothly and accurately. The formula field can be edited, such that functions can be changed or other functions can be filled in.

Figure 6.3: Function plotter for some physically interesting functions y = f(x). The figure shows a normalized Gaussian (definite integral = 1) with superimposed noise and its integral function. Moving the slider p creates a new noise distribution.