% (find-LATEX "2022-1-C3-P2.tex")
% (defun c () (interactive) (find-LATEXsh "lualatex -record 2022-1-C3-P2.tex" :end))
% (defun C () (interactive) (find-LATEXsh "lualatex 2022-1-C3-P2.tex" "Success!!!"))
% (defun D () (interactive) (find-pdf-page      "~/LATEX/2022-1-C3-P2.pdf"))
% (defun d () (interactive) (find-pdftools-page "~/LATEX/2022-1-C3-P2.pdf"))
% (defun e () (interactive) (find-LATEX "2022-1-C3-P2.tex"))
% (defun o () (interactive) (find-LATEX "2022-1-C3-P1.tex"))
% (defun u () (interactive) (find-latex-upload-links "2022-1-C3-P2"))
% (defun v () (interactive) (find-2a '(e) '(d)))
% (defun d0 () (interactive) (find-ebuffer "2022-1-C3-P2.pdf"))
% (defun cv () (interactive) (C) (ee-kill-this-buffer) (v) (g))
%          (code-eec-LATEX "2022-1-C3-P2")
% (find-pdf-page   "~/LATEX/2022-1-C3-P2.pdf")
% (find-sh0 "cp -v  ~/LATEX/2022-1-C3-P2.pdf /tmp/")
% (find-sh0 "cp -v  ~/LATEX/2022-1-C3-P2.pdf /tmp/pen/")
%     (find-xournalpp "/tmp/2022-1-C3-P2.pdf")
%   file:///home/edrx/LATEX/2022-1-C3-P2.pdf
%               file:///tmp/2022-1-C3-P2.pdf
%           file:///tmp/pen/2022-1-C3-P2.pdf
% http://angg.twu.net/LATEX/2022-1-C3-P2.pdf
% (find-LATEX "2019.mk")
% (find-sh0 "cd ~/LUA/; cp -v Pict2e1.lua Pict2e1-1.lua Piecewise1.lua ~/LATEX/")
% (find-sh0 "cd ~/LUA/; cp -v Pict2e1.lua Pict2e1-1.lua Pict3D1.lua ~/LATEX/")
% (find-sh0 "cd ~/LUA/; cp -v C2Subst1.lua C2Formulas1.lua ~/LATEX/")
% (find-CN-aula-links "2022-1-C3-P2" "3" "c3m221p2" "c3p2")

% «.defs»		(to "defs")
% «.defs-T-and-B»	(to "defs-T-and-B")
% «.title»		(to "title")
% «.questoes-1-e-2»	(to "questoes-1-e-2")
% «.questoes-1-e-2-gab»	(to "questoes-1-e-2-gab")
% «.questoes-3-e-4»	(to "questoes-3-e-4")
% «.questao-3-gab»	(to "questao-3-gab")
% «.questao-4-gab»	(to "questao-4-gab")
%
% «.djvuize»		(to "djvuize")



% <videos>
% Video (not yet):
% (find-ssr-links     "c3m221p2" "2022-1-C3-P2")
% (code-eevvideo      "c3m221p2" "2022-1-C3-P2")
% (code-eevlinksvideo "c3m221p2" "2022-1-C3-P2")
% (find-c3m221p2video "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")
%
%\usepackage[backend=biber,
%   style=alphabetic]{biblatex}            % (find-es "tex" "biber")
%\addbibresource{catsem-slides.bib}        % (find-LATEX "catsem-slides.bib")
%
% (find-es "tex" "geometry")
\usepackage[a6paper, landscape,
            top=1.5cm, bottom=.25cm, left=1cm, right=1cm, includefoot
           ]{geometry}
%
\begin{document}

\catcode`\^^J=10
\directlua{dofile "dednat6load.lua"}  % (find-LATEX "dednat6load.lua")
%L dofile "Piecewise1.lua"           -- (find-LATEX "Piecewise1.lua")
%L dofile "QVis1.lua"                -- (find-LATEX "QVis1.lua")
%L dofile "Pict3D1.lua"              -- (find-LATEX "Pict3D1.lua")
%L dofile "C2Formulas1.lua"          -- (find-LATEX "C2Formulas1.lua")
%L Pict2e.__index.suffix = "%"
\pu
\def\pictgridstyle{\color{GrayPale}\linethickness{0.3pt}}
\def\pictaxesstyle{\linethickness{0.5pt}}
\def\pictnaxesstyle{\color{GrayPale}\linethickness{0.5pt}}
\celllower=2.5pt

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

\def\u#1{\par{\footnotesize \url{#1}}}

\def\drafturl{http://angg.twu.net/LATEX/2022-1-C3.pdf}
\def\drafturl{http://angg.twu.net/2022.1-C3.html}
\def\draftfooter{\tiny \href{\drafturl}{\jobname{}} \ColorBrown{\shorttoday{} \hours}}

% «defs-T-and-B»  (to ".defs-T-and-B")
% (c3m202p1p 6 "questao-2")
% (c3m202p1a   "questao-2")
\long\def\ColorOrange#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){\ColorOrange{\bf(#1 pts)}}



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

\thispagestyle{empty}

\begin{center}

\vspace*{1.2cm}

{\bf \Large Cálculo 3 - 2022.1}

\bsk

P2 (Segunda prova)

\bsk

Eduardo Ochs - RCN/PURO/UFF

\url{http://angg.twu.net/2022.1-C3.html}

\end{center}

\newpage


% (find-LATEX "edrx21defs.tex" "firstcol-anothercol")
\long\def\anothercol#1{\qquad\quad\firstcol{#1}}

\newpage

% «questoes-1-e-2»  (to ".questoes-1-e-2")
% (c3m221p2p 2 "questoes-1-e-2")
% (c3m221p2a   "questoes-1-e-2")

\scalebox{0.5}{
\def\colwidth{10cm}\firstcol{

  {\bf Questão 1}

  \T(Total: 1.0 pts)

  Digamos que:
  %
  $$\begin{array}{rcl}
      F(x,y) &=& a \\
             &+& bx + cy \\
             &+& dx^2 + exy + fy^2 \\
    \end{array}
  $$

  a) \B(0.2 pts) Calcule $F_x$, $F_y$, $F_{xx}$, $F_{xy}$ e $F_{yy}$
  nos pontos $(x,y)$ e $(0,0)$.

  \ssk

  b) \B(0.8 pts) Mostre como reescrever $F(x,y)$ como
  %
  $$\def\uu{\_\_}
    \begin{array}{rcl}
      F(x,y) &=& \uu \\
             &+& \uu x + \uu y \\
             &+& \uu x^2 +  \uu xy + \uu y^2 \\
    \end{array}
  $$

  onde em cada lacuna você vai pôr uma expressão que depende só das
  derivadas parciais de $F(x,y)$ no ponto $(0,0)$.

}\anothercol{

  {\bf Questão 2}

  \T(Total: 3.0 pts)

  Digamos que:
  %
  $$\begin{array}{rcl}
      G(x_0+Δx,y_0+Δy) &=& a \\
                       &+& bΔx + cΔy \\
                       &+& d(Δx)^2 + eΔxΔy + f(Δy)^2 \\
    \end{array}
  $$

  a) \B(0.6 pts) Calcule $G_x$, $G_y$, $G_{xx}$, $G_{xy}$ e $G_{yy}$
  nos pontos $(x,y)$ e $(0,0)$.

  \ssk

  b) \B(2.4 pts) Mostre como reescrever $G(x,y)$ como
  %
  $$\def\uu{\_\_}
    \begin{array}{rcl}
      G(x,y) &=& \uu \\
             &+& \uu Δx + \uu Δy \\
             &+& \uu Δx^2 +  \uu ΔxΔy + \uu Δy^2 \\
    \end{array}
  $$

  onde em cada lacuna você vai pôr uma expressão que depende só das
  derivadas parciais de $G(x,y)$ no ponto $(x_0,y_0)$.

}}


\newpage

% «questoes-1-e-2-gab»  (to ".questoes-1-e-2-gab")
% (c3m221p2p 3 "questoes-1-e-2-gab")
% (c3m221p2a   "questoes-1-e-2-gab")

{\bf Gabarito das questões 1 e 2}

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

$$\begin{array}{rcl}
  F(x,y)   &=& a + bx + cy + dx^2 + exy + fy^2 \\
  F_x(x,y) &=& b + 2dx + ey \\
  F_{xx}(x,y) &=& 2d \\
  F_{xy}(x,y) &=& e \\
  F_y(x,y) &=& c + ex + 2fy \\
  F_{yx}(x,y) &=& e \\
  F_{yy}(x,y) &=& 2f \\
  \\
  F(0,0)   &=& a \\
  F_x(0,0) &=& b \\
  F_{xx}(0,0) &=& 2d \\
  F_{xy}(0,0) &=& e \\
  F_y(0,0) &=& c \\
  F_{yx}(0,0) &=& e \\
  F_{yy}(0,0) &=& 2f \\
  \\
  F(x,y) &=& F(0,0) \\
         &+& F_x(0,0)x + F_y(0,0)y \\
         &+& \frac12 F_{xx}(0,0)x^2 + F_{xy}(0,0)xy + \frac12 F_{yy}(0,0)y^2 \\
  \\
  \multicolumn{3}{l}{\text{Se $(x_0,y_0)=(0,0)$,}} \\
  z(x,y) &=& z \\
         &+& z_x x + z_y y \\
         &+& \frac12 z_{xx}x^2 + z_{xy}xy + \frac12 z_{yy}y^2 \\
  \end{array}
$$

}\anothercol{

$$\begin{array}{rcl}
  F(x_0+Δx,y_0+Δy)   &=& a + bΔx + cΔy + dΔx^2 + eΔxΔy + fΔy^2 \\
  F_x(x_0+Δx,y_0+Δy) &=& b + 2dΔx + eΔy \\
  F_{xx}(x_0+Δx,y_0+Δy) &=& 2d \\
  F_{xy}(x_0+Δx,y_0+Δy) &=& e \\
  F_y(x_0+Δx,y_0+Δy) &=& c + eΔx + 2fΔy \\
  F_{yx}(x_0+Δx,y_0+Δy) &=& e \\
  F_{yy}(x_0+Δx,y_0+Δy) &=& 2f \\
  \\
  F(x_0,y_0)   &=& a \\
  F_x(x_0,y_0) &=& b \\
  F_{xx}(x_0,y_0) &=& 2d \\
  F_{xy}(x_0,y_0) &=& e \\
  F_y(x_0,y_0) &=& c \\
  F_{yx}(x_0,y_0) &=& e \\
  F_{yy}(x_0,y_0) &=& 2f \\
  \\
  F(x_0+Δx,y_0+Δy) &=& F(x_0,y_0) \\
         &+& F_x(x_0,y_0)Δx + F_y(x_0,y_0)Δy \\
         &+& \frac12 F_{xx}(x_0,y_0)Δx^2 + F_{xy}(x_0,y_0)ΔxΔy + \frac12 F_{yy}(x_0,y_0)Δy^2 \\
  \\
  % \multicolumn{3}{l}{\text{Se $(x_0,y_0)=(0,0)$,}} \\
  z(x_0+Δx,y_0+Δy) &=& z \\
         &+& z_x Δx + z_y Δy \\
         &+& \frac12 z_{xx}Δx^2 + z_{xy}ΔxΔy + \frac12 z_{yy}Δy^2 \\
  \end{array}
$$


}}


\newpage

% «questoes-3-e-4»  (to ".questoes-3-e-4")
% (c3m221p2p 4 "questoes-3-e-4")
% (c3m221p2a   "questoes-3-e-4")

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

{\bf Questão 3}

\T(Total: 5.0 pts)

\ssk

Seja $H(x,y) = \sqrt{x^2 + 3y^2}$ e seja $(x_0,y_0)=(1,1)$.

Encontre as aproximações de Taylor de ordem 1 e 2 para
$H(x_0+Δx,y_0+Δy)$.

\bsk
\bsk
\bsk

{\bf Questão 4}

\T(Total: 1.0 pts)

\ssk

Seja $M(x_0+Δx,y_0+Δy) = Δx(Δx+Δy)$.

Digamos que $(x_0,y_0) = (4,3)$.

Faça o diagrama de numerozinhos da $M(x,y)$ nos pontos com
$Δx,Δy∈\{-2,-1,-0,1,2\}$.

}\anothercol{
}}


\newpage

% «questao-3-gab»  (to ".questao-3-gab")
% (c3m221p2p 5 "questao-3-gab")
% (c3m221p2a   "questao-3-gab")

% (setq eepitch-preprocess-regexp "^")
% (setq eepitch-preprocess-regexp "^%T ")
%
%T  (eepitch-maxima)
%T  (eepitch-kill)
%T  (eepitch-maxima)
%T H   : sqrt(x^2 + 3*y^2);
%T Hx  : diff(H,  x);
%T Hy  : diff(H,  y);
%T Hxx : diff(Hx, x);
%T Hxy : diff(Hx, y);
%T Hyy : diff(Hy, y);
%T rat(Hyy);
%T s   : sqrt(x^2 + 3*y^2);
%T Hx_  : x / s;
%T Hy_  : 3*y / s;
%T Hxx_ : (s^2 - x^2) / s^3;
%T Hxy_ : -3*x*y / s^3;
%T Hyy_ : (3*s^2 - 9*y^2) / s^3;
%T V  : [H, Hx,  Hy,  Hxx,  Hxy,  Hyy];
%T V_ : [H, Hx_, Hy_, Hxx_, Hxy_, Hyy_];
%T V-V_;
%T subst([x=1.23, y=4.56], V-V_);
%T rat(V-V_);
%T rat(Hyy-Hyy_);
%T rat([Hxy, Hyy]);
%T rat([Hx, Hx_]);
%T rat([Hxx, Hxx_]);
%T rat(Hxx - Hxx_);
%T subst([x=1.23, y=4.56], [Hxx, Hxx_]);
%T [x0,y0] : [1,1];
%T foo(sym) := [sym, rat(ev(sym)), subst([x=x0,y=y0],ev(sym))];
%T foo('H);
%T foo('Hx);
%T foo('Hy);
%T foo('Hxx);
%T foo('Hxy);
%T foo('Hyy);
%T [H0, Hx0, Hy0, Hxx0, Hxy0, Hyy0] : subst([x=x0,y=y0], [H, Hx, Hy, Hxx, Hxy, Hyy]);
%T H1 : H0 + Hx0*Dx + Hy0*Dy;
%T H2 : H0 + Hx0*Dx + Hy0*Dy + Hxx0*Dx^2/2 + Hxy0*Dx*Dy + Hyy0*Dy^2;



\newpage

{\bf Questão 3: gabarito}


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

Seja $H(x,y) = \sqrt{x^2 + 3y^2} = S$.

Então:
%
$$\begin{array}{rclrcl}
  H(x,y)      &=&           S       & H(x_0,y_0)      &=& 2 \\
  H_x(x,y)    &=&           x / S   & H_x(x_0,y_0)    &=& 1/2 \\
  H_y(x,y)    &=&          3y / S   & H_y(x_0,y_0)    &=& 3/2 \\
  H_{xx}(x,y) &=&   (S^2-x^2) / S^3 & H_{xx}(x_0,y_0) &=& 3/8 \\
  H_{xy}(x,y) &=&        -3xy / S^3 & H_{xy}(x_0,y_0) &=& -3/8 \\
  H_{yy}(x,y) &=& (3S^2-9y^2) / S^3 & H_{yy}(x_0,y_0) &=& 3/8 \\
  \end{array}
$$

Aproximação de Taylor de 1a ordem:
%
$$\begin{array}{rcl}
  H(x_0+Δx,y_0+Δy) &≈& H(x_0,y_0) \\
                   &+& H_x(x_0,y_0)Δx + H_y(x_0,y_0)Δy \\
                   &=& 2 \\
                   &+& \frac12 Δx + \frac32 Δy \\
  \end{array}
$$

Aproximação de Taylor de 2a ordem:
%
$$\begin{array}{rcl}
  H(x_0+Δx,y_0+Δy) &≈& H(x_0,y_0) \\
         &+& H_x(x_0,y_0)Δx + H_y(x_0,y_0)Δy \\
         &+& \frac12 H_{xx}(x_0,y_0)Δx^2 + H_{xy}(x_0,y_0)ΔxΔy + \frac12 H_{yy}(x_0,y_0)Δy^2 \\
         &=& 2 \\
         &+& \frac12 Δx + \frac32 Δy \\
         &+& \frac3{16} Δx^2 - \frac3{8} ΔxΔy + \frac3{16} Δy^2 \\
  \end{array}
$$


}\anothercol{
}}

\newpage

% «questao-4-gab»  (to ".questao-4-gab")
% (c3m221p2p 6 "questao-4-gab")
% (c3m221p2a   "questao-4-gab")
% (c3m221fhp 7 "exercicio-5")
% (c3m221fha   "exercicio-5")

{\bf Questão 4: gabarito}

%L Pict2e.bounds = PictBounds.new(v(0,0), v(6,5))
%L x0,y0 = 4,3
%L nff = function (str)
%L     return Code.vc("x,y => local Dx,Dy = x-x0,y-y0; return "..str)
%L   end
%L p = Numerozinhos.fromf(v(x0-2,y0-2),v(x0+2,y0+2), nff "Dx*(Dx+Dy)")
%L p:pgat("pN"):preunitlength("11pt"):sa("Questao 4 gab"):output()
\pu

$$\ga{Questao 4 gab}$$




% (c3m221fha "title")
% (c3m221fha "title" "Aula 29: funções homogêneas")

% Funções homogêneas:
% fora da origem
% diagrama de numerozinhos
% demonstrar homogeneidade
% Taylor de ordem 2

% (c3m221tudop 2 "parts")
% (c3m221tudoa   "parts")
% (find-pdf-page "~/2022.1-C3/C3-quadros.pdf" 23)



\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 "~/2022.1-C3/")
# (find-fline "~/LATEX/2022-1-C3/")
# (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       ~/2022.1-C3/
       cp -fv        $1.pdf ~/LATEX/2022-1-C3/
       cat <<%%%
% (find-latexscan-links "C3" "$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=2022-1-C3-P2 veryclean
make -f 2019.mk STEM=2022-1-C3-P2 pdf

% Local Variables:
% coding: utf-8-unix
% ee-tla: "c3p2"
% ee-tla: "c3m221p2"
% End:
