% This is part of the solutions for prelim 1 for projects math 112, fall 2001.
% it is a latex file.

%%%%%% IT IS NOT COMPLETE!!!!!

\documentclass[11pt]{article}
\usepackage{amsmath,amsfonts,amssymb,graphics}
\setlength{\topmargin}{-.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9in}
\pagestyle{empty}
\setlength{\parindent}{0in}

\begin{document}


\begin{center}
Projects Math 112 \hfill Prelim 1 \hfill October 2, 2001 \hfill Fall
2001\\[.5cm]

\bf SOLUTIONS TO 1\\[.5cm]
\end{center}

\noindent{\bf 1.} (26 points) Find the following definite or
indefinite integrals:\\[4mm]  

a) $I = \int \cos x \; \sin^{2}\!x\; dx$\\

Let $u=\sin(x)$. Then $du = \cos(x) \;dx$.
So $I = \int u^2 \;du$ = $\frac{1}{3} u^3 + C$ =$ \frac{1}{3}\sin^3(x)
+C$.\\[4mm]


b) $\int \frac{x \ dx}{(x-3)(x+5)}\; $\\

Use partial fractions to rewrite this integral as the sum of two
integrals:
\[ 
\frac{x}{(x-3)(x+5)} = \frac{A}{x-3} + \frac{B}{x+5} 
\]
So, $x = A(x+5) + B(x-3) = (A+B)x+(5A-3B)$. Hence $A+B=1$ and
$5A-3B=0$. Next we solve for $A$ and $B$: $B= 1-A \Rightarrow
5A-3(1-A)=0 \Rightarrow 8A=3 \Rightarrow A=\frac{3}{8} \Rightarrow
B=\frac{5}{8}$. So,
\begin{eqnarray*}
\int \frac{x}{(x-3)(x+5)}\; dx &=& \int \frac{3}{8(x-3)} \; dx  + \int
\frac{5}{8(x+5)} \; dx  \\
&=&\frac{3}{8} \ln |x-3| + \frac{5}{8} \ln|x+5| + C .
\end{eqnarray*}
\vspace{4mm}

c) $I = \int \cos \sqrt{x} \; dx$\\

Let $u=\sqrt{x}$. Then $du = \frac{1}{2\sqrt{x}}\;dx$. So $dx = 2 u \;du$
and $I =2 \int u\cos(u) \;du$. 

Now let $w = u$ and $dv = \cos u \;du$. So $dw = du$ and $v=\sin u$.

Integrating by parts, we get $I= 2[u\sin u - \int \sin u \;du ]$ =
$2u\sin u - 2(-\cos u) +C$ = $2 \sqrt{x} \sin\sqrt{x} + 2 \cos
\sqrt{x} +C$.\\[4mm]


d) $I = \int_{-1}^{2} | x e^{x} | \; dx.$\\

The function $x e^x$ is positive for $x>0$ and negative for $x<0$.
So 
\[
|xe^x| = \left\{ \begin{array}{rll}
-xe^x & \mbox{if} & x <0\\
xe^x & \mbox{if} & x \geq 0
\end{array} \right.
\]
and the integral splits into two pieces:
$I = \int_{-1}^{0} - x e^{x} \; dx + \int_{0}^{2} x e^{x} \; dx.$\\

To integrate $\int xe^x \; dx$ by parts, let $u=x$ and $dv=e^x \;
dx$. Then $du=dx$ and $v=e^x$. So $\int xe^x \; dx$ = $ xe^x - \int
e^x \; dx$ = $xe^x-e^x+C$.

So by the evaluation theorem $I = -[xe^x-e^x]_{-1}^{0} +
[xe^x-e^x]_{0}^{2}$ = $- [(0e^0 -e^0)-({-1}e^{-1}-e^{-1})] + [(2e^2
-e^2)-({0}e^{0}-e^{0})]$. (If you choose to simplify this is $e^2 -
\frac{2}{e} + 2$.)



\end{document}

