texlive[55439] Master/texmf-dist: pst-func (6jun20)

commits+karl at tug.org commits+karl at tug.org
Sat Jun 6 23:12:16 CEST 2020


Revision: 55439
          http://tug.org/svn/texlive?view=revision&revision=55439
Author:   karl
Date:     2020-06-06 23:12:15 +0200 (Sat, 06 Jun 2020)
Log Message:
-----------
pst-func (6jun20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pst-func/Changes
    trunk/Master/texmf-dist/doc/generic/pst-func/README.md
    trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
    trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
    trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/Changes	2020-06-06 21:11:51 UTC (rev 55438)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/Changes	2020-06-06 21:12:15 UTC (rev 55439)
@@ -1,4 +1,6 @@
 ..... pst-func.tex
+0.95  2020-06-06  - another two more polynomial functions
+0.94  2020-01-01  - small fixes
 0.93  2019-05-17  - fix for missing end in a local dictionary (\psBinomialX)
 0.92  2018-12-13  - allow algebraic mode for \pscumIntegral
 0.91  2018-11-15  - new algorithm for sin/cos integral to prevent problems

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/README.md	2020-06-06 21:11:51 UTC (rev 55438)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/README.md	2020-06-06 21:12:15 UTC (rev 55439)
@@ -6,6 +6,8 @@
 - psBernstein (with envelope option)
 - psFourier
 - psBessel
+- psLagrange
+- psLegendre
 - psSi and pssi (integral sin)
 - psCi and \psci (integral cosin)
 - psIntegral
@@ -45,3 +47,5 @@
 pdflatex with package auto-pst-pdf or xelatex.
 
 %% $Id: README 897 2014-03-21 08:06:41Z herbert $
+
+Bugs: hvoss at tug.org
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex	2020-06-06 21:11:51 UTC (rev 55438)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex	2020-06-06 21:12:15 UTC (rev 55439)
@@ -1,4 +1,4 @@
-%% $Id: pst-func-doc.tex 861 2018-12-13 20:40:06Z herbert $
+%% $Id: pst-func-doc.tex 1184 2020-06-06 18:36:57Z herbert $
 \documentclass[fontsize=11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,
    headings=small, headinclude=false,footinclude=false,oneside]{pst-doc}
 \usepackage{pst-func}
@@ -607,6 +607,68 @@
 
 
 \clearpage
+
+
+\subsection{Laguerre Polynomial}
+It is defined as 
+\[ 
+L_n(x)=\sum_{k=0}^n\frac{(-1)^k}{k!}\binom{n}{k}x^k
+\]
+
+\begin{LTXexample}
+\psset{xunit=1.5}
+\begin{pspicture}(-1,-4)(6,6)
+\psaxes{->}(0,0)(-1,-4)(5,6)
+\psset{yMaxValue=5,plotpoints=100,linewidth=1pt}
+\psLaguerre[n=0,linecolor=red](-1,5)\uput[0](5,1){$L_0$}
+\psLaguerre[n=1,linecolor=green](-1,5)\uput[0](4,-2.5){$L_1$}
+\psLaguerre[n=2,linecolor=blue](-1,5)\uput[0](4.5,2){$L_2$}
+\psLaguerre[n=3,linecolor=yellow](-1,5)\uput[0](5,2.5){$L_3$}
+\psLaguerre[n=4,linecolor=brown](-1,5)\uput[0](5,-1){$L_4$}
+\end{pspicture}
+\end{LTXexample}
+
+
+\psset{unit=1cm}
+
+\clearpage
+
+
+\subsection{Legendre Polynomial}
+It is defined as an orthogonal system
+\[ 
+\int\limits_{-1}^{+1}P_m(x)(P_n(x)\mathrm dx=0, \text{ with } n\ne m
+\]
+
+For the computatíon we use a recursive definition:
+
+\begin{align*}
+P_0(x)   &= 1\\
+P_{1}(x) &= x\\
+n\cdot P_{n}(x) &= (2n-1)x\cdot P_{n-1}(x)-(n-1)P_{n-2}(x)
+\end{align*}
+
+
+\begin{LTXexample}
+\psset{xunit=3,yunit=2}
+\begin{pspicture}[showgrid](-2,-2)(2,2)
+\psaxes[labels=none]{->}(0,0)(-2,-2)(2,2)
+\psset{yMaxValue=1.9,yMinValue=-2,plotpoints=200,linewidth=1.5pt}
+\psLegendre[n=0,linecolor=red](-2,2)\uput[0](2,1){\textcolor{red}{$L_0$}}
+\psLegendre[n=1,linecolor=green](-2,2)\uput[0](2,2){\textcolor{green}{$L_1$}}
+\psLegendre[n=2,linecolor=blue](-2,2)\uput[0](1.3,1.8){\textcolor{blue}{$L_2$}}
+\psLegendre[n=3,linecolor=yellow](-2,2)\uput*[0](-1,-1.8){\textcolor{yellow}{$L_3$}}
+\psLegendre[n=4,linecolor=brown](-2,2)\uput*[0](-1,2){\textcolor{brown}{$L_4$}}
+\end{pspicture}
+\end{LTXexample}
+
+
+\psset{unit=1cm}
+
+
+
+
+\clearpage
 \section{Calculating the zeros of a function or the the intermediate point of two function}
 
 \begin{BDef}
@@ -1136,8 +1198,6 @@
 \end{LTXexample}
 
 \clearpage
-
-\clearpage
 \section{Modfied Bessel function of first order}
 The modified Bessel function of first order is defined as
 %
@@ -1166,6 +1226,9 @@
 \end{LTXexample}
 
 \clearpage
+
+
+
 \section{\Lcs{psSi}, \Lcs{pssi} and \Lcs{psCi}}
 The integral sin  and cosin are defined as
 %

Modified: trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex	2020-06-06 21:11:51 UTC (rev 55438)
+++ trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex	2020-06-06 21:12:15 UTC (rev 55439)
@@ -1,4 +1,4 @@
-%% $Id: pst-func.tex 861 2018-12-13 20:40:06Z herbert $
+%% $Id: pst-func.tex 1184 2020-06-06 18:36:57Z herbert $
 %%
 %% This is file `pst-func.tex',
 %%
@@ -31,8 +31,8 @@
 % interface to the `xkeyval' package
 \pst at addfams{pst-func}
 %
-\def\fileversion{0.93}
-\def\filedate{2019/05/17}
+\def\fileversion{0.95}
+\def\filedate{2020/06/06}
 \message{`PST-func' v\fileversion, \filedate\space (hv)}
 %
 \pstheader{pst-func.pro}
@@ -268,6 +268,48 @@
   }%
 }\ignorespaces}
 %
+\define at key[psset]{pst-func}{n}[1]{\def\psk at func@n{#1 }}
+\psset[pst-func]{n=0}
+\def\psLaguerre{\@ifnextchar[{\psLaguerre at i}{\psLaguerre at i[]}}%% hv 20200111
+\def\psLaguerre at i[#1](#2,#3){{%%% n
+  \pst at killglue%
+  \psplot[#1]{#2}{#3}{%
+    /L_n 1 def
+    0 1 \psk at func@n {
+      /k_i ED
+      -1 k_i exp k_i factorial div 
+      \psk at func@n k_i MoverN mul
+      x k_i exp mul L_n add 
+      /L_n ED
+    } for
+    x \pst at number\psxunit mul L_n 
+    %dup == %\pst at number\psyunit div
+  }%
+}\ignorespaces}
+%
+\def\psLegendre{\@ifnextchar[{\psLegendre at i}{\psLegendre at i[]}}%% hv 20200115
+\def\psLegendre at i[#1](#2,#3){{%%% n
+  \pst at killglue%
+  \psplot[#1]{#2}{#3}{%
+    /P_n 0 def
+    \psk at func@n 0 eq { /P_1 1 def }{ \psk at func@n 1 eq { /P_1 x def }
+       { /P_0 1 def
+	 /P_1 x def  
+	 2 1 \psk at func@n {
+           /k_i ED
+           k_i dup add 1 sub x mul P_1 mul  % (2n-1)*x*P_1
+           k_i 1 sub P_0 mul sub  % − ( n−1 ) P_{n-2}(x)
+           k_i div
+           /P_0 P_1 def
+           /P_1 ED
+         } for 
+%n Pn ( x ) = ( 2n − 1 )  P_{n−1}(x) − ( n−1 ) P_{n-2}(x)       
+      } ifelse } ifelse
+    x \pst at number\psxunit mul P_1 
+    %dup == %\pst at number\psyunit div
+  }%
+}\ignorespaces}
+%
 \define at key[psset]{pst-func}{sigma}[0.5]{\def\psk at sigma{#1 }}
 \define at key[psset]{pst-func}{mue}[0]{\def\psk at mue{#1 }}
 \define at key[psset]{pst-func}{nue}[1]{\def\psk at nue{#1 }}



More information about the tex-live-commits mailing list.