Introducing Elliptic Functions via Simulations of ...
Transcript of Introducing Elliptic Functions via Simulations of ...
-15 -10 -5 0 5 10 15
-1
-0.5
0
0.5
1
sn(u) cn(u) dn(u)
Introducing Elliptic Functions via Simulations
of Nonlinear Differential Equations
MAA-SE 2018, Clemson University
Dr. R. L. Herman
Mathematics & Statistics, UNC Wilmington
Table of Contents
1. Nonlinear Pendulum
2. Jacobi Elliptic Functions
3. Simulink and ODEs
4. ODE Examples
5. Trig-Elliptic Systems
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 1/23
Nonlinear Pendulum
The Nonlinear Pendulum
m
θL
Figure 1: A point mass m is attached to a string of length L and released from
rest at θ = θ0.
θ + ω2 sin θ = 0. (1)
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 2/23
Nonlinear Pendulum - Quadrature θ + ω2 sin θ = 0
Multiply Equation (1) by θ,
θθ + ω2 sin θθ = 0,
and noted
dt
[1
2θ2 − ω2 cos θ
]= 0.
Therefore,1
2θ2 − ω2 cos θ = c . (2)
Using the initial conditions, θ(0) = θ0, θ(0) = 0, we have
c = −ω2 cos θ0 and
θ2 = 2ω2(cos θ − cos θ0).
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 3/23
Second Order ODE from θ2 = 2ω2(cos θ − cos θ0)
θ2 = 4ω2
(sin2 θ
2− sin2 θ0
2
)Let kx = sin θ
2 , then 2kx =√
1− k2x2 θ. Then,
x2 = ω2(1− x2)(1− k2x2) (3)
Differentiating,
2x x = ω2x[−2x(1− k2x2) + (1− x2)(−2k2x)
],
yields
z = ω2[2k2z3 − (1 + k2)z
](4)
Solution: x(t) = sn (ωt, k). - a Jacobi elliptic function
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 4/23
Jacobi Elliptic Functions
Jacobi Elliptic Functions:
x(t) = sn (t, k), y(t) = cn (t, k) z(t) = dn (t, k).
Solutions of [κ =√
1− k2]
x2 = (1− x2)(1− k2x2), x(0) = 0, x(0) = 1,
y2 = (1− y2)(κ2 + k2y2), y(0) = 1, y(0) = 0,
z2 = (1− z2)(1− κ2), z(0) = 1, z(0) = 0.
E.g., integration gives
dx
dt=√
(1− x2)(1− k2x2),
or
t =
∫ x= sn (t,k)
0
dξ√(1− ξ2)(1− k2ξ2)
.
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 5/23
Elliptic Integrals - Arclength of Ellipse
Recall that ∫ x
0
dξ√1− ξ2
= sin−1 x ≡ u
or
u =
∫ sin u
0
dξ√1− ξ2
.
Similarly,
F (sinφ, k) =
∫ sinφ
0
dξ√(1− ξ2)(1− k2ξ2)
=
∫ φ
0
dθ√1− k2 sin2 θ
, 0 ≤ φ ≤ π
2. (5)
sinφ = sn (u, k), cosφ = cn (u, k),√
1− k2 sin2 θ = dn(u, k).
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 6/23
Jacobi Elliptic Functions vs Trigonometric Functions
Trigonometric Functions
d
dtsin x = cos x ,
d
dtcos x = − sin x .
Initial Value Problem
x = y , x(0) = 0,
y = −x . y(0) = 1.
Jacobi Elliptic Functions
d
dtsn (t) = cn (t) dn (t),
d
dtcn (t) = − sn (t) dn (t),
d
dtdn (t) = −k2 cn (t) sn (t).
Initial Value Problem
x = yz , x(0) = 0,
y = −xz , y(0) = 0,
z = −k2xy , z(0) = 0.
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 7/23
Simulink and ODEs
Simulink
• What is Simulink
• Graphical environment
for designing simulations
• Product of Mathworks
• Select and connect blocks
• Use in Differential Equations
• Project component of class
• Modeling applications
y' y
1-y
y
Logistic Equation
y' = r y (1-y)
1s
Integrator
1
Gain Scope
Product
1
Constant
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 8/23
Solving a Differential Equation
Consider initial value problem:
dx
dt= f (x), x(0) = x0.
Solution
x(t) = x0 +
∫ t
0
f (x(t)) dt.
Think of the solution as
x(t) =
∫x ′(t) dt.
input∫
outputxx′
Figure 2: Schematic for a general system.
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 9/23
Model of a Differential Equation
Modeling
x(t) =
∫x ′(t) dt =
∫f (x(t)) dt.
Schematic
input∫
outputxx′
Simulink Model
f (x)1
s
xx′
OutputIntegrator
Figure 3: Model for solving x ′ = f (x).
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 10/23
Simple First Order Differential Equation
Solve x ′ = −4x , x(0) = 1.
1
s
−4
xx′
ScopeIntegrator
Gain
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 11/23
Simulink Workspace
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 12/23
Scilab’s Xcos Workspace
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 13/23
ODE Examples
First Order Differential Equation - Example 1
Solve x ′ = 2 sin 3t − 4x , x(0) = 0.
1s
Integrator
4
Gain
ScopeSine Wave
Function
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 14/23
First Order Differential Equation - Example 2
Solve y ′ = 2t y + t2, y(1) = 1.
2/t y
dy/dt y
t
1/t 2/ty' = 2/t y+t , y(1)=1
Exact solution: y(t) = t
t2
2
3
1s
Integrator1 Scope1
2
Gain1
1
uMath
Function1
Clock
Product1
u2
Math
Function2
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 15/23
Second Order ODEs - Example 3
Solve ay ′′ + by ′ + cy = 0, y(0) = y0, y′(0) = v0.
y =
∫y ′ dx , y ′ =
∫y ′′ dx ,
y ′′ = −b
ay ′ − c
ay .
y' yy''
b/a y'
c/a y
Second Order Constant Coefficient ODE
1s
Integrator
1s
Integrator1
5
b/a
6
c/a
Scope
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 16/23
Linear Systems of Differential Equations - Example 4
x ′ = ax + by
y ′ = cx + dy .
x
Linear System of Differential Equations
y
y
x
y
x
x'=ax+byy'=cx+dy
1sxo
Integrator
1sxo
Integrator1
Scope
1
x(0)
2
y(0)
0
a
-1
c
0
d
1
b
XY Graph
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 17/23
Trig-Elliptic Systems
Trigonometric Simulink Model
x'=y
y'=-x
x
y
x(0)=0
y(0)=1x' = y
y' = - x
1s
Integrator
1s
Integrator1
Scope
Scope1
-1
Gain
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 18/23
Trigonometric Simulink Model - Results
Time offset: 0 Time offset: 0
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 19/23
Elliptic Function Simulink Model
x'=zy
y'=-zx
x
y
x(0)=0
y(0)=1
x' = yz
y' = - xz
z
z'= -k xy2
-x
z'= -k xy
z
2
y
z(0)=1
1s
Integrator
1s
Integrator1
x Scope
y Scope
-1
Gain
1s
Integrator2 z Scope
0.95
k
u2
Math
Function
Product
Product1
Product2
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 20/23
Elliptic Function Simulink Model - Results
Time offset: 0 Time offset: 0 Time offset: 0
-15 -10 -5 0 5 10 15
-1
-0.5
0
0.5
1
sn(u) cn(u) dn(u)
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 21/23
Conclusion
Nonlinear Pendulum
Jacobi Elliptic Functions
Simulink and ODEs
ODE Examples
Trig-Elliptic Systems
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 22/23
The End!
Thank you! Dr. R.L. Herman, [email protected]
Herman, R. L., Solving Differential Equations Using Simulink ,
http://people.uncw.edu/hermanr/MAT361/Simulink/index.htm
Meyer, K., M., Jacobi Elliptic Functions from a Dynamical Systems
Point of View, Amer. Math. Monthly 108 (2001) p. 729.
Elliptic Functions R. L. Herman MAA-SE, March 24, 2018 23/23