File:SuZex0map48small.png

From TORI
Jump to navigation Jump to search

Original file(1,230 × 1,230 pixels, file size: 734 KB, MIME type: image/png)

Complex map of the truncated Taylor expansion of function SuZex at zero; polynomial $P_{48}$ is plotted, $u\!+\!\mathrm i v= P_{48}(x\!+\!\mathrm i y)$;

$\displaystyle \mathrm{SuZex}(z) \approx P_{48}(z)=\sum_{n=0}^{48} \,c_n\, z^n$

Coefficients $c$ are calculated with Mathematica, from the asymptotic expansion at large $-z$, condition $~\mathrm{SuZex}(0)\!=\!1~$ and the transfer equation $\mathrm{SuZex}(z\!+\!1)=\mathrm{zex}\Big(\mathrm{SuZex}(z)\Big)$ are used;
zex$(z)= z\exp(z)$.

Formally, function SuZex is entire, and the Taylor series converges at any $z$; the range of approximation increase increasing number of terms taken into account. Practically, due to the fast growth of SuZex, the expansion can be used only while $|z|\!<\!2$. This is sufficient for the evaluation of the function along the real axis. For other values of $z$, other approximations are more efficient.

Generator of curves

#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 complex<double> z_type;
#define Re(x) x.real()
#define Im(x) x.imag()
#define I z_type(0.,1.)
#include "conto.cin"
//#include "fsexp.cin"
//#include "fslog.cin"
// SuZex.cin below is the C++ implementation of function SuZex
// which is superfunction for the transfer function T(z)=zex(z)= x exp(z)
// Copyleft 2012 by Dmitrii Kouznetsov; I hope, files  
// SuZexCoef20.cin, SuZexTay2008co.cin, SuZexTay0co.cin
// are already loaded to the working directory
z_type zex(z_type z) { return z*exp(z);}
z_type suzexo(z_type z){ int n,m; z_type L=log(-z); z_type c[20]; z_type s;
#include "SuZexCoef20.cin"
c[0]=-1.; c[1]=.5*L;
for(n=2;n<21;n++){ s=a[n][n]; 
                   for(m=n-1; m>=0; m--){ s*=L; s+=a[n][m]; }
                   c[n]=s; }
s=c[20]/z; for(n=19;n>=0;n--){ s+=c[n]; s/=z;}
return s;
}
 z_type suzex2008t12(z_type z){ int n,m=80; z_type s;
 #include "SuZexTay2008co.cin"
 s=c[m]; for(n=m-1;n>=0;n--){ s*=z; s+=c[n];}
 return s;}
// z_type SuZexTay0(z_type z){ int n,m=96; z_type s;
 z_type SuZexTay0(z_type z){ int n,m=48; z_type s;
 #include "SuZexTay0co.cin"
 s=SuZexTay0co[m]; for(n=m-1;n>=0;n--){ s*=z; s+=SuZexTay0co[n];}
 return s;}
z_type suzex(z_type z){int m,n; z_type s;
if( abs(z) < 1.6 )                   return SuZexTay0(z) ; // I made the Taylor expansion for this case
if( Re(z)>0 && fabs(Im(z))<1.5){n=int(Re(z)+.5); s=SuZexTay0(z-(0.+n)); DO(m,n) s=zex(s); return s;}
 z+=-1.1259817765745026;     // WARNING! ARGUEMENT CHANGES ITS VALUE!
if( abs(z+12.) < 8.1 )               return suzex2008t12(z+12.) ; // I made the Taylor expansion for this case
if( Re(z)<-12. || fabs(Im(z)) > 8. ) return suzexo(z); // definitely, |z|>8
n= int(Re(z)+12.); s=suzex2008t12(z+12.-(0.+n)); DO(m,n) s=zex(s); return s;
} 

// Copyleft 2012 by Dmitrii Kouznetsov
//
//
//The procedures above can be loaded also as SuZex.cin
// #include "SuZex.cin"
main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d, cu,cd;
//DB x1=-1.1259817765745026; DO(n,8){ y=Re(suzex(x1)); x=y-1.; x1+=-1.2*x; printf("%18.16f %18.16f\n", x1,y);} getchar();
int M=560,M1=M+1;
int N=560,N1=N+1;
DB X[M1],Y[N1];
DB *g, *f, *w; // w is working array.
g=(DB *)malloc((size_t)((M1*N1)*sizeof(DB)));
f=(DB *)malloc((size_t)((M1*N1)*sizeof(DB)));
w=(DB *)malloc((size_t)((M1*N1)*sizeof(DB)));
char v[M1*N1]; // v is working array
FILE *o;o=fopen("SuZexTay0map48small.eps","w");  ado(o,602,602);
fprintf(o,"301 301 translate\n 100 100 scale\n");
fprintf(o,"1 setlinejoin 2 setlinecap\n");
DO(m,M1) X[m]=-2.8+.01*(m-.5);
DO(n,N1) Y[n]=-2.8+.01*(n-.5); 
//for(n=0;n<N1;n++) { Y[n]=1.09*sinh((3./200.)*(n-200)); printf("%3d %9.6f\n",n,Y[n]); }
for(m=-3;m<4;m++){M(m,-3) L(m,3)  }
for(n=-3;n<4;n++){M(  -3,n) L(3,n)}
 fprintf(o,".006 W 0 0 0 RGB S\n");
DO(m,M1)DO(n,N1){      g[m*N1+n]=999;
                       f[m*N1+n]=999;}
DO(m,M1){x=X[m]; if(m/10*10==m) printf("x=%6.3f\n",x);
DO(n,N1){y=Y[n]; z=z_type(x,y); //if(abs(z+2.)>.019)
//c=suzex(z);
c=SuZexTay0(z);
////c=suzex2008t12(z+(12.-1.1259817765745026));
// c=suzexo(z-1.1259817765745026);
// d=zex(suzex2008(z-1.));
//d =suzexo(z);
//d=zex(suzexo(z-1.));
// p=abs(c-d)/(abs(c)+abs(d)); p=-log(p)/log(10.); if(p>0 && p<17) g[m*N1+n]=p;
 p=Re(c); q=Im(c); if(p>-19 && p<19 && ( x<2. ||  fabs(q)>1.e-12 && fabs(p)>1.e-12) ){ g[m*N1+n]=p;f[m*N1+n]=q;}
       }}
fprintf(o,"1 setlinejoin 1 setlinecap\n");

p=.8;q=.16;

/*

 conto(o,g,w,v,X,Y,M,N, (1.  ),-p,p); fprintf(o,".02 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,".04 W 0 1 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,".04 W 0 1 1 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,".04 W 0 0 1 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,".04 W 1 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.  ),-3,3); fprintf(o,".04 W 0 .4 0 RGB S\n");
  • /
for(m=-8;m<8;m++)for(n=1;n<10;n+=1)conto(o,f,w,v,X,Y,M,N,(m+.1*n),-q,q);fprintf(o,".007 W 0 .6 0 RGB S\n");
for(m=0;m<8;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N,-(m+.1*n),-q,q);fprintf(o,".007 W .9 0 0 RGB S\n");
for(m=0;m<8;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N, (m+.1*n),-q,q);fprintf(o,".007 W 0 0 .9 RGB S\n");
for(m= 1;m<17;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p);fprintf(o,".02 W .8 0 0 RGB S\n");
for(m= 1;m<17;m++) conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p);fprintf(o,".02 W 0 0 .8 RGB S\n");
               conto(o,f,w,v,X,Y,M,N, (0.  ),-2*p,2*p); fprintf(o,".02 W .5 0 .5 RGB S\n");
for(m=-16;m<17;m++)conto(o,g,w,v,X,Y,M,N,(0.+m),-p,p);fprintf(o,".02 W 0 0 0 RGB S\n");

// fprintf(o,"-12 0 8 10 350 arc 1 .3 0 RGB .06 W S\n");

//#include "plofu.cin"
//  fprintf(o,"0 setlinejoin 0 setlinecap\n");
fprintf(o,"showpage\n");
fprintf(o,"%c%cTrailer\n",'%','%');
fclose(o);  free(f); free(g); free(w);
      system("epstopdf SuZexTay0map48small.eps"); 
      system(    "open SuZexTay0map48small.pdf"); //for macintosh
      getchar(); system("killall Preview"); // For macintosh
}

Latex generator of labels

% %<br> \documentclass[12pt]{article} % <br> \paperwidth 590px % <br> \paperheight 590px % <br> \textwidth 2394px % <br> \textheight 2300px % <br> \topmargin -110px % <br> \oddsidemargin -78px % <br> \usepackage{graphics} % <br> \usepackage{rotating} % <br> \newcommand \sx {\scalebox} % <br> \newcommand \rot {\begin{rotate}} % <br> \newcommand \ero {\end{rotate}} % <br> \newcommand \ing {\includegraphics} % <br> \newcommand \rmi {\mathrm{i}} % <br> \parindent 0pt \pagestyle{empty} \begin{document} % <br> \newcommand \zoomax { % <br> \put(20,580){\sx{3}{$y$}} % <br> \put(20,490){\sx{3}{$2$}} % <br> \put(20,390){\sx{3}{$1$}} % <br> \put(20,290){\sx{3}{$0$}} % <br> \put(-1,190){\sx{3}{$-\!1$}} % <br> \put(-1, 90){\sx{3}{$-\!2$}} % <br> \put(76, 20){\sx{3}{$-\!2$}} % <br> \put(176, 20){\sx{3}{$-\!1$}} % <br> \put(294, 20){\sx{3}{$0$}} % <br> \put(395, 20){\sx{3}{$1$}} % <br> \put(495, 20){\sx{3}{$2$}} % <br> \put(575, 22){\sx{3}{$x$}} % <br> } % <br> \parindent 0pt % <br> \sx{1}{\begin{picture}(600,600) % <br> %\put(40,20){\ing{b271tMap3}} % <br> %\put(40,20){\ing{ExpMap}} % <br> \put(0,0){\ing{SuZexTay0map48small}} % <br> \zoomax % <br> \put(160,406){\sx{2.4}{\rot{38}$u\!=\!0.4$\ero}} % <br> \put(198,373){\sx{2.4}{\rot{42}$u\!=\!0.5$\ero}} % <br> \put(227,350){\sx{2.4}{\rot{46}$u\!=\!0.6$\ero}} % <br> \put(249,331){\sx{2.4}{\rot{50}$u\!=\!0.7$\ero}} % <br> \put(128,363){\sx{2.4}{\rot{-21}$v\!=\!0.1$\ero}} % <br> \put(125,294){\sx{2.8}{$v\!=\!0$}} % <br> \put(129,226){\sx{2.4}{\rot{21}$v\!=\!-0.1$\ero}} % <br> \put(158,162){\sx{2.4}{\rot{43}$v\!=\!-0.2$\ero}} % <br> \end{picture}} % <br> \end{document} % <br>

File history

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

Date/TimeThumbnailDimensionsUserComment
current17:50, 20 June 2013Thumbnail for version as of 17:50, 20 June 20131,230 × 1,230 (734 KB)Maintenance script (talk | contribs)Importing image file

The following page uses this file:

Metadata