% (find-angg "LATEX/2017-1-C2-material.tex")
% (defun c () (interactive) (find-LATEXsh "lualatex -record 2017-1-C2-material.tex"))
% (defun d () (interactive) (find-xpdfpage "~/LATEX/2017-1-C2-material.pdf"))
% (defun e () (interactive) (find-LATEX "2017-1-C2-material.tex"))
% (defun u () (interactive) (find-latex-upload-links "2017-1-C2-material"))
% (find-xpdfpage "~/LATEX/2017-1-C2-material.pdf")
% (find-sh0 "cp -v  ~/LATEX/2017-1-C2-material.pdf /tmp/")
% (find-sh0 "cp -v  ~/LATEX/2017-1-C2-material.pdf /tmp/pen/")
%   file:///home/edrx/LATEX/2017-1-C2-material.pdf
%               file:///tmp/2017-1-C2-material.pdf
%           file:///tmp/pen/2017-1-C2-material.pdf
% http://angg.twu.net/LATEX/2017-1-C2-material.pdf

% «.somatorios»			(to "somatorios")
% «.integravel»			(to "integravel")
% «.aproximacoes-por-escadas»	(to "aproximacoes-por-escadas")

\documentclass[oneside]{book}
\usepackage[colorlinks]{hyperref} % (find-es "tex" "hyperref")
%\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pict2e}
\usepackage{color}                % (find-LATEX "edrx15.sty" "colors")
\usepackage{colorweb}             % (find-es "tex" "colorweb")
%\usepackage{tikz}
%
% (find-dn6 "preamble6.lua" "preamble0")
%\usepackage{proof}   % For derivation trees ("%:" lines)
%\input diagxy        % For 2D diagrams ("%D" lines)
%\xyoption{curve}     % For the ".curve=" feature in 2D diagrams
%
\usepackage{edrx15}               % (find-angg "LATEX/edrx15.sty")
\input edrxaccents.tex            % (find-angg "LATEX/edrxaccents.tex")
\input edrxchars.tex              % (find-LATEX "edrxchars.tex")
\input edrxheadfoot.tex           % (find-dn4ex "edrxheadfoot.tex")
\input edrxgac2.tex               % (find-LATEX "edrxgac2.tex")
%
\begin{document}

\catcode`\^^J=10
\directlua{dofile "dednat6load.lua"}  % (find-LATEX "dednat6load.lua")

%\catcode`\^^J=10
%\directlua{dednat6dir = "dednat6/"}
%\directlua{dofile(dednat6dir.."dednat6.lua")}
%\directlua{texfile(tex.jobname)}
%\directlua{verbose()}
%%\directlua{output(preamble1)}
%\def\expr#1{\directlua{output(tostring(#1))}}
%\def\eval#1{\directlua{#1}}
%\def\pu{\directlua{pu()}}

\directlua{dofile "edrxtikz.lua"} % (find-LATEX "edrxtikz.lua")
\directlua{dofile "edrxpict.lua"} % (find-LATEX "edrxpict.lua")
%L V.__tostring = function (v) return format("(%.3f,%.3f)", v[1], v[2]) end




% (find-books "__analysis/__analysis.el" "stewart")
% (find-stewart7page (+ 32 283) "4. Integrals")
% (find-stewart7page (+ 32 289)      "upper sums")


% «somatorios» (to ".somatorios")
% (c2qe171)
% (c2q171  7 "20170322" "Aproximações por retângulos, partições")

$\overline{∫}_P f(x)\,dx =
 \sum_{i=1}^{N} (\sup_{x∈[x_i, x_{i+1}]} f(x)) \, (x_{i+1}-x_i)
$

$\underline{∫}_P f(x)\,dx =
 \sum_{i=1}^{N} (\inf_{x∈[x_i, x_{i+1}]} f(x)) \, (x_{i+1}-x_i)
$

\msk

% «integravel» (to ".integravel")
% (c2qe171)
% (c2q171  9 "20170327" "Aproximações de f por cima e por baixo, integral, integrável")

$\overline{∫}_{x=a}^{x=b} f(x)\,dx =
 \inf_{\text{$P$ partição de $[a,b]$}} \, (\overline{∫}_P f(x)\,dx)
$

$\underline{∫}_{x=a}^{x=b} f(x)\,dx =
 \sup_{\text{$P$ partição de $[a,b]$}} \, (\underline{∫}_P f(x)\,dx)
$

$∫_{x=a}^{x=b} f(x)\,dx =
 \overline{∫}_{x=a}^{x=b} f(x)\,dx \overset{(*)}{=}
 \underline{∫}_{x=a}^{x=b} f(x)\,dx$ \quad (se $(*)$ valer)

$f$ é integrável em $[a,b]$ se
$\overline{∫}_{x=a}^{x=b} f(x)\,dx = \underline{∫}_{x=a}^{x=b} f(x)\,dx$


\msk

% «aproximacoes-por-escadas» (to ".aproximacoes-por-escadas")

$\overline{f}_P (x) = \begin{cases}
          \sup_{x∈[x_1,     x_{2}  ]} f(x) & \text{se $x=x_1$} \\
          \sup_{x∈[x_{i-1}, x_{i+1}]} f(x) & \text{se $x=x_i$, $2≤i≤N$} \\
          \sup_{x∈[x_N,     x_{N+1}]} f(x) & \text{se $x=x_{N+1}$} \\
          \sup_{x∈[x_i,     x_{i+1}]} f(x) & \text{se $x_i<x<x_{i+1}$} \\
         \end{cases}
$

$\underline{f}_P (x) = \begin{cases}
          \inf_{x∈[x_1,     x_{2}  ]} f(x) & \text{se $x=x_1$} \\
          \inf_{x∈[x_{i-1}, x_{i+1}]} f(x) & \text{se $x=x_i$, $2≤i≤N$} \\
          \inf_{x∈[x_N,     x_{N+1}]} f(x) & \text{se $x=x_{N+1}$} \\
          \inf_{x∈[x_i,     x_{i+1}]} f(x) & \text{se $x_i<x<x_{i+1}$} \\
         \end{cases}
$

$\begin{array}{rcl}
 \end{array}
$

$g_1(x) = \begin{cases}
           1  & \text{se $x≤1$} \\
           2  & \text{se $1<x<3$} \\
           -1 & \text{se $3≤x$} \\
         \end{cases}
$

$g_2(x) = \begin{cases}
           1  & \text{se $x≤1$} \\
           2x & \text{se $1<x<2$} \\
           0  & \text{se $x=2$} \\
           1  & \text{se $2<x$} \\
         \end{cases}
$





% (find-LATEX "edrxpict.lua" "pictdots")
% (find-LATEX "2016-2-GA-algebra.tex" "picturedots")
% (find-es "tex" "color")


% Demos from:
% (find-LATEX "2016-2-C2-integral.tex" "pictpiecewise")
% (find-LATEX "2016-2-C2-integral.tex" "rotatebox")



\unitlength=10pt

%L f = function (x) return 4-(x-2)^2 end
%L ps = Points.fromfx(0, 4, 16, f)
%L po = Points.fromfx(1, 3, 8, f):polyunder()
\pu

$\vcenter{\hbox{%
 \beginpicture(0,0)(4,4)
 \pictgrid%
 \pictpiecewise{(0,1)o--(1,1)o (1,2)c (1,3)o--(2,3)c--(3,2)--(4,2)c}%
 \pictaxes%
 \end{picture}%
 }}
 %
 \quad
 %
 \picturepiecewise(0,0)(4,4){
   (0,1)o--(1,1)o (1,2)c (1,3)o--(2,3)c--(3,2)--(4,2)c
 }
$





\end{document}

% Local Variables:
% coding: utf-8-unix
% ee-anchor-format: "«%s»"
% End:
