(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 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 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)