summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-fct/doc/latex/TKZdoc-fct-riemann.tex
blob: d60148ba7e7ac52af8d8585333686a2091bab9c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
%!TEX root = /Users/ego/Boulot/TKZ/tkz-fct/doc-fr/TKZdoc-fct-main.tex  
\section{Sommes de Riemann}
 \hypertarget{tdrs}{}   
 
\begin{NewMacroBox}{tkzDrawRiemannSum}{\oarg{local options}\marg{$f(t)$}}                                                 
  Cette macro permet de représenter les rectangles intervenant dans une somme de Riemann. Les options sont celles de \TIKZ, plus 
 
\begin{tabular}{lll}
\toprule
options             & défaut & définition                         \\ 
\midrule
\TOline{iterval}{1:2}{l'intervalle sur lequel est appliqué la méthode}  
\TOline{number}{10}{nombre de sous-intervalles  utilisés}
\bottomrule
\end{tabular}

Possible est de réunir les quatres macros et de choisir la méthode avec une option.
\end{NewMacroBox}

\subsection{Somme de Riemann}

\begin{tkzexample}[vbox] 
\begin{tikzpicture}[scale=3.5]
\tkzInit[xmax=3,ymax=1.75]
\tkzAxeXY 
\tkzGrid(0,0)(3,2)
\tkzFct[color = red, domain =1/3:3]{0.125*(3*x-1)+0.375*(3*x-1)/(x*x)}
\tkzDrawRiemannSum[fill=green!40,opacity=.2,color=green,
                   line width=1pt,interval=1./2:exp(1),number=10]
\end{tikzpicture}  
\end{tkzexample}

\newpage 
 \hypertarget{tdrsi}{}   
 
\begin{NewMacroBox}{tkzDrawRiemannSumInf}{\oarg{local options}}                                                 
C'est une variante de la macro précédente mais les rectangles sont toujours sous la courbe.
 \end{NewMacroBox}  

\subsection{Somme de Riemann Inf}

\begin{tkzexample}[vbox]  
\begin{tikzpicture}[scale=1.75]
\tkzInit[xmin=-3,xmax=6,ymin=-2,ymax=14,ystep=2]
\tkzDrawX \tkzDrawY
\tkzFct[line width=2pt,color = red, domain =-3:6]{(-\x-2)*(\x-5)} 
\tkzDrawRiemannSumInf[fill=green!40,opacity=.5,interval=-1:5,number=10] 
\end{tikzpicture}   
\end{tkzexample}

\newpage 
 \hypertarget{tdrss}{}   
 \begin{NewMacroBox}{tkzDrawRiemannSumSup}{\oarg{local options}}                                                 
C'est une variante de la macro précédente mais les rectangles sont toujours au-dessus de  la courbe. 
 \end{NewMacroBox}

\subsection{Somme de Riemann Inf et Sup} 
\begin{tkzexample}[vbox]
\begin{tikzpicture}[scale=1.75]
  \tkzInit[xmin=-3,xmax=6,ymin=-2,ymax=14,ystep=2]
  \tkzDrawX \tkzDrawY
  \tkzFct[line width=2pt,color = red, domain =-3:6]{(-\x-2)*(\x-5)}
  \tkzDrawRiemannSumSup[fill=blue!40,opacity=.5,interval=-1:5,number=10] 
  \tkzDrawRiemannSumInf[fill=green!40,opacity=.5,interval=-1:5,number=10] 
\end{tikzpicture}
\end{tkzexample}
 

\newpage
 \hypertarget{tdrsm}{}        
 \begin{NewMacroBox}{tkzDrawRiemannSumMid}{\oarg{local options}}                                                 
C'est une variante de la macro précédente mais les rectangles sont à cheval sur la courbe. 
 \end{NewMacroBox}

\subsection{Somme de Riemann Mid}

\begin{tkzexample}[vbox] 
 \begin{tikzpicture}[scale=1.75]
\tkzInit[xmin=-3,xmax=6,ymin=-2,ymax=14,ystep=2]
\tkzDrawX \tkzDrawY
\tkzFct[line width=2pt,color = red, domain =-3:6]{(-\x-2)*(\x-5)}
\tkzDrawRiemannSumMid[fill=blue!40,opacity=.5,interval=-1:5,number=10] 
\end{tikzpicture}
\end{tkzexample}

\endinput