diff options
Diffstat (limited to 'obsolete/macros/latex/contrib/tkz/tkz-fct/doc/latex/TKZdoc-fct-interpolation.tex')
-rw-r--r-- | obsolete/macros/latex/contrib/tkz/tkz-fct/doc/latex/TKZdoc-fct-interpolation.tex | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/obsolete/macros/latex/contrib/tkz/tkz-fct/doc/latex/TKZdoc-fct-interpolation.tex b/obsolete/macros/latex/contrib/tkz/tkz-fct/doc/latex/TKZdoc-fct-interpolation.tex new file mode 100644 index 0000000000..822844b18d --- /dev/null +++ b/obsolete/macros/latex/contrib/tkz/tkz-fct/doc/latex/TKZdoc-fct-interpolation.tex @@ -0,0 +1,97 @@ +%!TEX root = /Users/ego/Boulot/TKZ/tkz-fct/doc-fr/TKZdoc-fct-main.tex +\subsection{Interpolation} + +Il s'agit ici de trouver un polynôme d'interpolation sur l'intervalle $[-1~;~1]$ de la fonction $f$ définie par : +\[ + f(x)=\frac{1}{1+8x^2} +\] + +Le polynôme d'interpolation est celui obtenu par la méthode de \tkzimp{Lagrange} : +\begin{equation*} +\begin{split} + P(x) = &1.000000000-0.0000000072x-7.991424876x^2+0.000001079x^3+62.60245358x^4\\ + & -0.00004253x^5-444.2347594x^6+0.0007118x^7+ 2516.046396x^8 -0.005795x^9\\ &-10240.01777x^{10} +0.025404x^{11}+28118.29594x^{12} -0.05934x^{13} -49850.83249x^{14} \\ +& +0.08097x^{15}+54061.87086x^{16} -0.055620x^{17} -32356.67279x^{18} +0.015440x^{19}\\ +&+8140.046421x^{20}\\ +\end{split} +\end{equation*} + +Ayant utilisé vingt et un points, le polynôme est de degré $20$. Celui-ci est écrit en utilisant la méthode de \tkzimp{Horner}. Dans un premier temps, on demande à gnuplot de tracer la courbe de f en rouge, enfin on trace le polynôme d'interpolation en bleu. Les points utilisés sont en jaune. + +\subsubsection{Le code} +\begin{tkzexample}[code only] +\begin{tikzpicture} +\tkzInit[xmin=-1,xmax=1,ymin=-1.8,ymax=1.2,xstep=0.1,ystep=0.2] +\tkzGrid +\tkzAxeXY +\tkzFct[samples = 400, line width=4pt, color = red,opacity=.5](-1---1){1/(1+8*\x*\x)} + \tkzFct[smooth,samples = 400, line width=1pt, color = blue,domain =-1:1]% +{1.0+(((((((((((((((((((( + 8140.04642)*\x + +0.01544)*\x + -32356.67279)*\x + -0.05562)*\x + +54061.87086)*\x + +0.08097)*\x + -49850.83249)*\x + -0.05934)*\x + +28118.29594)*\x + +0.02540)*\x + -10240.01777)*\x + -0.00580)*\x + +2516.04640)*\x + +0.00071)*\x + -444.23476)*\x + -0.00004)*\x + +62.60245)*\x + +0.00000)*\x + -7.99142)*\x + -0.00000)*\x} + \tkzSetUpPoint[size=16,color=black,fill=yellow] + \foreach \v in {-1,-0.8,---.,1}{\tkzDefPointByFct[draw](\v)} +\end{tikzpicture} +\end{tkzexample} + +Le résultat est sur la page suivante où on peut constater le phénomène de \tkzimp{Runge}. +\subsubsection{la figure} + +\begin{sidewaysfigure}[htbp] +\centering +\begin{tikzpicture}[scale=.75] +\tkzInit[xmin=-1,xmax=1,ymin=-1.8,ymax=1.2,xstep=0.1,ystep=0.2] +\tkzGrid +\tkzAxeXY +\tkzFct[samples = 400, line width=4pt, color = red,opacity=.5,domain =-1:1]% +{1/(1+8*\x*\x)} + \tkzFct[samples = 400, line width=1pt, color = blue,domain =-1:1]% +{1.0+ +(((((((((((((((((((( + 8140.04642)*\x + +0.01544)*\x + -32356.67279)*\x + -0.05562)*\x + +54061.87086)*\x + +0.08097)*\x + -49850.83249)*\x + -0.05934)*\x + +28118.29594)*\x + +0.02540)*\x + -10240.01777)*\x + -0.00580)*\x + +2516.04640)*\x + +0.00071)*\x + -444.23476)*\x + -0.00004)*\x + +62.60245)*\x + +0.00000)*\x + -7.99142)*\x + -0.00000)*\x} + \tkzSetUpPoint[size=8,color=black,fill=yellow] + \foreach \v in {-1,-0.8,---.,1}% + {\tkzDefPointByFct[draw](\v)} +\end{tikzpicture} +\caption{Interpolation : $\dfrac{1}{1+8x^2}$} +\end{sidewaysfigure} + +\endinput + |