File:Koriplot.jpg

From TORI
Jump to: navigation, search
Original file(2,947 × 1,037 pixels, file size: 197 KB, MIME type: image/jpeg)

Explicit plot of function kori.

$y=\mathrm{kori}(x)$

For $x\!\ne \!1$, the representation through the Bessel function BesselJ0 is valid,

$\mathrm{kori}(x)=\displaystyle \frac{J_0\big(L\, \sqrt{x}\big)}{1-x}$

However, the implementation through the built–in C++ function double j0(double) happen to be not so good for argument in vicinity of unity, and even worse for negative values of the argument. For this reason, the double and long double implantations of kori is suggested for the range, roughly, from -6 to 6. The long double version is mainly for the testing, because the double version already provides of order of 15 decimal digits of $\mathrm{kori}(z)$ while $|z|<6$, and still of order of 10 significant figures in the range of the figure, that is sufficient to generate the camera ready copy. As a verification, the direct implementation through the C++ function j0 is shown with thin black curve, that can be seen at the zooming–in; however, at the graphical resolution, it looks to be just at the centre of the thick red line, generated through the expansion.

C++ generator of curves

// File ado.cin should be loaded in order of compile the code below:


#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.)
#define M(x,y) fprintf(o,"%6.4lf %6.4lf M\n",0.+x,0.+y);
#define L(x,y) fprintf(o,"%6.4lf %6.4lf L\n",0.+x,0.+y);

%#include "korifit76.cin"
#include "ado.cin"

long double L= 2.4048255576957727686216318793265 ;

DB LN[9]={ 0., 2.404825557695773, 5.5200781102863115,
 8.653727912911013,11.791534439014281,14.930917708487787,
18.071063967910924,21.21163662987926, 24.352471530749302};

double korid(double x){ int n,m; double s;
double c[16]={1,
-0.256005011219941993570670508019,
 0.0281978125768042007057113441199,
-0.00181258393780241662780680613867,
 0.0000775822332475845672943781286224,
-2.38609544935449493722623606533e-6,
 5.5465254159392191445565645766e-8,
-1.01054597146460752951273870914e-9,
 1.48348772753372628782330712313e-11,
-1.79332434839872451210764178471e-13,
 1.81697031752603393402790223753e-15,
-1.56569115453044785387543614077e-17,
 1.16170076283001586118141461154e-19,
-7.50065787627627390138399503073e-22,
 4.25298321710799220467323756624e-24,
-2.13477668517290665487301104539e-26};
m=15;
s=c[m]*x; for(n=m-1;n>0;n--) {s+=c[n]; s*=x;}
return (1+s)*(1-0.189791479516754136723328431595*x); }

int main(){int m,n,i; double x,y,z,t,u; FILE *o;
long double X,Y,Z,T,U;

o=fopen("koriplo.eps","w");
ado(o,1420,480);
fprintf(o,"410 10 translate 100 100 scale 2 setlinecap 1 setlinejoin\n");

for(m=-4;m<11;m+=1) {M(m,0)L(m,4)}
for(n=0;n<5;n+=1){M(-4,n)L(10,n)}
fprintf(o,"0.01 W S\n");

for(m=2;m<4;m++){ x=LN[m]/LN[1]; x*=x; M(x,0)L(x,1) }
fprintf(o,"0.004 W 1 0 1 RGB S\n");

for(n=0;n<1430;n+=10){ x=-4.1+.01*n; y=korid(x); if(n==0) M(x,y) else L(x,y);} fprintf(o,"1 0 0 RGB .03 W S\n");
for(n=0;n<1030;n+=10){x=.01*(n+.1);y=j0(L*sqrt(x))/(1.-x);if(n==0) M(x,y) else L(x,y);}
fprintf(o,"0 0 0 RGB .0008 W S\n");// i0 is not built-in function!
//for(n=0;n<720;n+=1){ x=.01*(n+.5); y=korid(x)-j0(L*sqrt(x))/(1.-x); y*=1.e15; if(n==0) M(x,y) else L(x,y);}
//fprintf(o,"0 0 0 RGB .0008 W S\n");

fprintf(o,"showpage\n%c%cTrailer\n",'%','%'); fclose(o);
system("epstopdf koriplo.eps");
system( "open koriplo.pdf");
return 0;}

Latex generator of labels


\documentclass[12pt]{article}
\usepackage{geometry}
\usepackage{graphics}
\usepackage{rotating}
%\paperwidth 570pt
\paperwidth 1420pt
%\paperheight 138pt
\paperheight 500pt
\textwidth 420pt
\textheight 600pt
\topmargin -108pt
\oddsidemargin -76pt
\newcommand \ds {\displaystyle}
\newcommand \sx {\scalebox}
\newcommand \rme {\mathrm{e}}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\newcommand \ing {\includegraphics}
\pagestyle{empty}
\parindent 0pt
\begin{document}
\begin{picture}(1420,498)
\put(0,20){\ing{koriplo}}
\put(384,468){\sx{2.8}{$y\!=\!\mathrm{kori}(x)$}}
\put(384,418){\sx{2.8}{$4$}}
\put(384,318){\sx{2.8}{$3$}}
\put(384,218){\sx{2.8}{$2$}}
\put(384,118){\sx{2.8}{$1$}}
\put(88,0){\sx{2.8}{$-3$}}
\put(188,0){\sx{2.8}{$-2$}}
\put(288,0){\sx{2.8}{$-1$}}
\put(406,0){\sx{2.8}{$0$}}
\put(506,0){\sx{2.8}{$1$}}
\put(606,0){\sx{2.8}{$2$}}
\put(706,0){\sx{2.8}{$3$}}
\put(806,0){\sx{2.8}{$4$}}
\put(906,0){\sx{2.8}{$5$}}
\put(1006,0){\sx{2.8}{$6$}}
\put(1106,0){\sx{2.8}{$7$}}
\put(1206,0){\sx{2.8}{$8$}}
\put(1306,0){\sx{2.8}{$9$}}
\put(1400,0){\sx{2.9}{$x$}}
%\put(112,58){\rot{-33}\sx{1.4}{$y\!=\! \mathrm{mori}(x)$}\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:12, 1 December 2018Thumbnail for version as of 06:12, 1 December 20182,947 × 1,037 (197 KB)Maintenance script (talk | contribs)Importing image file
  • You cannot overwrite this file.

The following page links to this file:

Metadata