%\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 19 ]{\large{ Lecture 19} 
\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{definition}
Rational functions have the general form $$f(x)=\frac{p(x)}{q(x)}$$
where $p(x)$ and $q(x)$ are polynomials.
\end{definition}
\begin{itemize}
\item \textbf{IF} degree of $p(x) <$ degree of $q(x)$, then $f(x)$ is a strictly proper rational function. 
\item \textbf{IF} degree of $p(x) =$ degree of $q(x)$, then $f(x)$ is a proper rational function. 
\item \textbf{IF} degree of $p(x) >$ degree of $q(x)$, then $f(x)$ is an improper rational function. 
\end{itemize}

\end{frame}
\begin{frame}
An improper or proper rational function can be expressed in terms of a strictly proper rational function
\begin{example}
Express $f(x)=\displaystyle{\frac{3x^{4}+2x^{3}-5x^{2}+6x-7}{x^{2}-2x+3}}$ in terms of a strictly proper rational function
\end{example}
{\textcolor{blue}{$f(x)=3x^{2}+8x+2-\displaystyle{\frac{14x+13}{x^{2}-2x+3}}$}}
\end{frame}
\begin{frame}
\begin{itemize}
\item[(1)] {\textcolor{red}{Linear factor to the power of $1$:}}\\
A linear factor $(x-a)$ gives rise to the partial fraction of the form $$\frac{A}{x-a}$$
\item[(2)] {\textcolor{red}{Linear factor to the power of greater than $1$:}}\\
If $(x-\alpha)^{k}$ appears in the denominator, it will give rise to the following terms:$$\frac{A_{1}}{x-\alpha}+\frac{A_{2}}{(x-\alpha)^{2}}+\cdots+\frac{A_{k}}{(x-\alpha)^{k}}$$
\end{itemize}
\end{frame}
\begin{frame}
\begin{itemize}
\item[(3)] {\textcolor{red}{Irreducible quadratic factors:}}\\
An irreducible quadratic $ax^{2}+bx+c$ gives rise to partial fractions of the form $$\frac{Ax+B}{ax^{2}+bx+c}$$
\item[(4)] {\textcolor{red}{Irreducible quadratic factors to the power of greater than $1$:}}\\
If $(ax^{2}+bx+c)^{k}$ appears in the denominator, it will give rise to the following terms:
$$\frac{A_{1}x+B_{1}}{ax^{2}+bx+c}+\frac{A_{2}x+B_{2}}{(ax^{2}+bx+c)^{2}}+\cdots+\frac{A_{k}x+B_{k}}{(ax^{2}+bx+c)^{k}}$$
\end{itemize}
\end{frame}
\begin{frame}
\begin{example}
Evaluate $$\int \frac{3x+4}{x^{2}+7x+12} dx$$

\end{example}
$x^{2}+7x+12=(x+4)(x+3)$, so the partial fraction decomposition has the form:
$$ \frac{3x+4}{x^{2}+7x+12}=\frac{A}{x+4}+\frac{B}{x+3}$$ 
To find the values of the undetermined coefficients $A$ and $B$, we add the new fractions:
$$\frac{3x+4}{x^{2}+7x+12}=\frac{A}{x+4}+\frac{B}{x+3}=\frac{A(x+3)+B(x+4)}{(x+4)(x+3)}$$
\end{frame}
\begin{frame}
The denominators on both sides of the above equation are identical, so the numerators must be equal: $$3x+4=A(x+3)+B(x+4)=Ax+3A+Bx+4B=(A+B)x+(3A+4B)$$  which means:
$$\left\{
  \begin{array}{rcr}
    A+B & = & 3 \\
    3A+4B & = & 4 \\
  \end{array}
\right.$$ 
So $A=3-B$  so inserting this into the second equation, we get:$$3(3-B)+4B=4 \Rightarrow 9-3B+4B=4 \Rightarrow 9+B=4 \Rightarrow B=4-9 \Rightarrow B=-5$$
Therefore $A=3-B=3+5=8$. \\
So $$\frac{3x+4}{x^{2}+7x+12}=\frac{8}{x+4}+\frac{-5}{x+3}$$
\end{frame}
\begin{frame}
Now we can express the integral as: $$\int \frac{3x+4}{x^{2}+7x+12} dx=\int \Big ( \frac{8}{x+4}+\frac{-5}{x+3} \Big ) dx$$
Using the sum rule, we have: $$\int \frac{3x+4}{x^{2}+7x+12} dx=\int \Big ( \frac{8}{x+4}+\frac{-5}{x+3} \Big ) dx=\underbrace{\int \frac{8}{x+4} dx}_{I_{1}} +\underbrace{\int \frac{-5}{x+3} dx}_{I_{2}} $$
\end{frame}
\begin{frame}
First we find $I_{1}$: $$I_{1}=\int \frac{8}{x+4} dx=8\int \frac{1}{x+4} dx$$
Let $u=x+4$,  then $du=dx$,  so: $$I_{1}=\int \frac{8}{x+4} dx=8\int \frac{1}{x+4} dx=8\int \frac{du}{u}=8\ln (u)+c_{1}=8\ln (x+4)+c_{1}$$ 
Therefore $I_{1}=8\ln (x+4)+c_{1}$
\end{frame}
\begin{frame}
  $$I_{2}=\int \frac{-5}{x+3} dx$$
Let $u=x+3$, then $du=dx$, so: $$I_{2}=-5\int \frac{1}{x+3} dx=-5\int \frac{du}{u}=-5\ln (u)+c_{2}=-5\ln (x+3)+c_{2}$$ 
Therefore $I_{2}=-5\ln (x+3)+c_{2}$\\
So finally $$\int \frac{3x+4}{x^{2}+7x+12} dx=\int \Big ( \frac{8}{x+4}+\frac{-5}{x+3} \Big ) dx=\underbrace{\int \frac{8}{x+4} dx}_{I_{1}} +\underbrace{\int \frac{-5}{x+3} dx}_{I_{2}}$$$$=8\ln (x+4)+c_{1} -5\ln (x+3)+c_{2}=8\ln (x+4)-5\ln (x+3)+c $$
\end{frame}





\end{document}