% (find-LATEX "2024-2-C2-edos-lineares.tex")
% (defun c () (interactive) (find-LATEXsh "lualatex -record 2024-2-C2-edos-lineares.tex" :end))
% (defun C () (interactive) (find-LATEXsh "lualatex 2024-2-C2-edos-lineares.tex" "Success!!!"))
% (defun D () (interactive) (find-pdf-page      "~/LATEX/2024-2-C2-edos-lineares.pdf"))
% (defun d () (interactive) (find-pdftools-page "~/LATEX/2024-2-C2-edos-lineares.pdf"))
% (defun e () (interactive) (find-LATEX "2024-2-C2-edos-lineares.tex"))
% (defun o () (interactive) (find-LATEX "2024-1-C2-edos-lineares.tex"))
% (defun u () (interactive) (find-latex-upload-links "2024-2-C2-edos-lineares"))
% (defun v () (interactive) (find-2a '(e) '(d)))
% (defun d0 () (interactive) (find-ebuffer "2024-2-C2-edos-lineares.pdf"))
% (defun cv () (interactive) (C) (ee-kill-this-buffer) (v) (g))
% (defun oe () (interactive) (find-2a '(o) '(e)))
%          (code-eec-LATEX "2024-2-C2-edos-lineares")
% (find-pdf-page   "~/LATEX/2024-2-C2-edos-lineares.pdf")
% (find-sh0 "cp -v  ~/LATEX/2024-2-C2-edos-lineares.pdf /tmp/")
% (find-sh0 "cp -v  ~/LATEX/2024-2-C2-edos-lineares.pdf /tmp/pen/")
%     (find-xournalpp "/tmp/2024-2-C2-edos-lineares.pdf")
%   file:///home/edrx/LATEX/2024-2-C2-edos-lineares.pdf
%               file:///tmp/2024-2-C2-edos-lineares.pdf
%           file:///tmp/pen/2024-2-C2-edos-lineares.pdf
%  http://anggtwu.net/LATEX/2024-2-C2-edos-lineares.pdf
% (find-LATEX "2019.mk")
% (find-Deps1-links "Caepro5 Piecewise2 Maxima2")
% (find-Deps1-cps   "Caepro5 Piecewise2 Maxima2")
% (find-Deps1-anggs "Caepro5 Piecewise2 Maxima2")
% (find-MM-aula-links "2024-2-C2-edos-lineares" "2" "c2m242edols" "c2els")

% «.defs»		(to "defs")
% «.defs-T-and-B»	(to "defs-T-and-B")
% «.defs-caepro»	(to "defs-caepro")
% «.defs-pict2e»	(to "defs-pict2e")
% «.defs-maxima»	(to "defs-maxima")
% «.defs-V»		(to "defs-V")
% «.title»		(to "title")
% «.links»		(to "links")



\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-LATEX "dednat7-test1.tex")
%\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")
%
% (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/2024-2-C2.pdf}
\def\drafturl{http://anggtwu.net/2024.2-C2.html}
\def\draftfooter{\tiny \href{\drafturl}{\jobname{}} \ColorBrown{\shorttoday{} \hours}}

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

\catcode`\^^J=10
\directlua{dofile "dednat7load.lua"}  % (find-LATEX "dednat7load.lua")
\directlua{dednat7preamble()}         % (find-angg "LUA/DednatPreamble1.lua")
\directlua{dednat7oldheads()}         % (find-angg "LUA/Dednat7oldheads.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 dofile "Piecewise2.lua"           -- (find-LATEX "Piecewise2.lua")
%L --dofile "Escadas1.lua"           -- (find-LATEX "Escadas1.lua")
\def\pictgridstyle{\color{GrayPale}\linethickness{0.3pt}}
\def\pictaxesstyle{\linethickness{0.5pt}}
\def\pictnaxesstyle{\color{GrayPale}\linethickness{0.5pt}}
\celllower=2.5pt

% «defs-maxima»  (to ".defs-maxima")
%L dofile "Maxima2.lua"              -- (find-angg "LUA/Maxima2.lua")
\pu

% «defs-V»  (to ".defs-V")
%L --- See: (find-angg "LUA/MiniV1.lua" "problem-with-V")
%L V = MiniV
%L v = V.fromab
\pu


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

\thispagestyle{empty}

\begin{center}

\vspace*{1.2cm}

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

\bsk

Aula 46: EDOs lineares

\bsk

Eduardo Ochs - RCN/PURO/UFF

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

\end{center}

\newpage

% «links»  (to ".links")
% (c2m242edolsp 2 "links")
% (c2m242edolsa   "links")

{\bf Links}

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

% «links-stewart»  (to ".links-stewart")
% (find-books "__analysis/__analysis.el" "stewart-pt" "557" "9.5 Equações Lineares")
% (find-books "__analysis/__analysis.el" "stewart-pt" "561" "9.5 Exercícios")
\par \Ca{StewPtCap9p37} (p.557) 9.5 Equações Lineares
\par \Ca{StewPtCap9p41} (p.561) 9.5 Exercícios

\ssk

% «links-boyce»  (to ".links-boyce")
% (find-books "__analysis/__analysis.el" "boyce-diprima-pt" "23" "2.1. Equações lineares")
% (find-books "__analysis/__analysis.el" "boyce-diprima-pt" "29" "Problemas")
% (find-books "__analysis/__analysis.el" "boyce-diprima" "24" "2.1 Linear Differential Equations")
% (find-books "__analysis/__analysis.el" "boyce-diprima" "31" "Problems")
\par \Ca{BoyceDip2p5} (p.23) 2.1 Equações lineares; método dos fatores integrantes
\par \Ca{BoyceDip2p11} (p.29) Problemas
\par \Ca{BoyceDipEng2p4} (p.24) 2.1 Linear Differential Equations; Method of Integrating Factors
\par \Ca{BoyceDipEng2p11} (p.31) Problems

\ssk

% «links-zillcullen»  (to ".links-zillcullen")
% (find-books "__analysis/__analysis.el" "zill-cullen-pt" "68" "2.5. Equações lineares")
% (find-books "__analysis/__analysis.el" "zill-cullen-pt" "77" "2.5. Exercícios")
% (find-books "__analysis/__analysis.el" "zill-cullen" "53" "2.3. Linear equations")
% (find-books "__analysis/__analysis.el" "zill-cullen" "60" "Exercises 2.3")
\par \Ca{ZillCullenCap2p33} (p.68) 2.5 Equações lineares
\par \Ca{ZillCullenCap2p42} (p.77) 2.5 Exercícios
\par \Ca{ZillCullenEngCap2p26} (p.53) 2.3 Linear equations
\par \Ca{ZillCullenEngCap2p33} (p.60) Exercises 2.3

\ssk

% «links-diffyqs»  (to ".links-diffyqs")
% (find-books "__analysis/__analysis.el" "lebl" "40" "1.4 Linear equations and the integrating factor")
% (find-books "__analysis/__analysis.el" "lebl" "43" "1.4.1 Exercises")
\par \Ca{DiffyQsP40} 1.4 Linear equations and the integrating factor
\par \Ca{DiffyQsP43} 1.4.1 Exercises

\msk

% «links-quadros»  (to ".links-quadros")
% (find-angg ".emacs" "c2q242" "06/01: EDOs lineares")
% (find-angg ".emacs" "c2q241" "ago06: amortecimento, EDOs lineares")
% (find-angg ".emacs" "c2q232" "nov14: EDOs lineares")
\par Quadros:
\par \Ca{2jQ93} 2024.2
\par \Ca{2iQ86} 2024.1
\par \Ca{2hQ77} 2023.2

}\anothercol{
}}

\newpage


% «defs-bodies»  (to ".defs-bodies")
% (c2m232edolsp 3 "defs-bodies")
% (c2m232edolsa   "defs-bodies")

\sa  {[EL3]}{\CFname{EL}{_3}}
\sa   {[S1]}{\CFname{S}{_1}}
\def\P#1{\left( #1 \right)}

\sa{body Stewart}{
  \frac{dy}{dx} + P(x)y  &=& Q(x) & {[1]} \\
    I(x)(y' + P(x)y) &=& (I(x)y)' & {[3]} \\
            (I(x)y)' &=& I(x)Q(x) \\
               I(x)y &=& \intx{I(x)Q(x)} + C \\
                y(x) &=& \frac{1}{I(x)} \left[ \intx{I(x)Q(x)} + C \right] & {[4]} \\
  I(x)y' + I(x)P(x)y &=& (I(x)y)' \;=\; I'(x)y + I(x)y' \\
            I(x)P(x) &=& I'(x) \\
   \int{\frac{1}{I}}\,dI &=& \intx{P(x)} \\
                I(x) &=& Ae^{\intx{P(x)}} \\
                   A &=& \pm e^C \\
                   A &=& 1 \\
                I(x) &=& e^{\intx{P(x)}}     & {[5]} \\
  }
\sa{body Stewart 2}{
  \frac{dy}{dx} + P(x)y  &=& Q(x) & {[1]} \\
                I(x) &=& e^{\intx{P(x)}}     & {[5]} \\
                y(x) &=& \frac{1}{I(x)} \left[ \intx{I(x)Q(x)} + C \right] & {[4]} \\
  }
\sa{(EL3)}{
  \P{\begin{array}{rcl}
     f'+fg & = & h \\
        G' & = & g \\
         f & = & e^{-G}(\intx{e^Gh} + C) \\
     \end{array}
    }}

\sa{body PQI}{
    y' + Py  &=& Q     \\
  I(y' + Py) &=& (Iy)' \\
  I(y' + Py) &=& IQ    \\
       (Iy)' &=& IQ        \\
        Iy   &=& \intx{IQ} \\
         y   &=& \frac{1}{I} \intx{IQ} \\
  I(y' + Py) &=& (Iy)' \\
  Iy' + IPy  &=& I'y + Iy' \\
        IPy  &=& I'y \\
        IP   &=& I'  \\
        I    &=& e^{\intx{P}}  \\
  }
\sa{body ghm}{
    f' + gf  &=& h     \\
  m(f' + gf) &=& (mf)' \\
  m(f' + gf) &=& mh    \\
       (mf)' &=& mh        \\
        mf   &=& \intx{mh} \\
         f   &=& \frac{1}{m} \intx{mh} \\
  m(f' + gf) &=& (mf)' \\
  mf' + mgf  &=& m'f + mf' \\
        mgf  &=& m'f \\
        mg   &=& m'  \\
        m    &=& e^{\intx{g}}  \\
             &=& e^G  \\
  }
\sa{body 3}{
  f' + gf &=& h \\
       G' &=& g \\
       f  &=& e^{-G} \intx{e^Gh} \\
}

\newpage

% «o-metodo»  (to ".o-metodo")
% (c2m232edolsp 3 "o-metodo")
% (c2m232edolsa   "o-metodo")

{\bf O método}

\scalebox{0.46}{\def\colwidth{12cm}\firstcol{

Aqui a gente tem a explicação do Stewart de como resolver EDOs
lineares {\sl com todas as partes em português deletadas}:
%
$$\begin{array}{rcll}
  \ga{body Stewart}
  \end{array}
$$

Repare que sem as partes em português ela vira algo que só gênios
conseguem decifrar -- e um dos nossos objetivos neste curso é aprender
a organizar as contas de modo que elas fiquem fáceis de entender, de
justificar e de verificar.

\msk

Se a gente deixa só as linhas [1], [4] e [5] e põe elas nesta ordem,
%
$$\begin{array}{rcll}
  \ga{body Stewart 2}
  \end{array}
$$

o {\sl método} fica bem claro: pra resolver uma EDO da forma [1] a
gente define um fator integrante $I(x)$ usando a definição da linha
[5], e aí as nossas soluções vão ser as funções $y(x)$ da linha [4],
onde $C$ é uma constante qualquer.

}\anothercol{

Agora se a gente precisar {\sl resolver} EDOs lineares basta aplicar
um método que cabe em três linhas. Eu prefiro escrever ele usando
outras letras,
%
$$\begin{array}{ccl}
  y(x) & ⇒ & f(x) \\
  P(x) & ⇒ & g(x) \\
  \intx{P(x)} & ⇒ & G(x) \\
  Q(x) & ⇒ & h(x) \\
  I(x) & ⇒ & m(x) \\
  \end{array}
$$

o omitindo os `$(x)$' na maioria dos lugares. A tradução é isto,
%
$$\begin{array}{rcl}
  f'+gf & = & h \\
      m & = & e^G \\
      f & = & \frac{1}{m}(\intx{mh} + C) \\
  \end{array}
$$

mas eu vou preferir escrever ela deste jeito:
%
$$\ga{[EL3]} \;=\; \ga{(EL3)}
$$


\bsk

% «exercicio-0»  (to ".exercicio-0")
% (c2m232edolsp 3 "exercicio-0")
% (c2m232edolsa   "exercicio-0")

{\bf Exercício 0}

O Stewart começa por este exemplo, que ele chama de [2]:

% (find-books "__analysis/__analysis.el" "stewart-pt" "557" "9.5 Equações Lineares")
\par \Ca{StewPtCap9p37} (p.557) $y'+\frac{1}{x}y=2$

Seja $\ga{[S1]} \;=\; \bsm{g := 1/x \\ h:=2 \\ G := \ln x \\ }$.

a) Use $\ga{[EL3]}\ga{[S1]}$ pra obter a solução geral da EDO [2].

b) Chame esta solução geral de $f_1(x)$ -- use um ``seja''! -- e teste-a.

c) Encontre a solução particular que passa pelo ponto $(2,5)$.

d) Chame esta solução particular de $f_2(x)$ -- use um ``seja''! -- e teste-a.

}}



\newpage

{\bf O que realmente importa}

\scalebox{0.7}{\def\colwidth{12cm}\firstcol{

{\bf Exercício importantíssimo!!!}

Entenda isto aqui e reescreva num formato BEM

mais fácil de entender:
%
$$\begin{array}{rcll}
  \ga{body Stewart}
  \end{array}
$$


}\anothercol{
}}



\newpage


\newpage

% % «metodo-e-formula»  (to ".metodo-e-formula")
% % (c2m232edolsp 3 "metodo-e-formula")
% % (c2m232edolsa   "metodo-e-formula")
% 
% \scalebox{0.6}{\def\colwidth{6cm}\firstcol{
% 
% $$\begin{array}[t]{rcl}
%   \ga{body PQI}
%   \end{array}
%   \qquad
%   \begin{array}[t]{rcl}
%   \ga{body ghm}
%   \end{array}
%   \qquad
%   \begin{array}[t]{rcl}
%   \ga{body 3}
%   \end{array}
% $$
% 
% }\anothercol{
% 
% }}



\newpage

% «maxima»  (to ".maxima")
% (c2m232edolsp 5 "maxima")
% (c2m232edolsa   "maxima")
% (find-es "maxima" "2023-2-edos-lineares")

%M (%i1) e1 : 'diff(y,x) + 1/x * y = 2;
%M (%o1) {\frac{d}{d\,x}}\,y+{\frac{y}{x}}=2
%M (%i2) e2 : ode2(e1,y,x);
%M (%o2) y={\frac{x^2+\mathrm{\%c}}{x}}
%M (%i3)      solve(e2, %c);
%M (%o3) \left[ \mathrm{\%c}=x\,y-x^2 \right] 
%M (%i4) e3 : solve(e2, %c)[1];
%M (%o4) \mathrm{\%c}=x\,y-x^2
%M (%i5) e4 : subst([x=2,y=5], e2);
%M (%o5) 5={\frac{\mathrm{\%c}+4}{2}}
%M (%i6)      solve(e4, %c);
%M (%o6) \left[ \mathrm{\%c}=6 \right] 
%L maximahead:sa("stewart exemplo 0 a", "")
\pu

%M (%i7) e4 : solve(e4, %c)[1];
%M (%o7) \mathrm{\%c}=6
%M (%i8)                   subst(e4,e2);
%M (%o8) y={\frac{x^2+6}{x}}
%M (%i9) define(f2(x), rhs(subst(e4,e2)));
%M (%o9) \mathrm{f2}\left(x\right):={\frac{x^2+6}{x}}
%M (%i10) e5 : subst([y=f2(x)], e1);
%M (%o10) {\frac{d}{d\,x}}\,\left({\frac{x^2+6}{x}}\right)+{\frac{x^2+6}{x^2}}=2
%M (%i11) ev(e5, diff);
%M (%o11) 2=2
%M (%i12) 
%L maximahead:sa("stewart exemplo 0 b", "")
\pu


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

\vspace*{0.0cm}

\def\hboxthreewidth {14cm}
\ga{stewart exemplo 0 a}

}\anothercol{

\vspace*{0.0cm}

\def\hboxthreewidth {14cm}
\ga{stewart exemplo 0 b}

}}




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

\end{document}

% (find-pdfpages2-links "~/LATEX/" "2024-2-C2-edos-lineares")


% Local Variables:
% coding: utf-8-unix
% ee-tla: "c2els"
% ee-tla: "c2m242edols"
% End:
