\\% Regularized q-exponential and q-trigonometric series of the first kind. \\ Author: Joerg Arndt \\ License: GPL version 3 or later \\ online at http://www.jjj.de/pari/ \\ version: 2012-February-27 (07:44) \\read("eta.gpi"); \\ for Etax() and Etax_plus() \\ ++++++++++++++++++++++++++++++++++++++++ \\ regularized q-exponential, first kind: \\ Note we do not use halved x as in rexp_Q(). rexp_q(q, x, S=-1) = exp_q(q, x, S) * Exp_q(q, x, S); \\ \\ NOTE: in most identities below we write E(q, x) for rexp_q(q, x). \\ \\ abs( E( q, I*x ) ) = 1 (both q and x real) \\ \\ E(+q, -x) = 1 / E(+q, +x) ( cf. exp(-x) = 1/ exp(-x) ) \\ E(-q, +x) = E(q^2, x) / E(q^2, q*x) \\ Product form: \\ rexp_q(q, x) = Etax_plus(q, x) / Etax(q, x) \\ = prod(n>=0, ( 1 + x * q^n ) / ( 1 - x * q^n ) ) \\ \\ Series: \\ E(+q, +x) = \\ = sum(n>=0, prod(k=0, n-1, 1 + q^k) / prod(k=1, n, 1-q^k) * x^n ) \\ = sum(n>=0, prod(k=0, n-1, 1 + q^k) / \\ ( prod(k=1, n, 1-q^k) * prod(k=0, n-1, 1-x*q^k) ) * x^n * q^(n*(n-1)/2) ) \\ Series for the logarithmic derivative: \\ q * deriv(E(q, q), 'q) / ( 2 * E(q, q) ) \\ = -sum(n>=1, n^2 * (-q)^(n^2) ) / sum(n=-inf, +inf, (-q)^(n^2) ) \\ = sum(n>=1, n * q^n / (1-q^(2*n)) ) \\ = sum(n>=1, q^(2*n-1) / (1 - q^(2*n-1))^2 ) [cf. A002131] \\ Multiplicative splitting: \\ E(q, q*x) = (1 - x) / (1 + x) * E(q, x) \\ E(q, I) = I * E(q, I*q) \\ E(q, q^2*x) = ( 1 - x*q ) / ( 1 + x*q ) * E(q, q*x) = \\ = ( (1 - x) * (1 - x*q) ) / ( (1 + x) * (1 + x*q) ) * E(q, x) \\ E(+q^2, +q^2*x) * E(+q, +x) = E(+q, +q*x ) * E(+q^2, +x) \\ \\ The following hold for both of exp_q(q, x) and Exp_q(q, x), \\ thus also for rexp_q(q, x). \\ E(q, x) = prod( s=0, N-1, E(q^N, q^s * x) ) for N>=1 \\ For example, \\ E(q, x) = E(q^2, x) * E(q^2, q * x) \\ E(q, x) = E(q^3, x) * E(q^3, q * x) * E(q^3, q^2 * x) \\ \\ Let W = exp(2*I*Pi/N), then \\ E(q^N, x^N) = prod( s=0, N-1, E(q, W^s * x) ) for N>=1 \\ E(+q, +x) * E(-q, +x) = E(+q^2, +x)^2 \\ E(+I*q, +x) * E(-I*q, +x) = E(-q^2, +x)^2 \\ E(+q, +x) * E(-q, +x) * E(+I*q, +x) * E(-I*q, +x) = E(+q^4, +x)^4 \\ prod(k=0, N-1, E(+w^k*q, +x) ) = E(+q^N, +x)^N \\ for N a power of 2 and w = exp(2*I*Pi/N) \\ Inversion of parameters: \\ E(q, 1/x) = (x+1) / (x-1) * E(q, q/x) \\ E(1/q, x) = E(q, -q*x) \\ E(q, x) = E(1/q, -x/q) \\ E(1/q, x/q) = E(q, -x) \\ E(q, x/q) = (q + x) / (q - x) * E(q, x) \\ Special cases of series expansions: \\ E(+q, +q) = prod(n>=1, (1 + q^n) / (1 - q^n) ) = E2 / E1^2 = \\ = 1 / Theta4(q) [cf. A015128] \\ E(+q, -q) = prod(n>=1, (1 - q^n) / (1 + q^n) ) = E1^2 / E2 = \\ = Theta4(q) [cf. A002448] \\ E(-q, +q) = prod(n>=1 (1 - q^(2*n)) * (1 + q^(2*n-1))^2 ) = \\ = Theta3(q) [cf. A000122] \\ E(-q, -q) = 1 / prod(n>=1 (1 - q^(2*n)) * (1 + q^(2*n-1))^2 ) = \\ = 1 / Theta3(q) [cf. A004402] \\ \\ E(+q^2, +q) = prod(n>=1, (1 + q^(2*n-1))/(1 - q^(2*n-1)) ) = \\ = E2^3 / (E4 * E1^2) = sqrt( Theta3(q) / Theta4(q) ) [cf. A080054] \\ E(+q^2, -q) = prod(n>=1, (1 - q^(2*n-1)) / (1 + q^(2*n-1)) ) [cf. A108494] \\ E(-q^2, +q) = prod(n>=0, (1 + q*(-q^2)^n) / (1 - q*(-q^2)^n) ) [cf. A193863] \\ \\ Functional equations: \\ Let X(q) = E(+q^2, +q), U = X(q), and V = X(q^2), then \\ ( (U^2-1) / (U^2 + 1) )^2 = (V^4 - 1) / (V^4 + 1), \\ U = sqrt(sqrt(V^8 - 1) + V^4), and \\ V = ( (1 + U^4) / (2*U^2) )^(1/4) \\ \\ Functional equations for the inverse: \\ Let X(q) = E(+q^2, -q), U = X(q), and V = X(q^2), then \\ ( (1 - U^2) / (1 + U^2) )^2 = (1 - V^4) / (1 + V^4), \\ U = sqrt( (1 - sqrt(1 - V^8)) / V^4 ), and \\ V = ( 2*U^2 / (1 + U^4) )^(1/4) \\ These are related to functional equations for rtanh_q(), see there. \\ \\ Let X(q) = E(-q^2, -I*q), U = X(q), and V = X(q^2), then \\ ( (1 - U^2) / (1 + U^2) )^2 = I * (1 - V^4) / (2*V^2) \\ E(-q, +q) = E2^5 / ( E1^2 * E4^2 ) = Theta3(q) \\ E(+q, -q) = E1^2 / E2 = Theta4(q) \\ E(-q, -q) = E1^2 * E4^2 / E2^5 = 1 / Theta3(q) \\ E(+q, +q) = E2 / E1^2 = 1 / Theta4(q) \\ \\ E(+q^2, +q) = E2^3 / ( E1^2 * E4 ) \\ E(+q^2, -q) = E1^2 * E4 / E2^3 = 1/E(+q^2, +q) \\ \\ E(+I*q, +I*q) = E2^4 * E8^9 / ( E4^12 * E16^2 ) + 2*I*q* E2^4 * E8^3 * E16^2 / E4^10 \\ E(+I*q, -I*q) = E8^5 / ( E4^2 * E16^2 ) - 2*I*q* E16^2 / E8 \\ Both are mutual inverses, so we obtain \\ 4*q*E1^4*E2^4*E4^2*E8^8 + E1^4*E4^14 - E2^14*E8^4 = 0 [Somos' t8_18_60a] \\ \\ E(+I*q, -I*q) * E(-I*q, +I*q) = Theta3(q^2)^2 = E4^10 / ( E2^4 * E8^4 ) \\ \\ E(-I*q, +I*q) = E8^5 / ( E4^2 * E16^2 ) + 2*I*q* E16^2 / E8 \\ E(-I*q, -I*q) = E2^4 * E8^9 / ( E4^12 * E16^2 ) - 2*I*q* E2^4 * E8^3 * E16^2 / E4^10 \\ \\ E(-q^2, +I*q) = E2^2 * E8^7 / ( E4^7 * E16^2 ) + 2*I*q* E2^2 * E8 * E16^2 / E4^5 \\ E(-q^2, -I*q) = E2^2 * E8^7 / ( E4^7 * E16^2 ) - 2*I*q* E2^2 * E8 * E16^2 / E4^5 \\ Both are mutual inverses, so we obtain \\ 4*q*E1^4*E2^4*E4^2*E8^8 - E2^14*E8^4 + E1^4*E4^14 = 0 [Somos' t8_18_60a] \\ \\ Let A = E(+q, +q) and B = E(-q, -q), then \\ A = E2 / E1^2 \\ B = E1^2 * E4^2 / E2^5 \\ A * B = E4^2 / E2^4 \\ ( A + B ) / 2 = E8^5 / ( E2^4 * E16^2 ) \\ ( A - B ) / 2 = 2*q* E4^2 * E16^2 / ( E2^4 * E8 ) \\ ( A^2 - B^2 ) / 2 = 4*q* E4^2 * E8^4 / E2^8 \\ ( A^2 + B^2 ) / 2 = E4^14 / ( E2^12 * E8^4 ) \\ ( A^4 - B^4 ) / 2 = 8*q* E4^16 / E2^20 \\ We obtain the following identities: \\ ( A + B ) / 2 ==> \\ E2^6*E16^2 - 2*E1^2*E2*E8^5 + E1^4*E4^2*E16^2 = 0 [Somos' t16_8_44] \\ ( A - B ) / 2 ==> \\ E2^6*E8 - 4*q*E1^2*E2*E4^2*E16^2 - E1^4*E4^2*E8 = 0 [Somos' t16_7_20] \\ ( A^2 - B^2 ) / 2 ==> \\ E2^12 - 8*q*E1^4*E2^2*E4^2*E8^4 - E1^8*E4^4 = 0 [Somos' t8_12_24] \\ ( A^2 + B^2 ) / 2 ==> \\ E2^14*E8^4 + E1^8*E2^2*E4^4*E8^4 - 2*E1^4*E4^14 = 0 [Somos' t8_18_60b] \\ ( A^4 - B^4 ) / 2 ==> E2^24 - E1^16*E4^8 - 16*q*E1^8*E4^16 = 0 [Somos' t4_24_48] \\ Let A = E(+q^2, +q) and B = E(+q^2, -q), then \\ A = E2^3 / ( E1^2 * E4 ) \\ B = B = E1^2 * E4 / E2^3 \\ ( A + B ) / 2 = E8^5 / ( E2^2*E4*E16^2 ) \\ ( A - B ) / 2 = 2 * q * E4*E16^2 / ( E2^2*E8 ) \\ We obtain: \\ ( A + B ) / 2 ==> \\ E2^5*E8*E16^2 -2*q*E1^2*E4^2*E16^4 - E1^2*E8^6 = 0 [Somos' t16_8_50] \\ ( A - B ) / 2 ==> \\ E1^2*E4^2*E8*E16^2 + 2*q*E2*E4^2*E16^4 - E2*E8^6 = 0 [Somos' t16_7_50] \\ \\ Let A = E(-q^2, +I*q) and B = E(-q^2, -I*q), then \\ ( A + B ) / 2 = 2*I*q* E2^2 * E8 * E16^2 / E4^5 \\ ( A - B ) / 2 = E2^2 * E8^7 / ( E4^7 * E16^2 ) \\ ( A^2 - B^2 ) = 8*I*q* ( E2 * E8^2 / E4^3 )^4 \\ ( A^2 + B^2 ) / 2 = ( E2 * E8^2 / E4^3 )^4 \\ ( A^4 - B^4 ) = 16*I*q* ( E2 * E8 / E4^2 )^12 \\ Let A = E(+I*q, +I*q) and B = E(-I*q, -I*q), then \\ (A + B)/2 = E2^4 * E8^9 / ( E4^12 * E16^2 ) \\ (A - B)/2 = 2*I*q* E2^4 * E8^3 * E16^2 / E4^10 \\ (A^2 - B^2)/2 = 4*I*q* E2^8 * E8^12 / E4^22 \\ (A^2 + B^2)/2 = E2^12 * E8^8 / E4^22 \\ (A^4 - B^4)/2 = 8*I*q* E2^20 * E8^20 / E4^44 \\ We obtain the following: \\ ( A^2 + B^2 ) / 2 ==> \\ E4^12 - E1^4*E2^2*E4^2*E8^4 - 4*q*E2^4*E8^8 = 0 [Somos' t8_12_48] \\ ( A^4 - B^4 ) / 2 ==> (same) \\ Connection to Theta functions: \\ \\ E(-q^2, +q^2)^2 = (E(-q, +q)^2 + E(+q, -q)^2) / 2 = \\ = Theta3(q^2)^2 = (Theta3(q)^2 + Theta4(q)^2) / 2 \\ and Theta2(q^2)^2 = (E(-q, +q)^2 - E(+q, -q)^2) / 2 \\ \\ E(+q^2, -q^2)^2 = E(+q, -q) * E(-q, +q) \\ = Theta4(q^2)^2 = Theta4(q) * Theta3(q) \\ The following functional equation generalizes this for two parameters: \\ E(+q^2, -q*x)^2 = E(+q, -x) * E(-q, +x) \\ We also have \\ E(+q^2, -q*x)^2 = E(+q, -q*x) * E(-q, -q*x) \\ \\ A similar relation is obtained by replacing q by q^2 and then x by x/q: \\ E(+q^4, -q*x)^2 = E(+q^2, -q*x) * E(-q^2, -q*x) \\ Replacing x by -x gives \\ E(+q^4, +q*x)^2 = E(+q^2, +q*x) * E(-q^2, +q*x) \\ Replacing x by x/q and then q^2 by q gives \\ E(+q^2, -x)^2 = E(+q, -x) * E(-q, -x) \\ Replacing x by q and then q^2 by q gives (or just set x=q in the previous) \\ E(+q^2, -q)^2 = E(+q, -q) * E(-q, -q) \\ \\ The following are also obtained by substitutions: \\ E(-q^2, +q*x)^2 = E(+I*q, -I*x) * E(-I*q, +I*x) \\ E(-q^2, +q*x)^2 = E(+I*q, +q*x) * E(-I*q, +q*x) \\ E(-q^4, +q^x)^2 = E(+I*q^2, -I*x) * E(-I*q^2, +I*x) \\ E(-q^4, -I*q^2*x)^2 = E(+I*q^2, -x) * E(-I*q^2, +x) \\ \\ E(+q^2, +q^2)^2 = E(-q, -q) * E(+q, +q) \\ = 1 / (Theta3(q) * Theta4(q)) = 1 / Theta4(q^2)^2 \\ \\ E(-q^4, +q^4) = (E(-q, +q) + E(+q, -q))/2 = \\ = Theta3(q^4) = (Theta3(q) + Theta4(q))/2 \\ \\ (E(-q, +q) - E(+q, -q)) / 2 = (Theta3(q) - Theta4(q))/2 = Theta2(q^4) \\ \\ For integer N>=1: \\ prod( k=1, N-1, E(+q^N, q^k) ) = Theta4(q^N)/Theta4(q) \\ prod( k=1, N-1, E(+(-q)^N, (-q)^k) ) = \\ = Theta3(q^N)/Theta3(q) for N odd \\ = Theta4(q^N)/Theta3(q) for N even \\ \\ E(+q^3, +q) * E(+q^3, +q^2) = Theta4(q^3)/Theta4(q) = \\ = E2 * E3^2 / E1^2 * E6 cf. A098151 \\ E(-q^3, -q) * E(-q^3, +q^2) = Theta3(q^3)/Theta3(q) = \\ = E1^2 * E4^2 * E6^5 / E2^5 * E3^2 * E12^2 [cf. A132002] \\ E(+q^3, +q) * E(+q^3, +q^2) * E(-q^3, -q) * E(-q^3, +q^2) = \\ = Theta4(q^6)^2/Theta4(q^2)^2 = E4^2 * E6^4 / ( E2^4 * E12^2 ) \\ E(+q^4, +q^1) * E(+q^4, +q^3) = E2^3 / E1^2 * E4 = \\ = prod( gcd(k,N)==1, E(+q^N, +q^k) ) for N a power of 2. \\ \\ E(+q^4, +q^1) * E(+q^4, +q^2) * E(+q^4, +q^3) = \\ = E2 * E4^2 / E1^2 * E8 = E(+q, +q) / E(+q^4, +q^4) \\ E(+q^4, -q^1) * E(+q^4, +q^2) * E(+q^4, -q^3) = \\ = E1^2 * E4^4 / E2^5 * E8 \\ E(+q^5, +q) * E(+q^5, +q^2) * E(+q^5, +q^3) * E(+q^5, +q^4) = \\ = E2 * E5^2 / E1^2 * E10 = E(+q, +q) / E(+q^5, +q^5) \\ E(-q^5, -q) * E(-q^5, +q^2) * E(-q^5, -q^3) * E(-q^5, +q^4) = \\ = E1^2 * E4^2 * E10^5 / E2^5 * E5^2 * E20^2 \\ E(+q^6, +q) * E(+q^6, +q^5) = \\ = E2^3 * E3^2 * E12 / ( E1^2 * E4 * E6^3 ) \\ \\ prod( k=1, 15, gcd(k,15)==1, E(+q^15, +q^k) ) \\ = E2 * E3^2 * E5^2 * E30 / ( E1^2 * E6 * E10 * E15^2 ) \\ prod( k=1, 15, gcd(k,15)!=1, E(+q^15, +q^k) ) \\ = E6 * E10 * E15^2 / ( E3^2 * E5^2 * E30 ) \\ Some eta product identities: \\ \\ real( E(-q^2, +I*q)^2 ) = E2^8 * E8^4 / E4^12 = real( E(-q^2, -I*q)^2 ) \\ imag( E(-q^2, +I*q)^2 ) = 4 * q * E2^4 * E8^8 / E4^12 = imag( E(-q^2, -I*q)^2 ) \\ real( E(-q^2, +I*q)^2 )^2 + imag( E(-q^2, +I*q)^2 )^2 = 1 \\ ==> (E2^8 * E8^4 / E4^12)^2 + 16 * q^2 * (E2^4 * E8^8 / E4^12)^2 = 1 \\ ==> (E1^8 * E4^4 / E2^12)^2 + 16 * q * (E1^4 * E4^8 / E2^12)^2 = 1 \\ ==> 16*q*(E1 * E4^2)^8 + (E1^2 * E4)^8 - E2^24 = 0 [Somos' t4_24_48] \\ \\ Let F = E(-q^6, +I*q^3) * E(-q^2, +I*q) then \\ real(F)^2 = E2^4 * E6^4 * E8^2 * E24^2 / (E4^6 * E12^6) \\ imag(F)^2 = 4*q^2 * E2^2 * E6^2 * E8^4 * E24^4 / (E4^6 * E12^6) \\ ==> \\ E2^4*E6^4*E8^2*E24^2 / (E4^6*E12^6) + 4*q^2*E2^2*E6^2*E8^4*E24^4 / (E4^6*E12^6) = 1 \\ (E1^2*E3^2*E4*E12)^2 +4*q*(E1*E3*E4^2*E12^2)^2 -(E2^3*E6^3)^2 = 0 [Somos' t12_12_48b] \\ \\ Let F = ( E(-q^6, +I*q^3) / E(-q^2, +I*q) )^(1/2) then \\ real(F)^2 = E2 * E6^5 * E8^5 * E24 / ( E4^6 * E12^6 ) \\ imag(F)^2 = q^2 * E2^5 * E6 * E8 * E24^5 / ( E4^6 * E12^6 ) \\ ==> E2*E6^5*E8^5*E24 / ( E4^6*E12^6 ) + q^2*E2^5*E6*E8*E24^5 / ( E4^6*E12^6 ) = 1 \\ ==> q*E1^5*E3*E4*E12^5 - E2^6*E6^6 + E1*E3^5*E4^5*E12 = 0 [Somos' t12_12_48a] \\ \\ Let F = ( E(-q^10, -I*q^5) / E(-q^2, -I*q) )^(1/2) then \\ real(F)^2 = E2 * E8^3 * E10^3 * E40 / ( E4^4 * E20^4 ) \\ imag(F)^2 = q^2 * E2^3 * E8 * E10 * E40^3 / ( E4^4 * E20^4 ) \\ Using real(F)^2 + imag(F)^2 we obtain \\ q*E1^3*E4*E5*E20^3 + E1*E4^3*E5^3*E20 - E2^4*E10^4 = 0 [Somos' t20_8_48] \\ \\ Let F = ( E(-q^14, -I*q^7) / E(-q^2, -I*q) )^(1/2) then \\ imag(F)^2 = q^2 * E2^3 * E8^3 * E14^3 * E56^3 / ( E4^6 * E28^6 ) \\ There is no such form for real(F), so we need the following. \\ Let A = E(-q^2, -I*q), define \\ ar = real(A) = E2^2 * E8^7 / ( E4^7 * E16^2 ), \\ ai = imag(A) = -2*q * E2^2 * E8 * E16^2 / E4^5 \\ Let B = E(-q^14, -2*I*q^7) ( = A(q^7) ), define \\ br = real(B) = E14^2 * E56^7 / ( E28^7 * E112^2 ), \\ bi = imag(B) = -2*q^7 * E14^2 * E56 * E112^2 / E28^5 \\ Let B/A = x + I*y, F = sqrt(B/A) = sqrt((1+sr)/2) + I*sqrt((1-sr)/2) where \\ sr= (br*ar + ai*bi). \\ Using imag(sqrt(B/A)) = sqrt((1 - sr)/2) we obtain \\ 4*q^4*E1^2*E2^2*E4*E7^2*E8^4*E14^2*E28*E56^4 + \\ + 2*q*E1^3*E2*E4^3*E7^3*E8^2*E14*E28^3*E56^2 + \\ + E1^2*E4^7*E7^2*E28^7 - E2^7*E8^2*E14^7*E56^2 = 0 [Somos' q56_18_240a] \\ ++++++++++++++++++++++++++++++++++++++++ \\ regularized q-cosine and q-sine, first kind: rcos_q(q, x, S=-1) = { ( rexp_q(q, +I*x, S) + rexp_q(q, -I*x, S) ) / 2; } \\ rcos_q(q, +x) = rcos_q(q, -x) rsin_q(q, x, S=-1) = { ( rexp_q(q, +I*x, S) - rexp_q(q, -I*x, S) ) / (2*I); } \\ rsin_q(q, +x) = - rsin_q(q, -x) \\ rcos_q(q, x)^2 + rsin_q(q, x)^2 = 1 \\ rcos_q(-q^2, -q) = E2^2 * E8^7 / ( E4^7 * E16^2 ) \\ rsin_q(-q^2, +q) = 2*q * E2^2 * E8 * E16^2 / E4^5 \\ Via sin^2 + cos^2 = 1 we obtain \\ ==> ( E2^2*E8^7 / ( E4^7*E16^2 ) )^2 + ( 2*q*E2^2* E8*E16^2 / E4^5 )^2 = 1 \\ ==> E1^4*E4^14 + 4*q*E1^4*E2^4*E4^2*E8^8 - E2^14*E8^4 = 0 [Somos' t8_18_60a] \\ \\ rcos_q(+q^2, +I*q) = E8^5 / ( E2^2 * E4 * E16^2 ) \\ rcos_q(+q^2, +I*q) = 2*I*q* E4 * E16^2 / ( E2^2 * E8 ) \\ Via sin^2 + cos^2 = 1 we obtain \\ ==> E4^12 - E1^4*E2^2*E4^2*E8^4 - 4*q*E2^4*E8^8 = 0 [Somos' t8_12_24] \\ rcos_q(-q^2, +q) * rsin_q(-q^2, +q) = 2*q* ( E2 * E8^2 / E4^3 )^4 \\ rcos_q(+q^2, +I*q) * rsin_q(+q^2, +I*q) = 2*I*q* ( E8 / E2 )^4 \\ rcos_q(-q^2, +q) * rsin_q(+q^2, +I*q) = 2*I*q* ( E8 / E4 )^6 \\ rcos_q(-q^2, +q) * rcos_q(+q^2, +I*q) = ( E8^3 / ( E4^2 * E16 ) )^4 \\ rsin_q(-q^2, +q) * rcos_q(+q^2, +I*q) = 2*q* ( E8 / E4 )^6 \\ rsin_q(-q^2, +q) * rsin_q(+q^2, +I*q) = 4*I*q^2* ( E16 / E4 )^4 \\ Functional equations: \\ \\ Let A(q) = sqrt( (2*q) / (rcos_q(-q^2, +q) * rsin_q(-q^2, +q)) ), then \\ A(q) = E4^6 / ( E2^2 * E8^4 ) and \\ A(q) = sqrt(A(q^2) + 4*q^2 / A(q^2)) [cf. A029839] \\ \\ Let B(q) = A(q)^2 = (2*q) / (rcos_q(-q^2, +q) * rsin_q(-q^2, +q)), then \\ B(q) = E4^12 / ( E2^4 * E8^8 ) and \\ B(q) = ( sqrt(B(q^2)) + 4*q^2/sqrt(B(q^2)) ) \\ \\ Let C(q) = B(sqrt(q)) = E2^12 / ( E1^4 * E4^8 ), then \\ C(q) = ( sqrt(C(q^2)) + 4*q/sqrt(C(q^2)) ) [cf. A029841] \\ \\ Let D(q) = sqrt(C(q)) = E2^6 / ( E1^2 * E4^4 ) , then \\ D(q) = sqrt( D(q^2) + 4*q/D(q^2) ) [cf. A029839] \\ \\ Let F(q) = sqrt(D(q)) = E2^3 / ( E1 * E4^2 ), then \\ F(q) = ( F(q^2)^2 + 4*q/F(q^2)^2 )^(1/4) [cf. A029838] \\ Let C = rcos_q(+q^2, +I*q) and S = rsin_q(+q^2, +I*q), then \\ (C^2 - S^2) = (C^4 - S^4) = ( E4^3 / ( E2^2 * E8 ) )^4 \\ Let C = rcos_q(-q^2, +q) and S = rsin_q(-q^2, +q), then \\ (C^2 - S^2) = (C^4 - S^4) = ( ( E2^2 * E8 ) / E4^3 )^4 \\ ++++++++++++++++++++++++++++++++++++++++ \\ regularized q-tangent and q-cotangent, first kind: rtan_q(q, x, S=-1)={ rsin_q(q, x, S) / rcos_q(q, x, S); } rcot_q(q, x, S=-1)={ rcos_q(q, x, S) / rsin_q(q, x, S); } \\ rcos_q(q, x) = ( 1 - tan_q(q, x)^2 ) / ( 1 + tan_q(q, x)^2 ) \\ rsin_q(q, x) = ( 2 * tan_q(q, x) ) / ( 1 + tan_q(q, x)^2 ) \\ rtan_q(-(c*q)^2, +(c*q)) = c * rtan_q(-q^2, +q) \\ for c \in {+1, -1, +I, -I}. \\ \\ Let T = rtan_q(-q^2, +q), then \\ T = +2*q* ( E4 * E16^2 / E8^3 )^2 = sqrt(ellk(q^4)) \\ (1 - T) = E1^2 * E4^2 * E16^2 / ( E2 * E8^5 ) \\ (1 + T) = ( E2^5 * E16^2 / ( E1^2 * E8^5 ) ) \\ T / (1 - T^2) = 2*q * ( E8 / E2 )^4 \\ = 1/I * rcos_q(+q^2, +I*q) * rsin_q(+q^2, +I*q) \\ = rcosh_q(+q^2, +q) * rsinh_q(+q^2, +q) \\ (1 - T^2) = E2^4 * E4^2 * E16^4 / ( E8^10 ) \\ (1 + T^2) = E4^14 * E16^4 / ( E2^4 * E8^14 ) \\ (1 - T^4) = ( E4^2 * E16 / E8^3 )^8 = ellkprime(q^4)^2 \\ (1 - T) / (1 + T) = ( E1^2 * E4 / E2^3 )^2 = sqrt(ellkprime(q)) \\ (1 - T^2) / (1 + T^2) = ( E2^2 * E8 / E4^3 )^4 = ellkprime(q^2) \\ T^2 / (1 - T^4) = +4*q^2* ( E8 / E4 )^12 \\ T^4 / (1 - T^4) = +16*q^4* ( E16 / E4 )^8 \\ T^8 / (1 - T^4) = +256*q^8* ( E16 / E8 )^24 \\ \\ Let T = rtan_q(+q^2, +I*q), then \\ T = +2*I*q* ( E4 * E16^2 / E8^3 )^2 = +I* sqrt(ellk(q^4)) \\ (1 - T^2) = E4^14 * E16^4 / ( E2^4 * E8^14 ) \\ (1 + T^2) = E2^4 * E4^2 * E16^4 / ( E8^10 ) \\ (1 - T^4) = ( E4^2 * E16 / E8^3 )^8 = ellkprime(q^4)^2 \\ T * (1 - T^2) = +2*I*q* E4^16 * E16^8 / ( E2^4 * E8^20 ) \\ T / (1 - T^2) = +2*I*q* ( E2 * E8^2 / E4^3 )^4 = +I/2 * ellk(q^2) \\ T / (1 - T^2)^2 = +2*I*q* E2^8 * E8^22 / ( E4^26 * E16^4 ) \\ (1 - T) / (1 + T) = (E2^4 - 4*I*q * E8^4) * ( E2 * E8 / E4^3 )^4 \\ (1 - T^2) / (1 + T^2) = ( E4^3 / ( E2^2 * E8 ) )^4 = 1 / ellkprime(q^2) \\ T^2 / (1 - T^4) = -4*q^2* ( E8 / E4 )^12 \\ T^4 / (1 - T^4) = +16*q^4* ( E16 / E4 )^8 \\ T^8 / (1 - T^4) = +256*q^8* ( E16 / E8 )^24 \\ \\ Let T2 = rtan_q(-q^4, +q^2), then \\ (1 + T2^2) / (1 - T2^2) = ( E8^3 / (E4^2 * E16) )^4 = 1/ellkprime(q^4) \\ Let T4 = rtan_q(-q^8, +q^4), then \\ ( (1 + T4) / (1 - T4) )^2 = \\ = rcos_q(-q^2, +q) * rcos_q(+q^2, +I*q) = ( E8^3 / ( E4^2 * E16 ) )^4 \\ = 1 / ellkprime(q^4) (again) \\ So (1 + T2^2) / (1 - T2^2) = ((1 + T4)/(1 - T4))^2 \\ Solving gives T4 = ( 1 - sqrt( 1 - T2^4 )) / T2^2 \\ ( and T2 = sqrt( 2 * T4 / (1 + T4^2) ) ). \\ That is F(q^2) = ( 1 - sqrt( 1 - F(q)^4 ) ) / F(q)^2 and \\ F(q) = sqrt( 2 * F(q^2) / (1 + F(q^2)^2) ) \\ where F(q) = rtan_q(-q^2, +q) = sqrt(ellk(q^4)). \\ Expressed in eta products, the relation is \\ 4*q*E1^4*E2^4*E4^2*E8^8 - E2^14*E8^4 + E1^4*E4^14 = 0 [Somos' t8_18_60a] \\ \\ Certain AGM-style relations can be obtained: \\ Let V(q) = rtan_q(-q^2, +q)^2 / (4*q^2) then \\ V(q) = sqrt(V(q^2)) / (1 + 4 * q^4 * V(q^2) ) [cf. A001938] \\ Let W(q) = rtan_q(+q^2, +I*q) /(2*I*q), then \\ W(q) = sqrt( (W(-q^2)) / (1 + 4 * q^4 * W(-q^2)^2 ) ) [cf. A079006] \\ ++++++++++++++++++++++++++++++++++++++++ \\ regularized hyperbolic q-cosine, q-sine, q-tangent, first kind: rcosh_q(q, x, S=-1)={ ( rexp_q(q, +x, S) + rexp_q(q, -x, S) ) / 2; } rsinh_q(q, x, S=-1)={ ( rexp_q(q, +x, S) - rexp_q(q, -x, S) ) / 2; } \\ rcosh_q(q, x)^2 - rsinh_q(q, x)^2 = 1 rtanh_q(q, x, S=-1)={ rsinh_q(q, x, S) / rcosh_q(q, x, S); } rcoth_q(q, x, S=-1)={ rcosh_q(q, x, S) / rsinh_q(q, x, S); } \\ rtanh_q(q, x) + rtanh_q(q, -x) = 0 \\ By definition: \\ rtanh_q(q, x) = ( E(q, +x)^2 - 1 ) / ( E(q, +x)^2 + 1 ) = \\ = ( 1 - E(q, -x)^2 ) / ( 1 + E(q, -x)^2 ) \\ Relations between rtan_q() and rtanh_q(): \\ rtan_q(q, x) = -I * rtanh_q(q, I*x) \\ rtanh_q(q, x) = -I * rtan_q(q, I*x) \\ \\ rtanh_q(+q^2, +q) = rtan_q(-q^2, +q) \\ rtanh_q(+q^2, +q) = 2*q* ( E4 * E16^2 / E8^3 )^2 = sqrt(ellk(q^4)) \\ rtanh_q(-q^2, +I*q) = 2*I*q* ( E4 * E16^2 / E8^3 )^2 = I * sqrt(ellk(q^4)) \\ Functional equations: \\ Let T(q) = rtanh_q(+q^2, +q), then we have \\ T(q^2) = ( 1 - sqrt(1 - T(q)^4) ) / T(q)^2 \\ T(q) = sqrt( 2 * T(q^2) / ( 1 + T(q^2)^2 ) ) \\ \\ With X(q) = E(+q^2, +q), U = X(q), V = X(q^2), we have \\ T(q) = ( (U^2 - 1) / (U^2 + 1) ) \\ T(q^2) = ( (V^2 - 1) / (V^2 + 1) ) \\ and (the functional equation for E(+q^2, +q)) \\ ( (U^2 - 1) / (U^2 + 1) )^2 = (V^4 - 1) / (V^4 + 1) \\ The form for X(q) = E(+q^2, -q) (the inverse) is \\ ( (1 - U^2) / (1 + U^2) )^2 = (1 - V^4) / (1 + V^4) \\ ==== end of file ====