Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
% (find-LATEX "2023-2-C2-dirichlet.tex")
% (defun c () (interactive) (find-LATEXsh "lualatex -record 2023-2-C2-dirichlet.tex" :end))
% (defun C () (interactive) (find-LATEXsh "lualatex 2023-2-C2-dirichlet.tex" "Success!!!"))
% (defun D () (interactive) (find-pdf-page      "~/LATEX/2023-2-C2-dirichlet.pdf"))
% (defun d () (interactive) (find-pdftools-page "~/LATEX/2023-2-C2-dirichlet.pdf"))
% (defun e () (interactive) (find-LATEX "2023-2-C2-dirichlet.tex"))
% (defun o () (interactive) (find-LATEX "2023-2-C2-dirichlet.tex"))
% (defun u () (interactive) (find-latex-upload-links "2023-2-C2-dirichlet"))
% (defun v () (interactive) (find-2a '(e) '(d)))
% (defun d0 () (interactive) (find-ebuffer "2023-2-C2-dirichlet.pdf"))
% (defun cv () (interactive) (C) (ee-kill-this-buffer) (v) (g))
%          (code-eec-LATEX "2023-2-C2-dirichlet")
% (find-pdf-page   "~/LATEX/2023-2-C2-dirichlet.pdf")
% (find-sh0 "cp -v  ~/LATEX/2023-2-C2-dirichlet.pdf /tmp/")
% (find-sh0 "cp -v  ~/LATEX/2023-2-C2-dirichlet.pdf /tmp/pen/")
%     (find-xournalpp "/tmp/2023-2-C2-dirichlet.pdf")
%   file:///home/edrx/LATEX/2023-2-C2-dirichlet.pdf
%               file:///tmp/2023-2-C2-dirichlet.pdf
%           file:///tmp/pen/2023-2-C2-dirichlet.pdf
%  http://anggtwu.net/LATEX/2023-2-C2-dirichlet.pdf
% (find-LATEX "2019.mk")
% (find-Deps1-links "Caepro5 Piecewise2")
% (find-Deps1-cps   "Caepro5 Piecewise2")
% (find-Deps1-anggs "Caepro5 Piecewise2")
% (find-MM-aula-links "2023-2-C2-dirichlet" "C2" "c2m232dirichlet" "c2di")

% «.defs»		(to "defs")
% «.defs-T-and-B»	(to "defs-T-and-B")
% «.defs-caepro»	(to "defs-caepro")
% «.defs-pict2e»	(to "defs-pict2e")
% «.title»		(to "title")
% «.links»		(to "links")
% «.areas-no-olhometro»	(to "areas-no-olhometro")
%
% «.djvuize»		(to "djvuize")



% <videos>
% Video (not yet):
% (find-ssr-links     "c2m232dirichlet" "2023-2-C2-dirichlet")
% (code-eevvideo      "c2m232dirichlet" "2023-2-C2-dirichlet")
% (code-eevlinksvideo "c2m232dirichlet" "2023-2-C2-dirichlet")
% (find-c2m232dirichletvideo "0:00")

\documentclass[oneside,12pt]{article}
\usepackage[colorlinks,citecolor=DarkRed,urlcolor=DarkRed]{hyperref} % (find-es "tex" "hyperref")
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pict2e}
\usepackage[x11names,svgnames]{xcolor} % (find-es "tex" "xcolor")
\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{edrx21}               % (find-LATEX "edrx21.sty")
\input edrxaccents.tex            % (find-LATEX "edrxaccents.tex")
\input edrx21chars.tex            % (find-LATEX "edrx21chars.tex")
\input edrxheadfoot.tex           % (find-LATEX "edrxheadfoot.tex")
\input edrxgac2.tex               % (find-LATEX "edrxgac2.tex")
%\usepackage{emaxima}              % (find-LATEX "emaxima.sty")
%
% (find-es "tex" "geometry")
\usepackage[a6paper, landscape,
            top=1.5cm, bottom=.25cm, left=1cm, right=1cm, includefoot
           ]{geometry}
%
\begin{document}

% «defs»  (to ".defs")
% (find-LATEX "edrx21defs.tex" "colors")
% (find-LATEX "edrx21.sty")

\def\drafturl{http://anggtwu.net/LATEX/2023-2-C2.pdf}
\def\drafturl{http://anggtwu.net/2023.2-C2.html}
\def\draftfooter{\tiny \href{\drafturl}{\jobname{}} \ColorBrown{\shorttoday{} \hours}}

% (find-LATEX "2023-1-C2-carro.tex" "defs-caepro")
% (find-LATEX "2023-1-C2-carro.tex" "defs-pict2e")

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

% «defs-T-and-B»  (to ".defs-T-and-B")
\long\def\ColorDarkOrange#1{{\color{orange!90!black}#1}}
\def\T(Total: #1 pts){{\bf(Total: #1)}}
\def\T(Total: #1 pts){{\bf(Total: #1 pts)}}
\def\T(Total: #1 pts){\ColorRed{\bf(Total: #1 pts)}}
\def\B       (#1 pts){\ColorDarkOrange{\bf(#1 pts)}}

% «defs-caepro»  (to ".defs-caepro")
%L dofile "Caepro5.lua"              -- (find-angg "LUA/Caepro5.lua" "LaTeX")
\def\Caurl   #1{\expr{Caurl("#1")}}
\def\Cahref#1#2{\href{\Caurl{#1}}{#2}}
\def\Ca      #1{\Cahref{#1}{#1}}

% «defs-pict2e»  (to ".defs-pict2e")
%L V = nil                           -- (find-angg "LUA/Pict2e1.lua" "MiniV")
%L dofile "Piecewise2.lua"           -- (find-LATEX "Piecewise2.lua")
%L -- Pict2e.__index.suffix = "%"
\def\pictgridstyle{\color{GrayPale}\linethickness{0.3pt}}
\def\pictaxesstyle{\linethickness{0.5pt}}
\def\pictnaxesstyle{\color{GrayPale}\linethickness{0.5pt}}
\celllower=2.5pt

\def\Rext{\overline{\R}}
\def\V{\mathbf{V}}
\def\F{\mathbf{F}}

\def\into{\overline ∫}
\def\intu{\underline∫}
\def\intou{\overline{\underline∫}}
\def\INTx#1#2#3#4{#1_{x=#2}^{x=#3} #4 \, dx}
\def\INTP  #1#2#3{#1_{#2}          #3 \, dx}

\def\mname#1{\ensuremath{[\text{#1}]}}
\def\minf{\mname{inf}}
\def\msup{\mname{sup}}
\def\sse {\text{sse}}

\def\sumiN#1{\sum_{i=1}^N #1 (b_i-a_i)}

\sa{into_P     f(x) dx}{\INTP{\into} {P}{f(x)}}
\sa{intu_P     f(x) dx}{\INTP{\intu} {P}{f(x)}}
\sa{intou_P    f(x) dx}{\INTP{\intou}{P}{f(x)}}
\sa{into_Q     f(x) dx}{\INTP{\into} {Q}{f(x)}}
\sa{intu_Q     f(x) dx}{\INTP{\intu} {Q}{f(x)}}
\sa{intou_Q    f(x) dx}{\INTP{\intou}{Q}{f(x)}}
\sa{into_ab2k  f(x) dx}{\INTP{\into} {[a,b]_{2^k}}{f(x)}}
\sa{intu_ab2k  f(x) dx}{\INTP{\intu} {[a,b]_{2^k}}{f(x)}}
\sa{intou_ab2k f(x) dx}{\INTP{\intou}{[a,b]_{2^k}}{f(x)}}
\sa{into_xab   f(x) dx}{\INTx{\into} {a}{b}{f(x)}}
\sa{intu_xab   f(x) dx}{\INTx{\intu} {a}{b}{f(x)}}
\sa{intou_xab  f(x) dx}{\INTx{\intou}{a}{b}{f(x)}}
\sa{int_xab    f(x) dx}{\INTx{\int}  {a}{b}{f(x)}}

% (find-LATEX "2022-1-C2-infs-e-sups.tex" "defs")
\def\Intover     #1#2{\overline {∫}_{#1}#2\,dx}
\def\Intunder    #1#2{\underline{∫}_{#1}#2\,dx}
\def\Intoverunder#1#2{\Intover{#1}{#2} - \Intunder{#1}{#2}}
\def\Intxover     #1#2#3{\overline {∫}_{x=#1}^{x=#2}#3\,dx}
\def\Intxunder    #1#2#3{\underline{∫}_{x=#1}^{x=#2}#3\,dx}
\def\Intoverunder   #1#2{\overline{\underline{∫}}_{#1}      #2\,dx}
\def\Intxoverunder#1#2#3{\overline{\underline{∫}}_{x=#1}^{x=#2} #3\,dx}
\def\IntPoverunder  #1#2{\overline{\underline{∫}}_{#1} #2\,dx}

\pu



%  _____ _ _   _                               
% |_   _(_) |_| | ___   _ __   __ _  __ _  ___ 
%   | | | | __| |/ _ \ | '_ \ / _` |/ _` |/ _ \
%   | | | | |_| |  __/ | |_) | (_| | (_| |  __/
%   |_| |_|\__|_|\___| | .__/ \__,_|\__, |\___|
%                      |_|          |___/      
%
% «title»  (to ".title")
% (c2m232dirichletp 1 "title")
% (c2m232dirichleta   "title")

\thispagestyle{empty}

\begin{center}

\vspace*{1.2cm}

{\bf \Large Cálculo 2 - 2023.2}

\bsk

Aula 16: a função de Dirichlet

\bsk

Eduardo Ochs - RCN/PURO/UFF

\url{http://anggtwu.net/2023.2-C2.html}

\end{center}

\newpage

% «links»  (to ".links")
% (c2m232dirichletp 2 "links")
% (c2m232dirichleta   "links")

{\bf Links}

\scalebox{0.6}{\def\colwidth{9cm}\firstcol{

% (find-angg ".emacs" "c2q231" "jun06: Funções não integráveis, TFC1")
\par \Ca{2gQ39} (2023.1) Quadros da aula 19 (06/jun/2023)

}\anothercol{
}}

\newpage

% «areas-no-olhometro»  (to ".areas-no-olhometro")
% (c2m232dirichletp 3 "areas-no-olhometro")
% (c2m232dirichleta   "areas-no-olhometro")
% (c2m212somas2p 44 "areas-no-olhometro")
% (c2m212somas2a    "areas-no-olhometro")

{\bf Áreas no olhômetro}

A partir daqui eu vou supor que todo mundo sabe calcular

determinadas áreas ``no olho'' --- contando quadradinhos,

fazendo ``base $·$ altura'' (pra retângulos), ou

fazendo ``(base $·$ altura)/2'' (pra triângulos)...

\msk

Tente calcular a área da figura abaixo de cabeça.

Se você não conseguir peça ajuda URGENTE!!!

%L pol = function (x,y,dx,dy)
%L     local x0, y0, x1, y1 = x,y,x+dx,y+dy
%L     return pformat("\\polygon*(%s,%s)(%s,%s)(%s,%s)(%s,%s)",
%L                    x0,y0, x0,y1, x1,y1, x1,y0)
%L   end
%L
%L PictBounds.setbounds(v(0,0), v(11,7))
%L p = Pict {
%L   "\\polygon*(5,4)(5,6)(8,4)",
%L   pol(2,3, 2,3),
%L   pol(6.0,1.0, .5,.5),
%L   pol(6.5,1.5, .5,.5),
%L   pol(7.0,2.0, .5,.5),
%L   pol(7.5,2.5, .5,.5),
%L   pol(8.0,3.0, .5,.5),
%L   pol(8.5,3.5, .5,.5),
%L }:Color "Orange"
%L p:prethickness("1.5pt"):pgat("pgatc"):sa("de cabeca"):output()

\pu
%
\unitlength=10pt
%
$$\ga{de cabeca}$$



\newpage

% (c2m212somas2p 51 "dirichlet")
% (c2m212somas2a    "dirichlet")

{\bf A função de Dirichlet}

A {\sl função de Dirichlet} é definida por:
%
$$f(x) =
  \begin{cases}
     0 & \text{quando $x∈\Q$}, \\
     1 & \text{quando $x∈\R∖\Q$} \\
  \end{cases}
$$

Ela não tem um nome oficial, então

vamos chamá-la de `$f$' nos próximos slides.

\msk

O gráfico dela alterna freneticamente entre $y=0$ e $y=1$.

\msk

Lembre que:

os números racionais são os cuja expansão decimal é

``periódica'', e os irracionais são os que não são assim;

entre cada dois racionais diferentes há um irracional, e

entre cada dois irracionais diferentes há um racional...

\newpage

% «dirichlet-2»  (to ".dirichlet-2")
% (c2m212somas2p 47 "dirichlet-2")
% (c2m212somas2a    "dirichlet-2")

{\bf A função de Dirichlet (2)}

\def\ui#1{\underline{#1}}

Lembre que podemos obter um irracional entre, digamos,

$a=\frac{10}{7}=1.42857\ui{142857}$ e
$b=\frac{1285715}{900000}=1.42857\ui{2}$,

modificando a expansão decimal de um dele e trocando-a

pela expansão decimal de $\sqrt{2}$ a partir de um

certo ponto... Por exemplo:

$$\begin{array}{rcl}
  \sqrt{2} &=& 1.41421356237... \\[5pt]
  b        &=& 1.42857\ui{222222}... \\
  c        &=& 1.42857156237... \\
  a        &=& 1.42857\ui{142857}... \\
  \end{array}
$$

Neste caso temos $a<c<b$, com $a,b∈\Q$ e $c∈\R∖\Q$.

Dá pra fazer algo parecido pra obter um racional

entre dois irracionais.


\newpage

% «dirichlet-3»  (to ".dirichlet-3")
% (c2m232dirichletp 5 "dirichlet-3")
% (c2m232dirichleta   "dirichlet-3")
% (c2m212somas2p 53 "dirichlet-3")
% (c2m212somas2a    "dirichlet-3")
%
%L -- Pict2e.bounds = PictBounds.new(v(0,0), v(2,1))
%L PictBounds.setbounds(v(0,0), v(2,1))
%L spec = [[ (0.1,1)c (0.3,1)c (0.5,1)c (0.7,1)c (0.9,1)c
%L           (1.1,1)c (1.3,1)c (1.5,1)c (1.7,1)c (1.9,1)c 
%L           (0.0,0)c (0.2,0)c (0.4,0)c (0.6,0)c (0.8,0)c
%L           (1.0,0)c (1.2,0)c (1.4,0)c (1.6,0)c (1.8,0)c (2.0,0)c 
%L        ]]
%L pws = PwSpec.from(spec)
%L pws:topict():prethickness("1.5pt"):pgat("pgatc"):sa("dirichlet 1"):output()
\pu

{\bf A função de Dirichlet (3)}

Dá pra desenhar o gráfico da função de Dirichlet assim:
%
\unitlength=20pt
%
$$f(x) =
  \begin{cases}
     0 & \text{quando $x∈\Q$}, \\
     1 & \text{quando $x∈\R∖\Q$} \\
  \end{cases}
  \;\;
  =
  \;\;
  \ga{dirichlet 1}
$$

Repare que isso só funciona porque o desenho é claramente

ambíguo... um leitor ``normal'' não consegue descobrir no olho

quais são as coordenadas das bolinhas em $y=1$ e em $y=0$,

então ele é obrigado a olhar pra definição formal da $f(x)$...

\msk

e aí quando ele entende a definição formal da $f(x)$ ele

descobre que o desenho quer dizer ``muitas bolinhas em $y=1$,

muito próximas umas das outras, e muitas bolinhas em $y=0$

muito próximas das outras''...

\msk

...e ele entende que esse ``muitas'' quer dizer ``infinitas''.

% (sqrt 2)
% (/ 10.0 7) 
% (* (/ 1.0 7) 9999)
% (* 1.428572222 900000)
% (/ 1285715 900000.0)



\newpage

% «exercicio-19»  (to ".exercicio-19")
% (c2m212somas2p 49 "exercicio-19")
% (c2m212somas2a    "exercicio-19")

{\bf Exercício 19.}

A função de Dirichlet é um dos exemplos mais simples

de uma função que não é integrável.

\msk

\def\Iou#1{\Intoverunder {[0,1]_{2^{#1}}} {f(x)}}

Sejam $f(x)$ a função de Dirichlet,

e $d_k = \Iou{k}$.

\msk

a) Represente graficamente $d_0, d_1, d_2, d_3$.

b) Calcule no olhômetro o limite $\lim_{k→∞} d_k$.

\phantom{b)} (Dica: esse limite não dá zero...)

\msk

c) Represente graficamente
$\mname{max}_{[0,1]_{2^2}}$ e
$\mname{min}_{[0,1]_{2^2}}$.

(Dica: o método do máximo ``não enxerga'' os pontos

com $y=1$...) 



\GenericWarning{Success:}{Success!!!}  % Used by `M-x cv'

\end{document}

%  ____  _             _         
% |  _ \(_)_   ___   _(_)_______ 
% | | | | \ \ / / | | | |_  / _ \
% | |_| | |\ V /| |_| | |/ /  __/
% |____// | \_/  \__,_|_/___\___|
%     |__/                       
%
% «djvuize»  (to ".djvuize")
% (find-LATEXgrep "grep --color -nH --null -e djvuize 2020-1*.tex")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "~/2023.2-C2/")
# (find-fline "~/LATEX/2023-2-C2/")
# (find-fline "~/bin/djvuize")

cd /tmp/
for i in *.jpg; do echo f $(basename $i .jpg); done

f () { rm -v $1.pdf;  textcleaner -f 50 -o  5 $1.jpg $1.png; djvuize $1.pdf; xpdf $1.pdf }
f () { rm -v $1.pdf;  textcleaner -f 50 -o 10 $1.jpg $1.png; djvuize $1.pdf; xpdf $1.pdf }
f () { rm -v $1.pdf;  textcleaner -f 50 -o 20 $1.jpg $1.png; djvuize $1.pdf; xpdf $1.pdf }

f () { rm -fv $1.png $1.pdf; djvuize $1.pdf }
f () { rm -fv $1.png $1.pdf; djvuize WHITEBOARDOPTS="-m 1.0 -f 15" $1.pdf; xpdf $1.pdf }
f () { rm -fv $1.png $1.pdf; djvuize WHITEBOARDOPTS="-m 1.0 -f 30" $1.pdf; xpdf $1.pdf }
f () { rm -fv $1.png $1.pdf; djvuize WHITEBOARDOPTS="-m 1.0 -f 45" $1.pdf; xpdf $1.pdf }
f () { rm -fv $1.png $1.pdf; djvuize WHITEBOARDOPTS="-m 0.5" $1.pdf; xpdf $1.pdf }
f () { rm -fv $1.png $1.pdf; djvuize WHITEBOARDOPTS="-m 0.25" $1.pdf; xpdf $1.pdf }
f () { cp -fv $1.png $1.pdf       ~/2023.2-C2/
       cp -fv        $1.pdf ~/LATEX/2023-2-C2/
       cat <<%%%
% (find-latexscan-links "C2" "$1")
%%%
}

f 20201213_area_em_funcao_de_theta
f 20201213_area_em_funcao_de_x
f 20201213_area_fatias_pizza



%  __  __       _        
% |  \/  | __ _| | _____ 
% | |\/| |/ _` | |/ / _ \
% | |  | | (_| |   <  __/
% |_|  |_|\__,_|_|\_\___|
%                        
% <make>

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-LATEXfile "2019planar-has-1.mk")
make -f 2019.mk STEM=2023-2-C2-dirichlet veryclean
make -f 2019.mk STEM=2023-2-C2-dirichlet pdf

% Local Variables:
% coding: utf-8-unix
% ee-tla: "c2di"
% ee-tla: "c2m232dirichlet"
% End: