%\documentclass[c]{beamer}

%\usecolortheme{whale}


\documentclass[xcolor=dvipsnames,envcountsect]{beamer} 
%\documentclass{beamer}
\beamertemplatenavigationsymbolsempty 
\usecolortheme[named=Blue]{structure} %change
%\usecolortheme{seahorse}
%\usecolortheme{rose}
 %default blue to brown
%\usetheme{Warsaw}
%\usetheme{CambridgeUS}
\useoutertheme{infolines}
%\usecolortheme{dolphin}
%\usefonttheme{serif}
\usetheme{Madrid}

%\addtocounter{framenumber}{-5} 
%\setbeamertemplate{footline}[default] 
\usefonttheme{professionalfonts} % using non standard fonts for beamer
%\usefonttheme{serif} % default family is serif


\usepackage{multicol}
%\usepackage[compatibility=false]{caption}
%\usepackage{subfig}
\usepackage{algcompatible}
\usepackage[section]{algorithm}
\usepackage{algorithmicx}
%\usepackage{algorithmic}
\usepackage{algpseudocode}

%\usepackage[caption=false]{subfig}
\usepackage{amsmath}
\DeclareMathOperator{\sech}{sech}
\DeclareMathOperator{\csch}{csch}

%\usetheme{Frankfurt}
%\usetheme{AnnArbor}
% % % % % % % % % % %
%\usepackage{fancyhdr}
%\usepackage{graphicx}
%\usepackage{caption}
%\usepackage{tikz,siunitx}
%
%\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri}
%
%\usetikzlibrary{automata,arrows}
%\usepackage{subcaption}
%\usepackage{enumitem}
%\setlist{nolistsep}
%\usepackage{float}
% % % % % % % % % % %


\usepackage{extarrows}
\usepackage{verbatim}
\usepackage{bm}
\usepackage[all,cmtip]{xy}
\usepackage[framemethod=default]{mdframed}
\def\Ker{\textrm {Ker\,}}
\def\Im{\textrm{Im\,}}
\def\Z{\mathbb{Z}}
\def\N{\mathcal{N}}
\def\Z{\mathbb{Z}}
\def\F{\mathbb{F}}
\def\Aut{\mathrm{Aut}}
\def\rightiso{\xrightarrow{\simeq}}
\def\B{B}
\def\H{H}
\def\A{\mathcal{A}}
\def\Bb{\overline{B}}
\def\Rb{\overline{R}}
%\def\p{} 
\def\p{\pause}
\def\cl{\color{blue}}
\def\clg{\color{red}}
%\usefonttheme{structuresmallcapsserif}
\def\cl{\color{blue}}
\def\clg{\color{red}}



\setbeamertemplate{theorems}[numbered]



\newtheorem{proposition}{Proposition}[section]
\newtheorem*{conjecture}{Conjecture}
%\theoremstyle{definition} \newtheorem{algorithm}{Algorithm}[section]
\theoremstyle{definition} \newtheorem{remark}{Remark}[section]


\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
\renewcommand{\algorithmicprocedure}{\textbf{Procedure:}}
\renewcommand{\Procedure}{\textbf{Function:}}
\renewcommand{\EndProcedure}{\textbf{EndFunction:}}

\usepackage{ifthen}

% This is the file main.tex


\newcommand\uleft[2]{\,{}^{#1}\hspace*{-.1em}{#2}}
\def\idgroup{\mathbf{1}}
\newcommand\rdef[1]{\textit{\textcolor{blue}{#1}}}
\newcommand\mdef[1]{\textcolor{Brown}{#1}}

\newcommand\link[2]{\hyperlink{#2}{\beamergotobutton{#1}}}

\def\GAP{{\sf GAP} }
\def\HAP{{\sf HAP} }
\def\XMod{{\sf XMod}}
\def\C{\mathcal{C}}
\def\ZG{\mathbb{Z}G}
\input{rbg}
\def\minusvspace{\vspace*{-18pt}}
\def\xyscale{\xymatrixrowsep{0.25in} \xymatrixcolsep{0.25in}}

\def\xysmall{\xymatrixrowsep{0.15in} \xymatrixcolsep{0.15in}} 
\def\Ne{\mathcal{N}}
\def\CW{\textrm{CW}}
\parskip 0.1in

\input{def}

\def\xd{\vspace*{10pt}}
\def\ixd{\vspace*{3pt}}



 




\title[]{MA140-Engineering Calculus}
\author[ Lecture 23]{\large{ Lecture 23} 
\and %\\ \small{Supervisor: Dr. John Burns}
\\ 
 \includegraphics[scale=0.0]{Figures/lec14.jpg}}
%\date[June 2-4, 2016]{June 2-4, 2016}
%\institute[Uppsala University]{ }


\begin{document}
\begin{frame}
\titlepage
\end{frame}


\section{MA140}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\begin{example}
Evaluate $$I=\int \frac{2}{3+4x^{2}} dx$$
\end{example}
\visible<2->{Recall that $$\int \frac{dx}{1+x^{2}} =\tan^{-1} (x)+c$$}
\visible<3->{$$I=\int \frac{2}{3(1+\frac{4}{3} x^{2})} dx=\frac{2}{3} \int \frac{1}{1+\frac{4}{3} x^{2}} dx=\frac{2}{3} \int \frac{1}{1+(\frac{2x}{\sqrt{3}})^{2} } dx$$}
\visible<4->{Let $u=\frac{2}{\sqrt{3}}x$,} \visible<2->{then $du=\frac{2}{\sqrt{3}} dx$,} \visible<5->{so $\frac{\sqrt{3}}{2}du = dx $.}
\visible<6->{$$I=\frac{2}{3} \int \frac{1}{1+u^{2}} (\frac{\sqrt{3}}{2}du )$$}
\end{frame}
\begin{frame}
$$I=\frac{2}{3} \frac{\sqrt{3}}{2} \int \frac{1}{1+u^{2}} du $$ So 
$$I=\frac{1}{\sqrt{3}} \tan^{-1} u+c=\frac{1}{\sqrt{3}} \tan^{-1} (\frac{2}{\sqrt{3}}x)+c$$
\end{frame}
\begin{frame}
To compute the area of the region bounded by the graph of a function $y=f(x)$ and the $x-$axis requires more care when the function takes on both positive and negative values.
We must be careful to break up the interval $[a,b]$ into subintervals on which the function
doesn’t change sign. Otherwise we might get cancellation between positive and negative
signed areas, leading to an incorrect total.
\begin{definition}
To find the area between the graph of $y=f(x)$ and the $x-$axis over the interval $[a,b]$, do the following: 
\begin{itemize}
\item[(1)] Subdivide $[a,b]$ at the zeros of $f$
\item[(2)] Integrate $f$ over each subinterval.
\item[(3)] Add the absolute values of the integrals. 
\end{itemize}  
\end{definition} 
\end{frame}
\begin{frame}
\begin{example}
Suppose that $f(x)=\sin (x)$, find:
\begin{itemize}
\item $$\int_{0}^{2\pi} \sin (x) dx$$
\item  The area between the graph of $f(x)$ and the $x-$axis over $[0,2\pi]$ 
\end{itemize}
\end{example}
\end{frame}
\begin{frame}
The definite integral for $f(x)=\sin (x)$ is given by $$\int_{0}^{2\pi} \sin (x) dx=-\cos (x) \Big ]_{0}^{2\pi}=-[\cos (2\pi)-\cos (0)]=-[1-1]=0$$
The definite integral is zero because the portions of the graph above and below the x-axis
make canceling contributions.
\end{frame}
\begin{frame}
\begin{center}
			\includegraphics[scale=0.4]{Figures/lec600.pdf}
		\end{center}
\end{frame}
\begin{frame}
The area between the graph of $f(x)$ and the $x-$axis over $[0,2\pi]$ is calculated by breaking up the domain of $\sin (x)$ into two pieces: the interval $[0,\pi]$ over which it is nonnegative and the interval $[\pi , 2\pi]$ over which it is nonpositive.
$$\int_{0}^{\pi} \sin (x) dx=-\cos (x) \Big ]_{0}^{\pi}=-[\cos (\pi)-\cos (0)]=-[-1-1]=2$$
$$\int_{\pi}^{2\pi} \sin (x) dx=-\cos (x) \Big ]_{\pi}^{2\pi}=-[\cos (2\pi)-\cos (\pi)]=-[1-(-1)]=-2$$
The second integral gives a negative value. The area between the graph and the axis is obtained
by adding the absolute values $$area=|2|+|-2|=4$$
\end{frame}
\begin{frame}
\begin{definition}
If $f$ and $g$ are continuous with $f(x)\geq g(x)$ throughout $[a,b]$, then the area of the region between the curves $y=f(x)$ and $y=g(x)$ from $a$ to $b$ is the integral of $(f-g)$ from $a$ to $b$: $$A=\int_{a}^{b} [f(x)-g(x)] dx$$
\end{definition}
\begin{center}
			\includegraphics[scale=0.25]{Figures/lec601.pdf}
		\end{center}
\end{frame}
\begin{frame}
\begin{example}
Find the area of the region enclosed by the parabola $y=2-x^{2}$ and the line $y=-x$
\end{example}
First we sketch the two curves
\visible<2->{\begin{center}
			\includegraphics[scale=0.28]{Figures/lec602.pdf}
		\end{center}}
\end{frame}
\begin{frame}
The limits of integration are found
by solving $y=2-x^{2}$ and $y=-x$ simultaneously for $x$. $$2-x^{2}=-x \Rightarrow x^{2}-x-2=0 \Rightarrow (x+1)(x-2)=0 \Rightarrow x=-1, x=2$$ 
The region runs from $x=-1$ to $x=2$. The limits of integration are $a=-1$, $b=2$. The area between the curve is $$A=\int_{a}^{b} [f(x)-g(x)] dx=\int_{-1}^{2} [(2-x^{2})-(-x)] dx$$
$$=\int_{-1}^{2} (2+x-x^{2}) dx=\Big [ 2x+\frac{x^{2}}{2}-\frac{x^{3}}{3}\Big ]_{-1}^{2}$$
$$=\Big ( 4+\frac{4}{2}-\frac{8}{3}\Big )-\Big ( -2+\frac{1}{2}+\frac{1}{3} \Big )=\frac{9}{2}$$
\end{frame}
\begin{frame}
\begin{example}
Find the area enclosed between the two curves $f(x)=6-2x^{2}$ and $g(x)=4x$.
\end{example}
\end{frame}

\end{document}