summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/polexpr/polexpr.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/polexpr/polexpr.txt')
-rw-r--r--Master/texmf-dist/doc/latex/polexpr/polexpr.txt85
1 files changed, 57 insertions, 28 deletions
diff --git a/Master/texmf-dist/doc/latex/polexpr/polexpr.txt b/Master/texmf-dist/doc/latex/polexpr/polexpr.txt
index dd2ab246900..7b792ed8ca0 100644
--- a/Master/texmf-dist/doc/latex/polexpr/polexpr.txt
+++ b/Master/texmf-dist/doc/latex/polexpr/polexpr.txt
@@ -4,8 +4,8 @@
Package polexpr documentation
===============================
-0.5 (2018/04/08)
-================
+0.5.1 (2018/04/22)
+==================
.. contents::
@@ -16,9 +16,26 @@ The syntax is::
\poldef polname(x):= expression in variable x;
-where in place of ``x`` an arbitrary *dummy variable* is authorized
-(i.e. per default any of ``[a-z|A-Z]``; more letters can be declared
-under Unicode engines.) One can also issue::
+where:
+
+- in place of ``x`` an arbitrary *dummy variable* is authorized,
+ i.e. per default any of ``[a-z|A-Z]`` (more letters can be declared
+ under Unicode engines.)
+
+- ``polname`` consists of letters, digits, and the ``_`` and
+ ``'`` characters. It must start with a letter.
+
+.. attention::
+
+ The ``'`` is authorized since ``0.5.1``. As a result some constructs
+ recognized by the ``\xintexpr`` parser, such as ``var1 'and' var2``
+ will get misinterpreted and cause errors. However these constructs
+ are unlikely to be frequently needed in polynomial expressions, and
+ the ``\xintexpr`` syntax offers alternatives, so it was deemed a
+ small evil. Of course the ``\xintexpr`` parser is modified only
+ temporarily during execution of ``\poldef``.
+
+One can also issue::
\PolDef{polname}{expression in variable x}
@@ -27,7 +44,8 @@ from its default ``x``.
``\poldef f(x):= 1-x+x^2;``
defines polynomial ``f``. Polynomial names must start with a
- letter and may contain letters, digits, and underscores. The
+ letter and may contain letters, digits, underscores and the right
+ tick character. The
variable must be a single letter. The colon character is optional.
The semi-colon at end of expression is mandatory.
@@ -50,23 +68,29 @@ from its default ``x``.
should now define the zero polynomial... Let's check:
``\[ k(z) = \PolTypeset[z]{k} \]``
-``\PolDiff{f}{df_dx}``
- sets ``df_dx`` to the derivative of ``f``.
+``\PolDiff{f}{f'}``
+ sets ``f'`` to the derivative of ``f``. The name doesn't have to be
+ ``f'`` (in fact the ``'`` is licit only since ``0.5.1``).
-``\PolDiff{df_dx}{f_xx}``
+.. important::
+
+ This is not done automatically. If some new definition needs to use
+ the derivative of some available polynomial, that derivative
+ polynomial must have been defined via ``\PolDiff``: something like
+ ``T'(x)^2`` will not work without a prior ``\PolDiff{T}{T'}``.
+
+``\PolDiff{f}{f''}``
obtains second derivative.
-``\PolDiff[3]{f}{d3f_dx3}``
- computes directly the third derivative. Its name does not have to be
- chosen so complicated ``:)``, but the right quote ``'`` is not
- allowed in polynomial names (currently).
+``\PolDiff[3]{f}{f'''}``
+ computes the third derivative.
::
$f(z) = \PolTypeset[z]{f} $\newline
- $f'(z) = \PolTypeset[z]{df_dx}$\newline
- $f''(z) = \PolTypeset[z]{f_xx}$\newline
- $f'''(z)= \PolTypeset[z]{d3f_dx3}$\par
+ $f'(z) = \PolTypeset[z]{f'} $\newline
+ $f''(z) = \PolTypeset[z]{f''} $\newline
+ $f'''(z)= \PolTypeset[z]{f'''} $\par
.. important::
@@ -184,16 +208,16 @@ was no further reduction.
\PolEnsureIntervalLengths{f_1}{-10}%
Here they are with ten digits after decimal mark:
\PolPrintIntervals[W]{f_1}
- \PolDiff{f_1}{f_xx}
- \PolToSturm{f_xx}{f_xx}
- \PolSturmIsolateZeros{f_xx}
- The second derivative is \PolTypeset{f_xx}.
- It has \PolSturmNbOfIsolatedZeros{f_xx} distinct real
+ \PolDiff{f_1}{f''}
+ \PolToSturm{f''}{f''}
+ \PolSturmIsolateZeros{f''}
+ The second derivative is \PolTypeset{f''}.
+ It has \PolSturmNbOfIsolatedZeros{f''} distinct real
roots:
- \PolPrintIntervals[X]{f_xx}
+ \PolPrintIntervals[X]{f''}
Here is the positive one with 20 digits after decimal mark:
- \PolEnsureIntervalLength{f_xx}{2}{-20}%
- \[X_2 = \PolSturmIsolatedZeroLeft{f_xx}{2}\dots\]
+ \PolEnsureIntervalLength{f''}{2}{-20}%
+ \[X_2 = \PolSturmIsolatedZeroLeft{f''}{2}\dots\]
The more mathematically advanced among our dear readers will be able
to give the exact value for $X_2$!
@@ -367,8 +391,9 @@ Non-expandable macros
in a private structure accessible later via other package macros,
under the user-chosen ``polname``. Of course the *expression* can
use other previously defined polynomials. Names must start with a
- letter and are constituted of letters, digits and underscore
- characters. The whole xintexpr_ syntax is authorized::
+ letter and are constituted of letters, digits, underscores and
+ (since ``0.5.1``) the right tick ``'``.
+ The whole xintexpr_ syntax is authorized::
\poldef sin(z) := add((-1)^i z^(2i+1)/(2i+1)!, i = 0..10);
@@ -1810,14 +1835,18 @@ CHANGE LOG
degree 41 polynomial with -2, -1.9, -1.8, ..., 0, 0.1, ..., 1.9, 2
as roots`_ for usage). It will presumably be replaced in future by
an interval specification.
- * new non-expandable macros:
+ * new non-expandable macro:
- `\\PolMakePrimitive`_
- * new expandable macros:
+ * new expandable macro:
- `\\PolIContent`_
+- v0.5.1 (2018/04/22)
+
+ * new feature:
+ - the character ``'`` can be used in polynomial names.
Acknowledgments
---------------