% (find-LATEX "2018-2-C2-P1.tex")
% (defun c () (interactive) (find-LATEXsh "lualatex -record 2018-2-C2-P1.tex" :end))
% (defun C () (interactive) (find-LATEXSH "lualatex 2018-2-C2-P1.tex" "Success!!!"))
% (defun D () (interactive) (find-pdf-page      "~/LATEX/2018-2-C2-P1.pdf"))
% (defun d () (interactive) (find-pdftools-page "~/LATEX/2018-2-C2-P1.pdf"))
% (defun e () (interactive) (find-LATEX "2018-2-C2-P1.tex"))
% (defun u () (interactive) (find-latex-upload-links "2018-2-C2-P1"))
% (defun v () (interactive) (find-2a '(e) '(d)))
% (defun cv () (interactive) (C) (ee-kill-this-buffer) (v) (g))
% (defun d0 () (interactive) (find-ebuffer "2018-2-C2-P1.pdf"))
%          (code-eec-LATEX "2018-2-C2-P1")
% (find-pdf-page   "~/LATEX/2018-2-C2-P1.pdf")
% (find-sh0 "cp -v  ~/LATEX/2018-2-C2-P1.pdf /tmp/")
% (find-sh0 "cp -v  ~/LATEX/2018-2-C2-P1.pdf /tmp/pen/")
%   file:///home/edrx/LATEX/2018-2-C2-P1.pdf
%               file:///tmp/2018-2-C2-P1.pdf
%           file:///tmp/pen/2018-2-C2-P1.pdf
% http://angg.twu.net/LATEX/2018-2-C2-P1.pdf
% (find-LATEX "2019.mk")

% «.gab-1»		(to "gab-1")
% «.gab-2»		(to "gab-2")
% «.gab-3»		(to "gab-3")
% «.gab-4»		(to "gab-4")
% «.gab-5»		(to "gab-5")
% «.gabarito-maxima»	(to "gabarito-maxima")

\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
\catcode`\^^J=10                      % (find-es "luatex" "spurious-omega")
\directlua{dofile "dednat6load.lua"}  % (find-LATEX "dednat6load.lua")
\def\expr#1{\directlua{output(tostring(#1))}}
\def\eval#1{\directlua{#1}}
%
\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



{\setlength{\parindent}{0em}
\footnotesize
\par Cálculo 2
\par PURO-UFF - 2018.2
\par P1 - 12/nov/2018 - 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


% \bsk
% \bsk

% (c2q)

1) \T(Total: 2.0 pts) Calcule $$\intx {(\sen x)^4(\cos x)^2}.$$

\bsk

2) \T(Total: 2.0 pts) Calcule $$\intx {\frac{x^2}{\sqrt{4x^2 - 9}}}.$$

\bsk

3) \T(Total: 2.0 pts) Calcule $$\intx {\frac{x^3}{x^2 + 7x + 12}}.$$

\bsk

4) \T(Total: 2.0 pts) Calcule $$\intx {\frac{x^4}{(x-3)^2}}.$$

\bsk

5) \T(Total: 2.0 pts) Calcule por integração por partes:

a) \B(1.0 pts) $\intx {1·\ln x}$,

b) \B(1.0 pts) $\intx {x·\ln x}$.


\bsk
\bsk

Algumas definições, fórmulas e substituições:

$\begin{array}[t]{l}
 c = \cos θ \\
 s = \sen θ \\
 t = \tan θ \\
 z = \sec θ \\
 E = e^{iθ} \\
 \end{array}
 %
 \begin{array}[t]{l}
 c^2+s^2=1 \\
 z^2=t^2+1 \\
 \sqrt{1-s^2} = c \\
 \sqrt{t^2+1} = z \\
 \sqrt{z^2-1} = t \\
 \end{array}
 %
 \begin{array}[t]{l}
 \frac{ds}{dθ} = c \\
 \frac{dc}{dθ} = -s \\
 \frac{dt}{dθ} = z^2 \\
 \frac{dz}{dθ} = zt \\
 \end{array}
 %
 \begin{array}[t]{l}
 E = c+is \\
 c = \frac{E+E¹}{2} \\
 s = \frac{E-E¹}{2i} \\
 e^{ikθ} + e^{-ikθ} = 2 \cos kθ \\
 e^{ikθ} - e^{-ikθ} = 2i \sen kθ \\
 \end{array}
$


\newpage

{\bf Gabarito}

% «gab-1» (to ".gab-1")
% (find-es "ipython" "2018.2-C2-P1")

1) $\begin{array}[t]{l}
    (\senθ)^4 = \left(\frac{E-E¹}{2i}\right)^4
              = \frac{1}{16} (E^4 - 4E^2 + 6 - 4E^{-2} + E^4) \\
    (\cosθ)^2 = \left(\frac{E+E¹}{2}\right)^2
              = \frac{1}{4} (E^2 + 2 + E^{-2}) \\
    (\senθ)^4 (\cosθ)^2 = \frac{1}{64} \begin{array}[t]{lrrrrrrrrr}
       ( & E^6 & -4E^4 & +6E^2 &  -4 &  +E^{-2} \\
         &     & +2E^4 & -8E^2 & +12 & -8E^{-2} & +2E^{-4} \\
         &     &       &  +E^2 &  -4 & +6E^{-2} & -4E^{-4} & +E^{-6} & ) \\
       \end{array} \\
       \phantom{mmmmmmm.} = \frac{1}{64}
         (E^6 -2E^4 -E^2 +4 -E^{-2} -2E^{-4} +E^{-6}) \\
       \phantom{mmmmmmm.} = \frac{1}{64}
         ((E^6+E^{-6}) -2(E^4+E^{-4}) -(E^2+E^{-2}) +4) \\
       \phantom{mmmmmmm.} = \frac{1}{64}
         (2\cos6θ -4\cos4θ -2\cos2θ +4) \\[5pt]
    \intth {(\senθ)^4 (\cosθ)^2} =
         \frac{2}{64·6} \sen6θ
       + \frac{4}{64·4} \sen4θ
       - \frac{2}{64·2} \sen2θ
       + \frac{4}{64} θ \\
    \end{array}
   $

\bsk

% «gab-2» (to ".gab-2")
% (find-es "ipython" "2018.2-C2-P1")

\def\t{\textstyle}
\def\d{\displaystyle}

2) $\begin{array}[t]{rcl}
    \d \intx {\frac{x^2}{\sqrt{4x^2-9}}}
     &=& \d \intx {\frac{x^2}{3\sqrt{\frac{4}{9}x^2-1}}} \\
     &=& \d \intx {\frac{x^2}{3\sqrt{(\frac{2}{3}x)^2-1}}} 
         \quad \subst{\frac23x=z \\ x=\frac32z \\ dx=\frac32dz} \\
     &=& \d \intz {\frac{(\frac{3}{2}z)^2}{3\sqrt{z^2-1}} \textstyle \frac32} \\
     &=& \d \frac98 \intz {\frac{z^2}{\sqrt{z^2-1}}} 
          \quad \subst{z=\secθ=\frac1c \\ \sqrt{z^2-1}=\tanθ=\frac sc \\ dz=ztdθ=\frac{s}{c^2}dθ} \\
     &=& \d \frac98 \intth {\frac{c^{-2}}{sc^{-1}} \textstyle{s}{c^{-2}}} \\
     &=& \d \frac98 \intth {c^{-3}} \\
     &=& \d \frac98 \intth {c^{-4}\,c}
           \quad \subst{c^2 = 1-s^2 \\ c\,dθ=ds} \\
     &=& \d \frac98 \ints {\frac{1}{(1-s^2)^2}} \\
     &=& \d \frac98 \ints {\frac{1}{(s^2-1)^2}} \\
     &=& \d \frac98 \ints {\frac{1}{(s+1)^2(s-1)^2}} \\
     &=& \d \frac98 \ints {\frac14 \left(\frac{1}{s+1} + \frac{1}{(s+1)^2} + \frac{1}{s-1} + \frac{1}{(s-1)^2} \right)} \\
     &=& \d \frac9{32} \left(\ln|s+1| - \frac{1}{s+1} + \ln|s-1| - \frac{1}{s-1} \right) \\
     &=& \d \frac9{32} \def\s{{\t\frac1z}}
         \left(\ln|\s+1| - \frac{1}{\s+1} + \ln|\s-1| - \frac{1}{\s-1} \right) \\
     &=& \d \frac9{32} \def\s{{\t\frac3{2x}}}
         \left(\ln|\s+1| - \frac{1}{\s+1} + \ln|\s-1| - \frac{1}{\s-1} \right) \\
    \end{array}
   $

% In [11]: f  = 1 / ((s**2 - 1)**2)
% In [12]: fa = apart(f, s)
% In [13]: fa
% Out[13]: 
%     1           1            1           1     
% --------- + ---------- - --------- + ----------
% 4*(s + 1)            2   4*(s - 1)            2
%             4*(s + 1)                4*(s - 1) 
% 
% In [14]: Fa = integrate(fa, s)
% 
% In [15]: Fa
% Out[15]: 
%      s       log(s - 1)   log(s + 1)
% - -------- - ---------- + ----------
%      2           4            4     
%   2*s  - 2                          


% http://angg.twu.net/LATEX/2018-1-C2-P1.pdf

\newpage

% «gab-3» (to ".gab-3")
% (find-es "ipython" "2018.2-C2-P1")

3) $\begin{array}[t]{lll}
    \d \intx {\frac{x^3}{x^2 + 7x + 12}} 
      &=& \d \intx {x - 7 + \frac{37x + 84}{(x+3)(x+4)}} \\
      &=& \d \intx {x - 7 - \frac{27}{x+3} + \frac{64}{x+4}} \\
      &=& \d \frac{x^2}{2} - 7x - 27\ln|x+3| + 64\ln|x+4| \\
    \end{array}
   $

\bsk


% «gab-4» (to ".gab-4")
% (find-es "ipython" "2018.2-C2-P1")

\def\und#1#2{\underbrace{#1}_{#2}}
\def\t{\textstyle{}}

4) $\begin{array}[t]{lll}
    \d \intx {\frac{x^4}{(x-3)^2}} \subst{u=x-3 \\ x=u+3 \\ dx=du} \\
      = \;\;\; \d \intu {\frac{(u+3)^4}{u^2}} \\
      = \;\;\; \d \intu {\frac{u^4 + 4·u^3·3 + 6·u^2·9 + 4·u·27 + 81}{u^2}} \\
      = \;\;\; \d \intu {\frac{u^4 + 12u^3 + 54u^2 + 108u + 81}{u^2}} \\
      = \;\;\; \d \intu {u^2 + 12u + 54 + \frac{108}{u} + \frac{81}{u^2}} \\
      = \;\;\; \d \frac{u^2}{3} + 6u^2 + 54u + 108 \ln|u| - \frac{81}{u} \\
      = \;\;\; \d \def\u{x-3}
                  \frac{(\u)^2}{3} + 6(\u)^2 + 54(\u) + 108 \ln|\u| - \frac{81}{\u} \\
    \end{array}
   $



\bsk

% «gab-5» (to ".gab-5")
% (find-es "ipython" "2017.1-C2-P1")

5a)
$\intx {\und{1}{f'}·\und{\ln x}{g}}
 = \und{x}{f}·\und{\ln x}{g} - \intx {\und{x}{f}·\und{\t\frac1x}{g'}}
 = x\ln x - \intx {1}
 = x\ln x - x
$

5b)
$\intx {\und{x}{f'}·\und{\ln x}{g}}
 = \und{\t\frac{x^2}{2}}{f}·\und{\ln x}{g} - \intx {\und{\t\frac{x^2}{2}}{f}·\und{\t\frac1x}{g'}}
 = \frac12 x^2 \ln x - \frac12 \intx {x}
$

$ \phantom{mmm} = \frac12 x^2 \ln x - \frac14 x^2
$


% «gabarito-maxima»  (to ".gabarito-maxima")
% (setq eepitch-preprocess-regexp "^")
% (setq eepitch-preprocess-regexp "^% ")
%
%  (eepitch-maxima)
%  (eepitch-kill)
%  (eepitch-maxima)
%  load("/usr/share/emacs/site-lisp/maxima/emaxima.lisp")$
%  display2d:'emaxima$
% 
%  Questao 1
% 
% f : sin(x)^4 * cos(x)^2;
% g : expand(demoivre(expand(exponentialize(f))));
% G : integrate(g, x);
% 
%  Questao 2
% 
% f : x^2 / sqrt(4*x^2 - 9);
% F : integrate (f, x);
% 
%  Questao 3
% 
% f : x^3 / (x^2 + 7*x + 12);
% g : partfrac(f, x);
% G : integrate(g, x);
% 
%  Questao 4
% 
% f : x^4 / (x-3)^2;
% F : integrate (f, x);
% g : subst([x=u+3], f);
% h : partfrac(g, u);
% H : integrate (h, u);
% K : subst([u=x-3], H);
% ratsimp(K - F);
% 
%  Questao 5
% 
% integrate(  log(x), x);
% integrate(x*log(x), x);


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

\end{document}




% Local Variables:
% coding: utf-8-unix
% End:
