summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex51
1 files changed, 51 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex
index a35004296ee..cb4777742ba 100644
--- a/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-plot/pst-plot-doc.tex
@@ -2955,6 +2955,57 @@ The number of the iteration is given by $n$.
\end{pspicture}
\end{LTXexample}
+\clearpage
+\subsection{\nxLcs{psNewton}}
+\begin{BDef}
+ \Lcs{psNewton}\OptArgs\Largb{$x_0$}\Largb{$f(x)$}\OptArg*{\Largs{f'(x)}}\Largb{$n$}
+\end{BDef}
+
+If the optional derivation of the function $f(x)$ is missing, then the macro itself
+calculates the derivation with an interval of $\pm0.01$. It can be changed by setting
+the optional argument \Lkeyword{VarStepEpsilon} to another value. If the derivation
+is also given as a function, it is used without any check for the values.
+
+\medskip
+\begin{LTXexample}[pos=t]
+\def\f{1/5*x^3-x^2}
+\psset{plotpoints=2000,algebraic}
+%
+\begin{pspicture*}[showgrid](-5.5,-8.5)(7.5,3.5)
+\psaxes{->}(0,0)(-5,-8)(7,3)[$x$,270][$y$,0]
+\psplot[linewidth=2pt,linecolor=blue]{-5}{8}{\f}
+\uput[90](2.95,0){$x_0$}\uput[90](3.9,0){$x_0$}
+\psNewton[linecolor=red,linewidth=0.5pt]{2.95}{\f}{10}
+\psNewton[showpoints,linestyle=dashed]{3.9}{\f}{8}
+\end{pspicture*}
+\end{LTXexample}
+
+
+
+$x_0$ is the start value of the iteration, $f(x)$ the function, which can either be in
+postfix or algebraic notation, for the latter it needs the optional argument \Lkeyword{algebraic}.
+The number of the iteration is given by $n$. All defined plotstyles can be used, but there
+maybe PostScript errors for \Lkeyset{plotstyle=values} if the number of steps is too
+big. In such a case decrease the number of steps.
+
+\medskip
+\begin{LTXexample}[pos=t]
+\def\f{-(1/192)*x^3-(1/12)*x-(1/192)*Pi*x^2-(1/12)*Pi+2}
+\def\fDerive{-(3/192)*x^2-(1/12)-(2/192)*Pi*x}
+\psset{plotpoints=2000,unit=0.5,algebraic}
+%
+\begin{pspicture*}[showgrid](-16,-5)(8.5,18.5)
+\psaxes[Dx=6,Dy=4]{->}(0,0)(-16,-5)(8,18)[$x$,270][$y$,0]
+\psplot[algebraic,linewidth=2pt,linecolor=blue]{-20}{8}{\f}
+\psxTick(-15){x_0}
+\psNewton[linecolor=red,linewidth=0.5pt]{-15}{\f}{12}
+\psNewton[linecolor=red,linewidth=0.5pt,plotstyle=xvalues,showDerivation=false]{-15}{\f}{6}
+%
+%-15, -9.567466932, -4.903526029, 3.026073041, 6.688396612, 5.580230655 (Made by Maple)
+\end{pspicture*}
+\end{LTXexample}
+
+\clearpage
\section{List of all optional arguments for \texttt{pst-plot}}
\xkvview{family=pst-plot,columns={key,type,default}}