[MSE] iterated sin using Besselfunction 1st kind
#1
This looks much promising!          
In Nov 21 someone proposed to base the computation of iterated sin() on a matrix of Bessel-functions, diagonalize and get iterated sin() as composition of 
\( a_1 \sin(x) + a_3 \sin(3x)+a_5 \sin(5x) +... \)

See this link to MSE     

Just fiddled a bit with it, using Pari/GP, here some code

Code:
dpow(D,h) = for(k=1,#D,D[k]=D[k]^h); matdiagonal(D)    \\ power of a diagonalmatrix, given only the vector of diagonal entries

MPow(e)=tmpM * dpow(tmpD,e) * tmpW[,1]          \\ note: the diagonalization-matrices are to be recalculated if dimension parameter is changed
                                                                        \\ in the OP in MSE the user needs only column 1 of tmpW

sinit(h,x='x)=my(coeffs); coeffs=2^(h-1)*MPow(h-1);sum(k=1,#coeffs,coeffs[k]*sin((2*k-1)*x))   
                                     \\ for further experiments it may be more sensible to keep the "coeffs" as global to better access them when comparing etc

dim=16
    M=matrix(dim,dim,r,c,besselj(2*r-1,2*c-1));        \\ define Besselmatrix of size dim x dim
    tmpM=mateigen(M);tmpW=tmpM^-1;tmpD=diag(tmpW*M*tmpM)  \\ do diagonalization

\\ some tests

[ w1=sinit(3,1) ; s1=sin(sin(sin(1)));s1 - w1]
%372 =
[    0.678430477361]
[    0.678430477361]
[1.29470815679 E-23]

[x05=sinit(1/2,1);  x1=sinit(1/2,x05) ; s1=sin(1); s1-x1]
%374 =
[    0.908708429656]
[    0.841470984758]
[    0.841470984808]
[5.00517837623 E-11]

\\ ********* Increasing matrixsize ***************
\\ Using dim=32    
\\
\\ ... don't forget to recompute matrices!
\\
[ w1=sinit(3,1) ; s1=sin(sin(sin(1)));s1 - w1]
%378 =
[    0.678430477361]
[    0.678430477361]
[1.75726847276 E-50]

[x05=sinit(1/2,1);  x1=sinit(1/2,x05) ; s1=sin(1); s1-x1]
%380 =
[    0.908708429743]
[    0.841470984808]
[    0.841470984808]
[9.73370904483 E-14]

Looks very good, I think!

Gottfried
Gottfried Helms, Kassel
Reply


Messages In This Thread
[MSE] iterated sin using Besselfunction 1st kind - by Gottfried - 10/30/2022, 12:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  4 hypothesis about iterated functions Shanghai46 11 13,505 04/22/2023, 08:22 PM
Last Post: Shanghai46
  Question about the properties of iterated functions Shanghai46 9 11,736 04/21/2023, 09:07 PM
Last Post: Shanghai46
  Iterated function convergence Daniel 1 4,169 12/18/2022, 01:40 AM
Last Post: JmsNxn
  Uniqueness of fractionally iterated functions Daniel 7 11,294 07/05/2022, 01:21 AM
Last Post: JmsNxn
Question Iterated Hyperbolic Sine and Iterated Natural Logarithm Catullus 2 4,904 06/11/2022, 11:58 AM
Last Post: tommy1729
  [MSE] Help on a special kind of functional equation. MphLee 4 8,476 06/14/2021, 09:52 PM
Last Post: JmsNxn
  Generalized Kneser superfunction trick (the iterated limit definition) MphLee 25 44,452 05/26/2021, 11:55 PM
Last Post: MphLee
  iterated derivation Xorter 0 4,418 06/09/2019, 09:43 PM
Last Post: Xorter
  1st iterated derivatives and the tetration of 0 Xorter 0 5,766 05/12/2018, 12:34 PM
Last Post: Xorter
  Iterated nand Xorter 2 11,813 03/27/2017, 06:51 PM
Last Post: Xorter



Users browsing this thread: 1 Guest(s)