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

% «.gab-2»	(to "gab-2")

\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{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
\pu

\def\V(#1){\VEC{#1}}





%   ____      _                    _ _           
%  / ___|__ _| |__   ___  ___ __ _| | |__   ___  
% | |   / _` | '_ \ / _ \/ __/ _` | | '_ \ / _ \ 
% | |__| (_| | |_) |  __/ (_| (_| | | | | | (_) |
%  \____\__,_|_.__/ \___|\___\__,_|_|_| |_|\___/ 
%                                                

{\setlength{\parindent}{0em}
\footnotesize
\par Geometria Analítica
\par PURO-UFF - 2017.1
\par VR - 18/jul/2017 - Eduardo Ochs
\par Respostas sem justificativas não serão aceitas.
\par Proibido usar quaisquer aparelhos eletrônicos.

}

\bsk
\bsk

{
\setlength{\parindent}{0em}
\def\T(Total: #1 pts){{\bf(Total: #1 pts)}}
\def\T(Total: #1 pts){{\bf(Total: #1)}}
\def\B       (#1 pts){{\bf(#1 pts)}}
% Usage:
% 1) \T(Total: 2.34 pts) Foo
% a) \B(0.45 pts) Bar



% (find-angg "LATEX/2015-2-GA-P2.tex")



% (find-angg "LATEX/2015-2-GA-P2.tex")

1) \T(Total: 2.5 pts) Sejam $A=(-5,0)$, $B=(5,0)$, $\vv_m=\VEC{1,m}$,
$\ww_m=\VEC{1,-1/m}$, $r_m=\setofst{A+t\vv_m}{t∈\R}$,
$s_m=\setofst{A+t\ww_m}{t∈\R}$, $P_m=r_m∩s_m$.
$C_α=\setofxyst{x^2+y^2=α}$.

a) \B(0.2 pts) Represente graficamente $A, B, r_1, s_1, P_1$.

b) \B(0.3 pts) Represente graficamente $A, B, r_2, s_2, P_2$.

c) \B(1.0 pts) Dê as coordenadas de $P_m$ para $m=1,2,3,-1,-2,-3,
\frac12, \frac13, -\frac12, -\frac13$.

d) \B(1.0 pts) Para que valor de $α$ o círculo $C_α$ fica tangente a
$r_2$?

\bsk
\bsk

2) \T(Total: 3.0 pts) Faça esboços das cônicas com as equações abaixo.
Algumas delas são degeneradas. Em todos os itens abaixo considere que
$u=(x-4)/2$ e $v=y-x/2$ --- ou que $u$ e $v$ são {\sl abreviações} para
$(x-4)/2$ e $y-x/2$.
%
$$
\begin{tabular}[t]{rl}
  a) (0.5 pts) & $u(u-1)=0$  \\
  b) (0.5 pts) & $v(v-1)=0$  \\[4pt]
  c) (0.2 pts) & $u^2+v^2=0$ \\
  d) (0.3 pts) & $u^2+v^2=1$ \\[4pt]
\end{tabular}
\quad
\begin{tabular}[t]{rl}
  e) (0.2 pts) & $uv=0$      \\
  f) (0.4 pts) & $uv=1$      \\
  g) (0.4 pts) & $uv=-1$     \\[4pt]
  h) (0.5 pts) & $u^2=v$     \\
  i) (0.5 pts) & $u=v^2$     \\
\end{tabular}
$$


\bsk


3) \T(Total: 5.5 pts) Sejam $π=\setofxyzst{2x+2y+z=4}$, $O=(0,0,0)$ e
$r=\setofst{(1,2,3)+t\VEC{2,1,0}}{t∈\R}$.

a) \B(0.2 pts) Dê as coordenadas do ponto $F∈π∩r$.

b) \B(1.0 pts) Encontre o ponto $G∈r$ mais próximo do ponto $(0,0,0)$.

c) \B(1.0 pts) Encontre o ponto $H∈π$ mais próximo do ponto $(0,0,0)$.

d) \B(1.0 pts) Calcule $d(π,(0,0,0))$ usando `$×$'.

e) \B(0.3 pts) Verifique se os resultados dos seus itens (b) e (c) são coerentes.

f) \B(1.0 pts) Dê a equação de um plano $π'$ paralelo a $π$ e tal que $d(π,π')=1$.

g) \B(0.5 pts) Encontre um ponto $J∈r$ tal que $d(π,J)=1$.

h) \B(0.5 pts) Encontre um ponto $K∈r$ tal que $d(π,K)=2$.




\newpage

{\bf Gabarito:} (não revisado)

\bsk

%  _ 
% / |
% | |
% | |
% |_|
%    

1a) (desenho)

1b) (desenho)

1c) $P_1=(0,5)$,
    $P_2=(3,4)$,
    $P_3=(4,3)$,

    $P_{-1}=(0,-5)$,
    $P_{-2}=(3,-4)$,
    $P_{-3}=(4,-3)$,

    $P_{1/2}=(-3,4)$,
    $P_{1/3}=(-4,3)$,

    $P_{-1/2}=(-3,-4)$,
    $P_{-1/3}=(-4,-3)$.

1d) $α=20$

\bsk

%  ____  
% |___ \ 
%   __) |
%  / __/ 
% |_____|
%        
% «gab-2» (to ".gab-2")

\unitlength=5pt
\def\closeddot{\circle*{0.6}}

\def\pictpoint#1{\put(#1){\closeddot}}
\def\pictline#1{{\linethickness{1.0pt}\expr{Line.new(#1):pict()}}}
\def\pictlinethin#1{{\linethickness{0.2pt}\expr{Line.new(#1):pict()}}}
\def\pictLine(#1)(#2)#3{%
  \vcenter{\hbox{%
   \beginpicture(#1)(#2)%
   \pictaxes%
   \pictline{#3}
   \end{picture}%
  }}%
 }

\def\pictellipse#1{{\linethickness{1.0pt}\expr{Ellipse.new(#1):pict()}}}
\def\pictEllipse(#1)(#2)#3{%
  \vcenter{\hbox{%
   \beginpicture(#1)(#2)%
   \pictaxes%
   \pictellipse{#3}
   \end{picture}%
  }}%
 }
\def\pictEllipseF(#1)(#2)#3(#4)(#5){%
  \vcenter{\hbox{%
   \beginpicture(#1)(#2)%
   \pictaxes%
   \pictellipse{#3}
   \put(#4){\closeddot}
   \put(#5){\closeddot}
   \end{picture}%
  }}%
 }

\def\picthyperbole#1#2{{\linethickness{1.0pt}\expr{Hyperbole.new(#1):pict(#2)}}}
\def\pictparabola #1#2{{\linethickness{1.0pt}\expr{Parabola .new(#1):pict(#2)}}}

\def\mygrid{
   \pictlinethin{v(2, 0), v(0, 1), -1.5, 3}  % u = -1
   \pictlinethin{v(4, 0), v(0, 1), -0.5, 4}  % u = 0
   \pictlinethin{v(6, 0), v(0, 1),  0.5, 5}  % u = 0
   \pictlinethin{v(0, 1), v(1,.5), -2,   8}  % v = 1
   \pictlinethin{v(0, 0), v(1,.5), -2,   8}  % v = 0
   \pictlinethin{v(0,-1), v(1,.5), -2,   8}  % v = -1
}





2a)                                   % a) u(u-1)=0
$\vcenter{\hbox{%
   \beginpicture(-2,-2)(8,5)%
   \pictaxes%
   \mygrid
   \pictline{v(4, 0), v(0,1), -0.5, 4}  % u = 0
   \pictline{v(6, 0), v(0,1),  0.5, 5}  % u = 1
   \end{picture}%
 }}$
\;
2b)                                   % b) v(v-1)=0
$\vcenter{\hbox{%
   \beginpicture(-2,-2)(8,5)%
   \pictaxes%
   \mygrid
   \pictline{v(0, 0), v(1, .5), -2, 8}  % v = 0
   \pictline{v(0, 1), v(1, .5), -2, 8}  % v = 1
   \end{picture}%
 }}$
\;
2c)                                   % c) u^2+v^2=0
$\vcenter{\hbox{%
   \beginpicture(-2,-2)(8,5)%
   \pictaxes%
   \mygrid
   \put(4,2){\closeddot}
   \end{picture}%
 }}$
\;
2d)                                   % d) u^2+v^2=1
$\vcenter{\hbox{%
   \beginpicture(-2,-2)(8,5)%
   \pictaxes%
   \mygrid
   \pictellipse{v(4,2), v(2,1), v(0,1)}
   % \picthyperbole{v(2,-2), v(1,0), v(-1,1), 1}{10, -4, -1/2, 1/4, 4}
   % \put(2,-2){\closeddot}
   % \pictline{v(0,-2), v(1,0), -1, 5}  % y-2 = 0
   % \pictline{v(0, 0), v(1,-1), -2, 4}  % x+y = 0
   \end{picture}%
 }}$

\msk

2e)                                    % e) uv=0
$\vcenter{\hbox{%
   \beginpicture(-2,-2)(8,5)%
   \pictaxes%
   \mygrid
   \pictline{v(4, 0), v(0,1), -0.5, 4}  % u = 0
   \pictline{v(0, 0), v(1,.5), -2, 8}   % v = 0
   \end{picture}%
 }}$
\quad
2f)                                    % f) uv=1
$\vcenter{\hbox{%
   \beginpicture(-2,-2)(8,5)%
   \pictaxes%
   \mygrid
   \picthyperbole{v(4,2), v(2,1), v(0,1), 1}{10, -3, -1/3, 1/3, 3}
   \end{picture}%
 }}$
\;
2g)                                    % g) uv=-1
$\vcenter{\hbox{%
   \beginpicture(-2,-2)(8,5)%
   \pictaxes%
   \mygrid
   \picthyperbole{v(4,2), v(-2,-1), v(0,1), 1}{10, -3, -1/3, 1/3, 3}
   \end{picture}%
 }}$

2h)                                    % h) u^2=v
$\vcenter{\hbox{%
   \beginpicture(-2,-2)(8,5)%
   \pictaxes%
   \mygrid
   \pictparabola{v(4,2), v(2,1), v(0,1), 2}{10, -1.6, 1.4}
   \end{picture}%
 }}$
\;
2i)
$\vcenter{\hbox{%
   \beginpicture(-2,-2)(8,5)%
   \pictaxes%
   \mygrid
   \pictparabola{v(4,2), v(0,1), v(2,1), 2}{10, -1.4, 1.4}
   % \pictellipse{v(4,6), v(2,0), v(0,3)}
   \end{picture}%
 }}$

 
\bsk

3) Sejam $\nn=\VEC{2,2,1}$, $\nn'=\VEC{\frac23,\frac23,\frac13}$,
$A=(1,2,3)$, $\vv=\VEC{2,1,0}$.

3a) $\begin{array}[t]{l}
     F=(1+2t, 2+t, 3), \\
     F∈π \quad⇒\quad 2(1+2t) + 2(2+t) + 3 = 4
          \quad⇒\quad 9 + 6t = 4 \\
     ⇒\quad t = -\frac 56 \quad⇒\quad F=(1-2\frac56, 2-\frac56, 3)=(-\frac46, \frac76, 3) \\
     \end{array}
    $

3b) $\begin{array}[t]{rcl}
       \Pr_\vv \Vec{AO}
       &=& \Pr_{\VEC{2,1,0}} \VEC{-1,-2,-3} \\
       &=& \frac{\VEC{2,1,0}·\VEC{-1,-2,-3}}{\VEC{2,1,0}·\VEC{2,1,0}} \VEC{2,1,0} \\
       &=& -\frac45 \VEC{2,1,0} \\
       &=& \VEC{-\frac85, -\frac45, 0} \\
     G &=& A + \Pr_\vv \Vec{AO} \\
       &=& (1,2,3) + \VEC{-\frac85, -\frac45, 0} \\
       &=& (-\frac35, \frac65, 3) \\
     \end{array}
    $

Repare que $\Vec{GO} = \VEC{\frac35, -\frac65, -3}$ é ortogonal a $\vv$.
       
3c) Seja $s = \setofst{O+t\nn}{t∈\R} = \setofst{(2t,2t,t)}{t∈\R}$;
$O∈s$ e $s⊥π$. Seja $H∈s∩s$; $(2t,2t,t)∈π$ quando $9t=4 \;⇒\;
t=\frac49 \;⇒\; H=(\frac89, \frac89, \frac49)$.

3d) Sejam $A=(2,0,0)$, $B=(0,2,0)$, $C=(0,0,4)$; $A,B,C∈π$. Sejam
$\uu=\Vec{AB}=\VEC{-2,2,0}$, $\vv=\Vec{AC}=\VEC{-2,0,4}$,
$\ww=\Vec{AO}=\VEC{-2,0,0}$. Então $\uu×\vv = \VEC{8,8,4}$,
$\area(\uu,\vv) = ||\uu×\vv|| = 12$, $|[\uu,\vv,\ww]| = \vsm{-2 & 2 &
  0 \\ -2 & 0 & 4 \\ -2 & 0 & 0} = -16$,
$\frac{|[\uu,\vv,\ww]|}{\area(\uu,\vv)} = \frac{-16}{12} = -\frac43$,
$d(π,O) = |-\frac43| = \frac43$.

3e) $d(H,O) = ||\VEC{-\frac89, -\frac89, -\frac49}|| = ||\frac19
\VEC{8, 8, 4}|| = \frac19 ||\VEC{8, 8, 4}|| = \frac{12}{9} = \frac43$;
ou seja, $d(H,O)=d(π,O)$.

\newpage

%  _____  __               _     
% |___ / / _|   __ _  __ _| |__  
%   |_ \| |_   / _` |/ _` | '_ \ 
%  ___) |  _| | (_| | (_| | |_) |
% |____/|_|    \__, |\__,_|_.__/ 
%              |___/             

3f) O modo mais rápido é aproveitar que
$\nn'=\VEC{\frac23,\frac23,\frac13}$ é um vetor normal a $π$ com
$||\nn'|| = 1$. Como $A=(2,0,0)∈π$, $d(A+\nn',π) = d(A-\nn',π) = 1$;
generalizando: $d(A+k\nn',π) = ||k\nn'|| = |k|$.

{\sl Vou fazer umas contas que vão resolver este item e os próximos
  dois de uma vez só.}

Seja $A_k = A+k\nn' = (2,0,0)+k\VEC{\frac23,\frac23,\frac k3} =
(\frac{6+2k}{3}, \frac{2k}{3}, \frac k3)$. As soluções deste item são o
plano paralelo a $π$ que contêm $A_1$ e o plano paralelo a $π$ que
contém $A_{-1}$. Os planos paralelos a $π$ são da forma
$\setofxyzst{2x+2y+z=α}$, então vamos definir
$π_α=\setofxyzst{2x+2y+z=α}$; repare que $π=π_4$, $A=A_0$,
$A_0∈π_4$.
%
$$\begin{array}{rcl}
   (x,y,z) ∈ π_α &⇒& α = 2x+2y+z \\
       A_k ∈ π_α &⇒& α = 2\frac{6+2k}{3} + 2\frac{2k}{3} + \frac k3 \\
                  &⇒& α = \frac{12+4k+4k+k}{3} = \frac{12+9k}{3} = 4+3k \\
                  &⇒& π_α = \setofxyzst{2x+2y+z=4+3k}, \\
        A_1∈π_α &⇒& π_α = \setofxyzst{2x+2y+z=7}, \\
     A_{-1}∈π_α &⇒& π_α = \setofxyzst{2x+2y+z=1}. \\
  \end{array}
$$

3g) Seja $R_t = (1,2,3)+t\VEC{2,1,0} = (1+2t, 2+t, 3)$. Temos:
%
$$\begin{array}{rcl}
   R_t∈π_α &⇒& (1+2t, 2+t, 3)∈π_α \\
            &⇒& α = 2(1+2t) + 2(2+t) + 3 = 2+4t+4+2t+3 = 9+6t \\
            &⇒& t = \frac{α-9}{6} \\
            &⇒& R_t = (1+2\frac{α-9}{6}, 2+\frac{α-9}{6}, 3) 
                     = (\frac{6+2α-9}{6}, \frac{12+α-9}{6}, 3) \\
            &⇒& r∩π_α = R_t = (\frac{2α-3}{6}, \frac{α+3}{6}, 3) \\
  \end{array}
$$
%
As soluções são
%
$$\begin{array}{rcl}
  r∩π_7 &=& (\frac{2·7-3}{6}, \frac{7+3}{6}, 3) = (\frac{11}{6}, \frac{10}{6}, 3), \\
  r∩π_1 &=& (\frac{2·1-3}{6}, \frac{1+3}{6}, 3) = (\frac{-1}{6}, \frac{4}{6}, 3). \\
  \end{array}
$$

3f) As soluções são
%
$$\begin{array}{rcl}
  r∩π_{10} &=& (\frac{2·  10-3}{6}, \frac{10+3}{6}, 3) = (\frac{17}{6}, \frac{13}{6}, 3), \\
  r∩π_{-2} &=& (\frac{2·(-2)-3}{6}, \frac{-2+3}{6}, 3) = (\frac{-7}{6}, \frac {1}{6}, 3). \\
  \end{array}
$$




\bsk
\bsk
\bsk

Obs: se $π=\setofst{A + t\uu + t'\vv}{t,t'∈\R}$ então:

$d(π,A+\ww) = \left| \frac{|[\uu,\vv,\ww|}{||\uu×\vv||} \right|
            = \left| \frac{(\uu×\vv)·\ww}{||\uu×\vv||} \right|
            = \frac{|(\uu×\vv)·\ww|}{||\uu×\vv||}$.

Usando o $\uu$ e o $\vv$ do item 3d, temos $\uu×\vv=\VEC{8,8,4}$ e

$d(π,A+\ww) = \frac{|\VEC{8,8,4}·\ww|}{12} = \frac{|\VEC{2,2,1}·\ww|}{3}$.

Isto também vale para planos paralelos a $π$:

se $π_α=\setofxyzst{2x+2y+z=α}$ e $(x_0,y_0,z_0)∈π_α$ então

$d(π_α,A_α+\ww) = \frac{|\VEC{2,2,1}·\ww|}{3}$,

$d(π_α,(x,y,z)) = \frac{|\VEC{2,2,1}·\VEC{x-x_0, y-y_0, z-z_0}|}{3}$.





% 
% 
%  $π_α = \setofxyzst{2x+2y+z=α}$. A interseção de $r$ com $π_α$ é:
% 
% $$\begin{array}{rcl}
%   (1+2t, 2+t, 3) ∈ π_α &=& 2(1+2t) + 2(2+t) + 3 = α \\
%                         &=& 2 + 4t + 4 + 2t + 3 = α \\
%                         &=& 6t + 9 = α \\
%                         &=& t = \frac{α-9}{6} \\
%          (1+2t, 2+t, 3) &=& (1+2\frac{α-9}{6}, 2+\frac{α-9}{6}, 3) \\
%                         &=& (\frac{-3+2α}{6}, \frac{3+α}{6}, 3) \\
%                 r∩π_α &=& (\frac{-3+2α}{6}, \frac{3+α}{6}, 3) \\
%   \end{array}
% $$
% 

% 
% 
% 
% \newpage
% 
% 
% \bsk
% \bsk
% 




\end{document}

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