Post Reply 
(28/48/50) Dual Number Functions
03-22-2024, 04:23 PM (This post was last modified: 03-22-2024 07:50 PM by Albert Chan.)
Post: #13
RE: (28/48/50) Dual Number Functions
It may be simpler to use elliptic parameter m = k^2
Example, here is prove for Legendre's relation using m

https://en.wikipedia.org/wiki/Elliptic_integral Wrote:Complete elliptic integral of the second kind, Derivative and differential equation

[Image: 15238a06fca7d648f6508c288899911523015de6]

[Image: 6408f7f70b7d7032edf048c228c4d44f3a30c659]

With f' = df/dm, m* = 1-m, above differential equations simplified to:

E' = (E-K) / (2 m)
E = -4 m* (m E')' = -2 m* (E-K)'


-E / (2 m*) = E' - K'
K' = (E-K) / (2 m) + E / (2 m*)
2 m m* K' = m* (E-K) + m E = E - m* K = (E-K) + m K
(E-K) = 2 m m* K' - m K = (2 m) (m* K' - K/2)

E' = m* K' - K/2
E = K + 2 m E'


Redo previous post example using m = k^2

lua> D = require'dual'.D
lua> m = D.new(0.5^2, 1)
lua> a, b = 1, (1-m):sqrt()
lua> repeat b0=b[1]; a,b = (a+b):mul(.5), (a*b):sqrt(); until b0==b[1]
lua> unpack(b) -- = AGM(a,b)
0.9318083916224482      -0.29944545531661104

lua> K = pi/2 / b
lua> unpack(K) -- = K( m=0.25+ε )
1.685750354812596        0.5417318486132805

lua> E = D.new(0, (1-m[1])*K[2] - K[1]/2)
lua> E[1] = K[1] + 2*m[1]*E[2]
lua> unpack(E) -- = E( m=0.25+ε )
1.4674622093394272      -0.43657629094633765

Here, we get same numbers by chance, because dm/dk = 2k = 2*0.5 = 1
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (28/48/50) Dual Number Functions - Gil - 02-20-2024, 10:17 AM
RE: (28/48/50) Dual Number Functions - Gil - 02-21-2024, 12:57 AM
RE: (28/48/50) Dual Number Functions - Gil - 02-21-2024, 04:49 AM
RE: (28/48/50) Dual Number Functions - Gil - 02-21-2024, 04:47 PM
RE: (28/48/50) Dual Number Functions - Albert Chan - 03-22-2024 04:23 PM



User(s) browsing this thread: 2 Guest(s)