Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. Introduction
Many physical systems are considered as
dynamic systems such as the spring-mass system,
population growth, radioactive decay, a falling object
and quantum mechanical systems like the potential
well. These dynamical systems are often described
using differential equations that describe its behavior
for a short period of time.
Differential equations arise when a continuously
changing quantity and their rates of change are
observed and known. To determine the behavior for
longer periods, it is necessary to integrate these
equations to get the exact solution or it may be
approximated using numerical methods that were
developed to determine solutions with a given
accuracy. Some of these methods are the Euler
Method, the MidPoint Method and the Runge-Kutta
Method.
2. Physics
Dynamical systems in the physical world are
dissipative where if not for some driving force the
motion will cease. This dissipation of motion can be
caused by many factors like friction.
One such dynamical system described by
differential equations is a particle moving in a onedimensional double-well potential with an additional
frictional force that is proportional with its velocity
with an equation of motion given by:
mx&& = x& + ax bx3
(1)
where , a and, b are positive constants. Also given
that /m=0.1, a/m=b/m=1, Equation1 becomes:
&&
x = 0.1x& + x x 3
(2)
Now what is the behavior of a particle inside a
two-well potential? First, let us consider the case for
a particle in a box a representation for a particle
inside a single infinite potential well. In a standard
particle in a box scenario, the particle experiences no
forces in it and thus loses no energy when it hits the
walls (infinite potential), it just reflects back always
at the same speed.
Now the quantum conditions of the particle in a
box gives out three major quantum behaviors: energy
4. Results
The set of initial points that will give the final state
where the point ends up at x = -1 and with v0 as
t is shown in Figure2. These set of points is called
the Basin of Attraction where the point x = -1 is the
attractor.
k2 = hf tn + , yn + 1
2
2
k
h
k3 = hf tn + , yn + 2
2
2
k4 = hf ( tn + h, yn + k3 )
(7)
3. Algorithm
To get the desired set of initial conditions we
first implement the 4th-Order Runge-Kutta method
and the differential equation in two separate
functions. The differential equation in Equation2 is of
the second-order. We must change it into a set of
first-order differential equations in order to make the
4th-Order Runge-Kutta method applicable.
d1 =
d2 =
x[1]
-0.1*x[1] + x[0] - x[0]*x[0]*x[0]
References
[1] http://mathworld.wolfram.com/
[2] http://www.analyzemath.com/
[3] W. Kinzel and G. Reents. Physics by Computer.
Springer. 1998
[4] R. Landau, M. Paez, Computational Physics:
Problem Solving With Computers, Chapter 9, John
Wiley and Sons, Inc., 1997
thist = t[i]
dt = t[i+1] - thist
dt2 = dt/2.0
y0 = yout[i]
k1 = npy.asarray(derivs(y0, thist))
k2 = npy.asarray(derivs(y0 + dt2*k1, thist+dt2))
k3 = npy.asarray(derivs(y0 + dt2*k2, thist+dt2))
k4 = npy.asarray(derivs(y0 + dt*k3, thist+dt))
yout[i+1] = y0 + dt/6.0*(k1 + 2*k2 + 2*k3 + k4)
return yout
t=scipy.arange(0.0,100.0,0.05)
Appendix
Source Code:
import numpy as npy
import scipy, pylab
def derivs6(x,t):
d1 = x[1]
d2 = -0.1*x[1] + x[0] - x[0]*x[0]*x[0]
return (d1,d2)
def rk4(derivs, y0, t):
try: Ny = len(y0)
except TypeError:
yout = npy.zeros( (len(t),), npy.float_)
else:
yout = npy.zeros( (len(t), Ny), npy.float_)
yout[0] = y0
i=0
for i in npy.arange(len(t)-1):
for i in scipy.linspace(-2.5,2.5,30):
for j in scipy.linspace(-2.5,2.5,30):
yout = rk4(derivs6, [i,j], t)
x=yout[0:,0]
y=yout[0:,1]
l=len(x)
if (-1.5 < x[l-1] < -0.5):
if (-0.5 < y[l-1] < 0.5):
pylab.plot(x,y,'go')
pylab.title('Basin of Attraction for
Double-Well Potential as x(infinity)=-1')
pylab.xlabel('initial positions, x(0)')
pylab.ylabel('initial velocities, xdot(0)')
pylab.axis([-2,2,-2,2])
##
else:
##
pylab.plot(x,y,'ro')
##
pylab.axis([-2,2,-2,2])
pylab.show()
the