Difference between revisions of "File:Amosmap.jpg"

From TORI
Jump to navigation Jump to search
(Importing image file)
 
 
Line 1: Line 1:
  +
[[Complex map]] of function [[amos]], that determines (for integer values of its argument) the [[amplitude of oscillator function]]s, in more general case can be expressed through function [[Lof]].
Importing image file
 
  +
  +
$\displaystyle
  +
A(n)=\pi^{-1/4} $ $\displaystyle
  +
\exp\left(\frac{1}{2}\mathrm{lof}(n)-\mathrm{lof}(n/2)-\ln(2)\, n/2\big)\right)$
  +
  +
In addition, in vicinity of the real $n$ (and, in particular, for non–negative integer $n$),
  +
[[Lof]]$(n)=$[[Factorial]]$(n)=n!~$, and $A=\mathrm{amos}$
  +
van be expressed also with
  +
  +
$\displaystyle
  +
A(n)=
  +
\frac{|H_n|}{\sqrt{N_n}} $ $= \displaystyle
  +
\frac{\frac{n!}{(n/2)!}}{\sqrt{2^n n! \sqrt{\pi}}} $ $= \displaystyle
  +
\frac{\sqrt{n! / \sqrt{\pi}}}
  +
{2^{n/2} (n/2)! }
  +
$
  +
  +
However, the function $\sqrt{\,}$, that appear in this combination, brings additional (and non–necessary) cut lines, that males difficult the asymptotic analysis; so, for this application, representation through [[Lof]] may be more convenient.
  +
  +
==[[C++]] generator of curves==
  +
  +
//Files [[ado.cin]], [[conto.cin]] and [[fac.cin]] should be loaded in order to compile the code below: <poem><nomathjax><nowiki>
  +
#include <math.h>
  +
#include <stdio.h>
  +
#include <stdlib.h>
  +
#define DB double
  +
#define DO(x,y) for(x=0;x<y;x++)
  +
//using namespace std;
  +
#include <complex>
  +
typedef std::complex<double> z_type;
  +
#define Re(x) x.real()
  +
#define Im(x) x.imag()
  +
#define I z_type(0.,1.)
  +
#include "fac.cin"
  +
//#include "facp.cin"
  +
//#include "afacc.cin"
  +
  +
//z_type Amp(z_type n){ return sqrt(fac(n)/sqrt(M_PI))/( exp((log(2.)/2.)*n)*fac(.5*n));}
  +
z_type Amp(z_type n){ return exp( -.5*log(2.)*n + (.5*lof(n)-lof(.5*n)) )/sqrt(sqrt(M_PI));}
  +
z_type Ama(z_type n){ DB c[22]= {1, -0.125, 0.0078125 , 0.0205078125 ,
  +
-0.0025939941406250, -0.02483749389648438, 0.003335237503051758,
  +
0.07567062973976135, -0.009997612331062555, -0.4298963562468998,
  +
0.05568409210172831, 3.922531476012864, -0.5014786647962097,
  +
-52.47756609951033, 6.657774463390167, 967.8787886035127,
  +
-122.2445554325703, -23538.53880986894, 2964.833600121925,
  +
729848.1121739772,-91766.94357152004,-2.810206798285763e7};
  +
z_type s; int m,M=21; s=c[M]; for(m=M-1;m>0;m--){s/=n; s+= c[m];} return (1.+s/n)*sqrt((sqrt(2.)/M_PI)/sqrt(n));}
  +
  +
#include "conto.cin"
  +
  +
int main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
  +
//for(n=1;n<11;n++) {x=Re(Amp(0.+n)),y=Re(Ama(0.+n)); printf("%2d %20.14lf %20.14lf %20.14lf\n",n,x,y,x-y);}
  +
  +
int M=401,M1=M+1;
  +
int N=401,N1=N+1;
  +
DB X[M1],Y[N1], g[M1*N1],f[M1*N1], w[M1*N1]; // w is working array.
  +
char v[M1*N1]; // v is working array
  +
FILE *o;o=fopen("amosma.eps","w");ado(o,804,804);
  +
fprintf(o,"402 402 translate\n 100 100 scale 2 setlinecap 1 setlinejoin\n");
  +
DO(m,M1)X[m]=-4.+.02*(m-.5);
  +
DO(n,N1)Y[n]=-4.+.02*(n-.5);
  +
for(m=-4;m<5;m++){ M(m,-4)L(m,4) }
  +
for(n=-4;n<5;n++){ M( -4,n)L(4,n)}
  +
fprintf(o,".008 W 0 0 0 RGB S\n");
  +
DO(m,M1)DO(n,N1){g[m*N1+n]=9999; f[m*N1+n]=9999;}
  +
DO(m,M1){x=X[m]; //printf("%5.2f\n",x);
  +
DO(n,N1){y=Y[n]; z=z_type(x,y);
  +
// c=fac(z); // c=lof(z);
  +
c=Amp(z);
  +
//d=Ama(z);
  +
p=Re(c);q=Im(c);
  +
if(p>-9999 && p<9999 && q>-9999 && q<9999 ) {g[m*N1+n]=p;f[m*N1+n]=q;}
  +
//p=abs(c-d)/(abs(c)+abs(d)); p=-log(p)/log(10.); g[m*N1+n]=p;
  +
}}
  +
  +
fprintf(o,"1 setlinejoin 1 setlinecap\n"); p=1.4;q=.8;
  +
for(m=-4;m<4;m++)for(n=1;n<10;n+=1)conto(o,f,w,v,X,Y,M,N,(m+.1*n),-q, q); fprintf(o,".008 W 0 .6 0 RGB S\n");
  +
for(m=0;m<2;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N,-(m+.1*n),-q, q); fprintf(o,".008 W .9 0 0 RGB S\n");
  +
for(m=0;m<2;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N, (m+.1*n),-q, q); fprintf(o,".008 W 0 0 .9 RGB S\n");
  +
for(m=1;m<11;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p); fprintf(o,".02 W .9 0 0 RGB S\n");
  +
for(m=1;m<11;m++) conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".02 W 0 0 .9 RGB S\n");
  +
conto(o,f,w,v,X,Y,M,N, (0. ),-9,9); fprintf(o,".02 W .6 0 .6 RGB S\n");
  +
for(m=-10;m<0;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
  +
m=0; conto(o,g,w,v,X,Y,M,N, (0.+m),-9,9); fprintf(o,".02 W 0 0 0 RGB S\n");
  +
for(m=1;m<11;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
  +
  +
M(-4.1,0) L(-1,0) fprintf(o,".02 W 1 1 1 RGB S\n");
  +
/* // comparison with asymptotics
  +
conto(o,g,w,v,X,Y,M,N, 1,-p,p); fprintf(o,".04 W .5 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, 2,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, 3,-p,p); fprintf(o,".05 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, 4,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, 5,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, 6,-p,p); fprintf(o,".05 W 1 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, 7,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, 8,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N, 9,-p,p); fprintf(o,".05 W 0 .8 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N,10,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N,11,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N,12,-p,p); fprintf(o,".05 W 0 0 1 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N,13,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N,14,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
  +
conto(o,g,w,v,X,Y,M,N,15,-p,p); fprintf(o,".05 W 1 0 1 RGB S\n");
  +
*/
  +
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
  +
system("epstopdf amosma.eps");
  +
system( "open amosma.pdf"); //for LINUX
  +
// getchar(); system("killall Preview");//for mac
  +
}
  +
//</nowiki></nomathjax></poem>
  +
  +
==[[Latex]] generator of labels==
  +
  +
%<poem><nomathjax><nowiki>
  +
\documentclass[12pt]{article}
  +
\usepackage{geometry}
  +
\paperwidth 832pt
  +
\paperheight 828pt
  +
\topmargin -96pt
  +
\oddsidemargin -68pt
  +
\pagestyle{empty}
  +
\usepackage{graphicx}
  +
\usepackage{rotating}
  +
\parindent 0pt
  +
\textwidth 1800px
  +
\textheight 1900px
  +
\newcommand \sx {\scalebox}
  +
\newcommand \rot {\begin{rotate}}
  +
\newcommand \ero {\end{rotate}}
  +
\begin{document}
  +
\begin{picture}(806,804)
  +
\put(20,10){\includegraphics{amosma}}
  +
%\put(20,10){\includegraphics{lofma}}
  +
%\put(20,10){\includegraphics{hermiga6ma}}
  +
%\put(20,10){\includegraphics{hermiten6draft}}
  +
\put(4,804){\sx{2.3}{$y$}}
  +
\put(4,705){\sx{2.2}{$3$}}
  +
\put(4,605){\sx{2.2}{$2$}}
  +
\put(4,505){\sx{2.2}{$1$}}
  +
\put(4,405){\sx{2.2}{$0$}}
  +
\put(-13,305){\sx{2.2}{$-1$}}
  +
\put(-13,206){\sx{2.2}{$-2$}}
  +
\put(-13,106){\sx{2.2}{$-3$}}
  +
\put(-13,6){\sx{2.2}{$-4$}}
  +
%\put( 0,-8){\sx{2}{$-3$}}
  +
\put(3,-8){\sx{2.2}{$-4$}}
  +
\put(102,-8){\sx{2.2}{$-3$}}
  +
\put(202,-8){\sx{2.2}{$-2$}}
  +
\put(302,-8){\sx{2.2}{$-1$}}
  +
\put(419,-8){\sx{2.2}{$0$}}
  +
\put(519,-8){\sx{2.2}{$1$}}
  +
\put(619,-8){\sx{2.2}{$2$}}
  +
\put(719,-8){\sx{2.2}{$3$}}
  +
\put(811,-8){\sx{2.3}{$x$}}
  +
\put(236,408){\sx{2.4}{\bf cut}}
  +
%
  +
\put(500,514){\rot{50}\sx{3}{$v\!=\!0.1$}\ero}
  +
\put(552,404){\rot{0}\sx{3}{$v\!=\!0$}\ero}
  +
\put(494,296){\rot{-51}\sx{3}{$v\!=\!-0.1$}\ero}
  +
%
  +
\put(452,360){\rot{90}\sx{3}{$u\!=\!0.7$}\ero}
  +
\put(531,360){\rot{90}\sx{3}{$u\!=\!0.6$}\ero}
  +
\put(702,360){\rot{90}\sx{3}{$u\!=\!0.5$}\ero}
  +
\end{picture}
  +
\end{document}
  +
%</nowiki></nomathjax></poem>
  +
  +
==References==
  +
<references/>
  +
  +
[[Category:Amos]]
  +
[[Category:Amplitude of oscillator function]]
  +
[[Category:C++]]
  +
[[Category:Complex map]]
  +
[[Category:Factorial]]
  +
[[Category:Latex]]
  +
[[Category:Osdimmaltor function]]

Latest revision as of 08:29, 1 December 2018

Complex map of function amos, that determines (for integer values of its argument) the amplitude of oscillator functions, in more general case can be expressed through function Lof.

$\displaystyle A(n)=\pi^{-1/4} $ $\displaystyle \exp\left(\frac{1}{2}\mathrm{lof}(n)-\mathrm{lof}(n/2)-\ln(2)\, n/2\big)\right)$

In addition, in vicinity of the real $n$ (and, in particular, for non–negative integer $n$), Lof$(n)=$Factorial$(n)=n!~$, and $A=\mathrm{amos}$ van be expressed also with

$\displaystyle A(n)= \frac{|H_n|}{\sqrt{N_n}} $ $= \displaystyle \frac{\frac{n!}{(n/2)!}}{\sqrt{2^n n! \sqrt{\pi}}} $ $= \displaystyle \frac{\sqrt{n! / \sqrt{\pi}}} {2^{n/2} (n/2)! } $

However, the function $\sqrt{\,}$, that appear in this combination, brings additional (and non–necessary) cut lines, that males difficult the asymptotic analysis; so, for this application, representation through Lof may be more convenient.

C++ generator of curves

//Files ado.cin, conto.cin and fac.cin should be loaded in order to compile the code below:


#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#define DB double
#define DO(x,y) for(x=0;x<y;x++)
//using namespace std;
#include <complex>
typedef std::complex<double> z_type;
#define Re(x) x.real()
#define Im(x) x.imag()
#define I z_type(0.,1.)
#include "fac.cin"
//#include "facp.cin"
//#include "afacc.cin"

//z_type Amp(z_type n){ return sqrt(fac(n)/sqrt(M_PI))/( exp((log(2.)/2.)*n)*fac(.5*n));}
z_type Amp(z_type n){ return exp( -.5*log(2.)*n + (.5*lof(n)-lof(.5*n)) )/sqrt(sqrt(M_PI));}
z_type Ama(z_type n){ DB c[22]= {1, -0.125, 0.0078125 , 0.0205078125 ,
-0.0025939941406250, -0.02483749389648438, 0.003335237503051758,
0.07567062973976135, -0.009997612331062555, -0.4298963562468998,
0.05568409210172831, 3.922531476012864, -0.5014786647962097,
-52.47756609951033, 6.657774463390167, 967.8787886035127,
-122.2445554325703, -23538.53880986894, 2964.833600121925,
729848.1121739772,-91766.94357152004,-2.810206798285763e7};
z_type s; int m,M=21; s=c[M]; for(m=M-1;m>0;m--){s/=n; s+= c[m];} return (1.+s/n)*sqrt((sqrt(2.)/M_PI)/sqrt(n));}

#include "conto.cin"

int main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
//for(n=1;n<11;n++) {x=Re(Amp(0.+n)),y=Re(Ama(0.+n)); printf("%2d %20.14lf %20.14lf %20.14lf\n",n,x,y,x-y);}

  int M=401,M1=M+1;
  int N=401,N1=N+1;
DB X[M1],Y[N1], g[M1*N1],f[M1*N1], w[M1*N1]; // w is working array.
char v[M1*N1]; // v is working array
FILE *o;o=fopen("amosma.eps","w");ado(o,804,804);
fprintf(o,"402 402 translate\n 100 100 scale 2 setlinecap 1 setlinejoin\n");
DO(m,M1)X[m]=-4.+.02*(m-.5);
DO(n,N1)Y[n]=-4.+.02*(n-.5);
for(m=-4;m<5;m++){ M(m,-4)L(m,4) }
for(n=-4;n<5;n++){ M( -4,n)L(4,n)}
fprintf(o,".008 W 0 0 0 RGB S\n");
DO(m,M1)DO(n,N1){g[m*N1+n]=9999; f[m*N1+n]=9999;}
DO(m,M1){x=X[m]; //printf("%5.2f\n",x);
DO(n,N1){y=Y[n]; z=z_type(x,y);
// c=fac(z); // c=lof(z);
c=Amp(z);
//d=Ama(z);
       p=Re(c);q=Im(c);
       if(p>-9999 && p<9999 && q>-9999 && q<9999 ) {g[m*N1+n]=p;f[m*N1+n]=q;}
//p=abs(c-d)/(abs(c)+abs(d)); p=-log(p)/log(10.); g[m*N1+n]=p;
                       }}

fprintf(o,"1 setlinejoin 1 setlinecap\n"); p=1.4;q=.8;
for(m=-4;m<4;m++)for(n=1;n<10;n+=1)conto(o,f,w,v,X,Y,M,N,(m+.1*n),-q, q); fprintf(o,".008 W 0 .6 0 RGB S\n");
for(m=0;m<2;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N,-(m+.1*n),-q, q); fprintf(o,".008 W .9 0 0 RGB S\n");
for(m=0;m<2;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N, (m+.1*n),-q, q); fprintf(o,".008 W 0 0 .9 RGB S\n");
for(m=1;m<11;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p); fprintf(o,".02 W .9 0 0 RGB S\n");
for(m=1;m<11;m++) conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".02 W 0 0 .9 RGB S\n");
                 conto(o,f,w,v,X,Y,M,N, (0. ),-9,9); fprintf(o,".02 W .6 0 .6 RGB S\n");
for(m=-10;m<0;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
          m=0; conto(o,g,w,v,X,Y,M,N, (0.+m),-9,9); fprintf(o,".02 W 0 0 0 RGB S\n");
for(m=1;m<11;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");

M(-4.1,0) L(-1,0) fprintf(o,".02 W 1 1 1 RGB S\n");
/* // comparison with asymptotics
 conto(o,g,w,v,X,Y,M,N, 1,-p,p); fprintf(o,".04 W .5 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, 2,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, 3,-p,p); fprintf(o,".05 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, 4,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, 5,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, 6,-p,p); fprintf(o,".05 W 1 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, 7,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, 8,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N, 9,-p,p); fprintf(o,".05 W 0 .8 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N,10,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N,11,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N,12,-p,p); fprintf(o,".05 W 0 0 1 RGB S\n");
 conto(o,g,w,v,X,Y,M,N,13,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N,14,-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
 conto(o,g,w,v,X,Y,M,N,15,-p,p); fprintf(o,".05 W 1 0 1 RGB S\n");
*/
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
       system("epstopdf amosma.eps");
       system( "open amosma.pdf"); //for LINUX
// getchar(); system("killall Preview");//for mac
}
//

Latex generator of labels

%


\documentclass[12pt]{article}
\usepackage{geometry}
\paperwidth 832pt
\paperheight 828pt
\topmargin -96pt
\oddsidemargin -68pt
\pagestyle{empty}
\usepackage{graphicx}
\usepackage{rotating}
\parindent 0pt
\textwidth 1800px
\textheight 1900px
\newcommand \sx {\scalebox}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\begin{document}
\begin{picture}(806,804)
\put(20,10){\includegraphics{amosma}}
%\put(20,10){\includegraphics{lofma}}
%\put(20,10){\includegraphics{hermiga6ma}}
%\put(20,10){\includegraphics{hermiten6draft}}
\put(4,804){\sx{2.3}{$y$}}
\put(4,705){\sx{2.2}{$3$}}
\put(4,605){\sx{2.2}{$2$}}
\put(4,505){\sx{2.2}{$1$}}
\put(4,405){\sx{2.2}{$0$}}
\put(-13,305){\sx{2.2}{$-1$}}
\put(-13,206){\sx{2.2}{$-2$}}
\put(-13,106){\sx{2.2}{$-3$}}
\put(-13,6){\sx{2.2}{$-4$}}
%\put( 0,-8){\sx{2}{$-3$}}
\put(3,-8){\sx{2.2}{$-4$}}
\put(102,-8){\sx{2.2}{$-3$}}
\put(202,-8){\sx{2.2}{$-2$}}
\put(302,-8){\sx{2.2}{$-1$}}
\put(419,-8){\sx{2.2}{$0$}}
\put(519,-8){\sx{2.2}{$1$}}
\put(619,-8){\sx{2.2}{$2$}}
\put(719,-8){\sx{2.2}{$3$}}
\put(811,-8){\sx{2.3}{$x$}}
\put(236,408){\sx{2.4}{\bf cut}}
%
\put(500,514){\rot{50}\sx{3}{$v\!=\!0.1$}\ero}
\put(552,404){\rot{0}\sx{3}{$v\!=\!0$}\ero}
\put(494,296){\rot{-51}\sx{3}{$v\!=\!-0.1$}\ero}
%
\put(452,360){\rot{90}\sx{3}{$u\!=\!0.7$}\ero}
\put(531,360){\rot{90}\sx{3}{$u\!=\!0.6$}\ero}
\put(702,360){\rot{90}\sx{3}{$u\!=\!0.5$}\ero}
\end{picture}
\end{document}
%

References

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current06:10, 1 December 2018Thumbnail for version as of 06:10, 1 December 20181,726 × 1,718 (396 KB)Maintenance script (talk | contribs)Importing image file

The following 2 pages use this file:

Metadata