differential equations 15-mar-2017jordan/chem1000-s17/diffeq.pdf · differential equations 22 2 2...
Post on 09-Feb-2020
2 Views
Preview:
TRANSCRIPT
Differential Equations
2 2 2 2
2 2 2 2
ˆ ˆˆ ˆ ˆ ˆ
ˆˆ ˆ
x y zdr dx dy dzv i j k iv jv kvdt dt dt dtdv d r d x d y d za i j kdt dt dt dt dt
Newton's Laws
Law 1: an object with no force on it does not accelerate
Law 2: A body with a force on it accelerates: F ma
Law 3: Two bodies exert equal but opposite forces on one another
positionvelocityacceleration
rva
3/15/2017
Consider a particle moving in the z direction
zz
dva tdt
1 1
2 2
2 1
1 0 0
2 0 0
10 0
0
:
0
0
t tz
z z
z
t t
z
z
t t
z z
dvv t v dt a t dtdt
dz v tdt
dzz t z dt v t dtdt
v a t dt dt
Example: /00 0, 0 0, t b
z zz v a t a e
Find vz and z as functions of t
/ / /1 0 0 0 00
/0
/ 2 / 2 / 2 2 /0 0 0 0 0 0 0 0 00
0 1
1
0 1 1
t t b t b t t bz z
t bz
t t b t b t t b t b
v t v a e dt a be a b e
v t a b e
z t z a b e dt a bt a b e a bt a b e a b a bt a b e
' ' '
' '' '
Object above the Earth's surface
29.8 / zF mg g m s
Can integrate to get , zv t z t
Homogeneous ordinary linear differential equations with constant coefficients
Ordinary: no partial derivatives
Linear: function and derivatives only to first power
derivatives: 2
2
d ydx
is possible;2dy
dx
is not
Example:2 3
0 1 2 32 3 0dy d y d ya a a adx dx dx
g = gravitational constant
Homogeneous = 0
Hooke's law zF kz km z = 0 = rest
Harmonic oscillator2
2
d zma m kzdt
2
2 0d z k zdt m
assumes Hooke's lawis valid; ignores massof spring
position
Try tz e2
2
0
0
t tke em
k k kim m m
General solution
1 1 2
2
i t i tz c e c e
k vm
ω = angular frequency
1 2 1 2cos sini t i tz c e c e b t b t
Need initial conditions to determine c1, c2 (or, equivalently, b1 and b2)
Suppose: 00 0, 0 zz v v
10 0 0z b
2 2sin cos zdzz b t v b tdt
00 2 20z
vv v b b
0 sinvz t
Uniform harmonic motion
position and velocity are of opposite phase
The classical equations of motion are deterministic
Vibration of a diatomic molecule
m1 m2
reduced mass 1 2
1 2
m mm m
2 ,k
k is the force constant
212
V kx force constant = curvatureat the potential minimum
HF molecule: 1 141.24 10 secx
0
sin t
1 2
So 1410 sec
Energy of harmonic oscillator
2 2 2
2
1 1 12 2 2
1,2
z tot z
z
KE mv E KE PE mv kz
dVF PE V kzdz
potential energy
2
t
time for one oscillation
period
2
2 2 2 200 0
1 1 1cos sin2 2 2
vE mv t k t mv
KE and V vary in time, but their sum is constant
Energy is conserved
all E is PE
all E is KE
in QM, 1 , 0,1,2,2
E h v v
v = 2
v = 1
v = o
Energy can only take on discretevalues and cannot be 0 (uncertainty princ.)
2kk m mm
Comment on classical turning point
Damped harmonic oscillator: a non‐conservative system
add a friction force proportional to velocity fdrF vdt
1 2
2
2
2 2
2
2
1 2
1 2
21 2
0
0
1 4 ,2 2
t
t t
ti t i t m
d z dzm kzdt dt
z em k m k
km m
km m m
c e c e
c e c e e
if motion is inthe z direction
if friction small (underdamped),2
im
exponentiallydecays in time
Non‐conservative means that energy is not conserved: How is that possible? Isn’t energy supposed to be conserved?
e Sin 5
try
This is the sub‐critical damping case
The text treats this case slightly differently
it defines
2 2
/2 /21 2
/21 2
'
2 2
cos sin
i t t m i t t m
t m
km m m
z t c e e c e e
b b e
'
'
't 't
Damped sine/cosine functions
Greater than critical damping
2 4km m
In this case, the trajectory rapidly dies offand does not show oscillatory behavior
Keeps shift in frequencywhile it was ignored above
e . Sin
Critical damping2 4k
m m
1 2
2
2tt m
m
z t ce ce
tz t teActually, there is a second solution
1 2tz t c c t e
similar behavior to greater than criticallydamped oscillator
Consider the harmonic oscillator with an external force
2
2
2
2
d zm kz F tdt
F td z k zdt m m
Strategy for solving such equations
(1) delete inhomogeneous term and solve the DE complementary equation(2) solve inhomogeneous DE(3) general solution is a sum of solutions (1) + (2)
Variation of parameters method to solve inhomogeneous DE
works if inhomogeneous term is tn, eat, cos(bt), sin(ct) or a combination of such terms
INHOMOGENEOUS LINEAR DIFFERENTIAL EQUATIONS:
3 2
3 2 1 03 2
d z d z dzf t f t f t f t z g tdt dt dt
makes it inhomogeneous
forced HO has a term not proportional to unknown function or any of its derivatives
Example:
Trial Solutions
0 1
1 00n n
nt t
At A At A t
e Ae
0 1
sin cos sin ,
cos cos sin ,
n t t nn
t t
t t
t e e A At A t
e t e A t t
e t e A t t
InhomogeneousSystem
TrialSolution
ForbiddenCharacteristic
Root
If the characteristic equation for the complementary DE has a root equalto the forbidden characteristic root, then the trial function won't work
Try multiplying by tk , where k is the multiplicity of the root
Now return to the forced HO with 0 sinF t F t
20
21
sinF td z k zdt m m
20
2
sinF td z k zdt m m
Complementary equation 1 2cos sincz b t b t
Trial function cos sinpz A t B t
Check 02 2 sincos sin cos sin
F tkA t B At tm
B tm
2 cos 0kA A tm
2 0sin sinFkB B t tm m
2
2 0 0
2
0 0
, 0
or
and
k Am
F FkB B Akm m mm
(1)
(2)
General solution:
01 2
2
01 2 2 2
cos sin sin
/cos sin sin
Fz b t b t tkmm
F mz b t b t t
Note: solution diverges at resonance(The divergence would not happen if we also included damping.)
Suppose
1
02 2 2
02 2 2
0 02 22 2
0 0 0
0
0
0 /sin sin
z
z
z
z bFv b
m
v Fbm
v F F mz t tm
when close to one gets "beating"
0 02 2 2 2
0 02 2 2 2
02 2
0 0
0sin sin
1.1
0 1.1 sin sin 1.11.21 1.21
0 1.1 sin sin 1.10.21 0.21
0 1, 1, 1, 0.1
1.52
z
z
z
v F Fz t t tm m
v F Fz t t tm m
v F Fz t t tm m
v m F
z t
Let
set
sin 0.476sin 1.1t t
Separable Differential Equations
f xdy g y dy f x dx
dx g y
g y dy f x dx c The x and y variables are uncoupled
Example:
( ) ,
( ) 0C kt kt
dc kcdt
dc kdtcn c kt C C
c t e e c t c e
constant of integration
0 Cc e
first‐order kinetics chemical reaction
2dc kcdt
for a second‐order reaction
2
1dc kdt kt Cc c
1 1
0kt
c c
10
Cc
0t
t
c(0)
0
00 1c
c tc kt
f k constant
1 1
0 0
1 1 0 0
1 1 0 0 0 1
, ,
, , , ,
cx y
x y
f x y f x y df
f x y f x y M x y dx N x y dy
(x1, y1)
(x0, y0)
Gives algebraic equation that can be solved y in terms of x
Example: 22 0 2 , 2 M Nxydx x dy x xy x
exact
1 1
0 0
1 1
0 0
21 1 0 0 0 1
2 2 2 2 2 20 1 1 0 0 0 1 1 1 0
2 21 1 0 0
, , 2x y
x y
x yx y
f x y f x y xy dx x dy
x y x y x y x y x y x y
x y x y k
Note error in text
2
2/x y ky k x
, , 0M x y dx N x y dy 0f df Mdx Ndy there exists such that
If exact, there exists
Exact differential equations
Inexact differentials and integrating factors
, ,M x y dx N x y dy
we may be able to find an integrating factor G(x,y) to convert this to an exact differential
0GMdx GNdy
0xdy ydx Example: we already know howto solve this by writing
dy dxy x
Even if is an inexact differential equation,
But, for now, we'll "pretend“ we don't know this
0ydx xdy Not exact
2
1x
is an integrating factor for this differential equation
2 2 2 2
2 2
1;
1 1,
M y N xM Nx x x x x
M Ny x x x
'= '
' ' so the integrating
factor works
1 1
0 0
11
0 0
01 1 0 0 2
1
0
1
0 0 0 01 1
1 0 1 1 0 1
0
0
1, ,x y
x y
yx
x y
yf x y f x y dx dyx x
y yx x
y y y yy yx x x x x xyy c k
x xy kx
with the integrating factor
Agrees with our earlier solution
Partial differential equations
Example: vibrations of a stringat equilibrium the stringheight is y = 0 by definition
,y y x t
0x x L
2 2
2 2
2 22
2 2
y T yt x
y yct x
,y x t x t Try
T = tension = mass per unit length
Note: this assumes theproblem is separable
2 22
2 2
2 22
2 2
2 22
2 2 2
1 1
y yct x
ct x
kc t x
dependsonly on t
dependsonly on x
2 22 2 2
2 2
1 2
1 2
cos sin
cos sin
d dk c kdx t
x a kx a kx
t b kct b kct
Boundary conditions
1
0 0, 00, , 0,1, 2,3
, 1, 2,3,4,...
La kL n nnk nL
0n nonvibratingstring
2 sinnn xx aL
a constant
Initial conditions 10 0 0t y b
2 sin
, sin sin
n ctbL
n x n cty x t AL L
n ‐ 1 nodes, not counting end points
2n L 1/2
22 ; ;2 2
n c L nc n TL nc L L
=
n = 1 fundamentaln = 2 first overtone
1
, sin cos sinn nn
n x n ct n ctx t a bL L L
y
Principle of superposition
If string is clamped at both ends, The vibrations are standing waves
If it is not clamped at both ends,we can have traveling waves
, siny x t A k x ct does not separate
time dep. Schrödinger Equation
2 2
22d V x i
m dx t
2 2
2
2 2
2
2
,
1 12
x t x t
V im x t
V im x t
Note typo in text
These two equations are equal to a constant, which we set = E
2 2 2 2
2 22 2d dV E V E
m dx m dx
H E
/
1
iEt
d Edt i
d i E t edt
Also
or
stationary statesystem prepared in one eigen state
2 2
22d V E
m dx
free particle, V = 0particle in boxharmonic oscillator 21
2V kx V =
0 a
0
Solving Differential Equations using Laplace transforms
Example
22 1
2
2 12
1
0
0 0
0
d z dz k kz z z zdt m dt m m m
z s z sz z
z s z z
L L
L L
z(2) and z(1) are short handexpressions for the derivatives
Examples
2 1
12 0 0 0 0
kz z zm m
ks z sz z s z z zm m
L
L L L
z ZLLet
12
12
1
2
0 0 0 0
0 0 0
0 0
ks Z sz z sZ z Zm m
ks s Z s z zm m m
sz z zmZ ks s
m m
Now need to do the inverse Laplace transform of Z
1
2 2
2
0 0
42
z s zmZ
ksm m m
2
2 22
2
4
amk k am m m
2 2 22
120 0z s zZ
s a s aa
1
2 22 2
0 0 0z s a z azs a s a
12 2
12 2
1
cos
sin
0 00 cos sin
at
at
s ts
ts
e f t F s a
z zz t z t t e
a
L
L
L
typo in treatmentin text
Numerical solution of differential equations
In general, there is not an analytical solution,and we have to adopt numerical methods
Euler's Method
0
0 0
, , 0
,t
dx f x t x xdt
x t x f x t dt
but, in general x = x(t),so how do we solve?
1 0t t t is a small time stepwith t0 = 0
0 0 0 00,0 ,0
tx t x f x dt x f x t
0 0 0dxx t x t t tdt
Taylor series
1 ,i i i ix x tf x t
0
1
2
0
2
tt tt t
Generalize x4,t4x3,t3
x2,t2x1,t1
x0,t0
Example
10, 1, 1 , 2 , 0.1final
dc kc c k s t s t sdt
with and
0 10.1 0.90.2 0.810.3 0.729
2.0 0.1215
t c
the exact answer is 0.1353
if we use instead of 0.10, we get 0.05t 2 0.1258c
So, to get a very accurate result, we need a very small time step
One can obtain well‐converged results with reasonable timesteps with methods based on higher order Taylor series
Runge – Kutta Method
1 1 2 3 4
,
1 2 2 26i i
dx f x tdt
x x F F F F
1
2 1
3 2
4 3
,
1 ,2 21 ,2 21 ,2
i i
i i
i i
i i
F tf x t
tF tf x F t
tF tf x F t
F tf x F t t
Fourth‐order method 5O hError
Euler is a first‐order method
2O hError
First step
1 0 0
2 0 1 0
3 0 2 0
4 0 3 0
,
1 ,2 21 ,2 21 ,2
F tf x t
tF tf x F t
tF tf x F t
F tf x F t t
F1 = slope at beginning of intervalF2 = increment using slope at midpoint of intervalF3 = increment using slope at midpoint of intervalF4 = increment using slope at endpoint of intervalh t
Solving by use of Mathematica
Dsolve finds symbolic solution, if possible
Example
, , 1ax
dy ay xdxDsolve y x ay x y x x y x e c
'
Given initial condition 0 2y
, 0 2 , , 2 axDsolve y x ay x y y x x y x e '
Numerical solution: NDSolve
Example 2sindy xdx
These algorithms can be used to solve systems of equations
11 2
21 2
, ,
, ,
dy f x x tdtdx y x x tdt
2sin , 0 1 , , ,0,'s NDSolve y x x y y x Pi
2 / .y s
/ . ,0, .y x s x Pi Plot
0
0
0 2 sin
1 2cos 5
y y x dx
x
top related