\documentclass[12pt]{amsart}

% Package Being Used:

\usepackage{enumitem}
\usepackage{bigints}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{graphicx}
\usepackage{psfrag}
\usepackage{color}
\usepackage{url}
\usepackage{algpseudocode}
\usepackage{fancyhdr}
\usepackage{xy}
\input xy
\xyoption{all}

%\usepackage{soul} % this is a package used only temporary that allows us to underline comments that we are planning to remove in future versions of the paper.

% Paper Format and Geometry:

\voffset=-1.4mm
\oddsidemargin=17pt
\evensidemargin=17pt
\topmargin=-20pt
\headheight=-20pt     
\textheight=576pt
\textwidth=440.8pt
\parskip=0pt plus 4pt

% Head Labels:

\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

% Theorems-like Format and Numbering:


\newtheorem{theorem}{Theorem}%[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{cor}[theorem]{Corollary}
\newtheorem{conjecture}[theorem]{Conjecture}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\numberwithin{equation}{section}

% Personalized Commands:

\newcommand\cc{\mathbb{C}}
\newcommand\ff{\mathbb{F}}
\newcommand\nn{\mathbb{N}}
\newcommand\qq{\mathbb{Q}}
\newcommand\rr{\mathbb{R}}
\newcommand\zz{\mathbb{Z}}

\newcommand\pval{\mathsf{v}_p}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
	
	\mbox{}
	\title{MATH1B: Final Practice Exam \quad \quad \quad \quad \quad \quad TIME: 2 hours}
	
	\maketitle
	
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	
	%---------------------------------PROBLEM 1
	
	\begin{problem}
		Evaluate the following integrals
		\[
			(a) \int \frac{dy}{16y + 10y \ln y + y (\ln y)^2} \quad \quad (b) \int e^{-x}\cos 2x \, dx.
		\]
	\end{problem}

	\noindent {\it Solution:} (a) Taking $x = \ln y$ and, therefore, $dx = dy/y$, we get
	\begin{align*}
		\int \frac{dy}{16y + 10y \ln y + y (\ln y)^2}
		&= \int \frac{dx}{16 + 10x + x^2} = \int \frac{dx}{(x+2)(x+8)} \\
		&= \frac{1}{6} \bigg(\int \frac{dx}{x+2} - \frac{dx}{x+8} \bigg) = \frac 1{6} \ln|x+2| - \frac 1{6} \ln|x+8| + C \\
		&= \frac 1{6} \ln|2 + \ln y| - \frac 1{6} \ln |8 + \ln y| + C.
	\end{align*}
	
	(b) Integrating by parts taking $u = e^{-x}$ and $dv = \cos 2x dx$, one obtains
	\begin{align} \label{eq:problem1}
		\int e^{-x}\cos 2x \, dx = \frac 12 e^{-x} \sin 2x + \frac 12 \int e^{-x} \sin 2x \, dx.
	\end{align}
	Using integration by parts on the integral in the right-hand side of \eqref{eq:problem1} with $u = e^{-x}$ and $dv = \sin 2x \, dx$, we have that
	\begin{align*}
		\int e^{-x}\cos 2x \, dx = \frac 12 e^{-x} \sin 2x + \frac 12 \bigg(-\frac 12 e^{-x} \cos 2x - \frac 12 \int e^{-x} \cos 2x \, dx \bigg).
	\end{align*}
	Hence, by factoring the integrals in the above equations, we conclude that
	\[
		\int e^{-x} \cos 2x \, dx = \frac 25 e^{-x} \sin 2x - \frac 15 e^{-x} \cos 2x.
	\]
	\qed
	%---------------------------------PROBLEM 2
	
	\begin{problem}
		Decide whether the next integral is divergent or convergent. If it is convergent, evaluate it:
		\[
			\int_0^{\pi/2} \frac{\cos \theta}{\sqrt{\sin \theta}}\, d\theta.
		\]
	\end{problem}

	\noindent {\it Solution:} Using the definition of improper integral and then the substitution $u = \sin \theta$, it follows that
	\begin{align*}
		\int_0^{\pi/2} \frac{\cos \theta}{\sqrt{\sin \theta}}\, d\theta
			&= \lim_{t \to 0^+} \int_{t}^{\pi/2} \frac{\cos \theta}{\sqrt{\sin \theta}}\,d\theta = \lim_{t \to 0^+} \int_{\sin t}^1 \frac{du}{\sqrt{u}} = \lim_{t \to 0^+} 2 \sqrt{u} \big{|}_{\sin t}^1 = 2.
	\end{align*}
	Therefore the integral is convergent and its limit is $2$.
	\qed
	
	
	%---------------------------------PROBLEM 3
	
	\begin{problem}
		For the function $f(x) = \frac 1{4}e^x + e^{-x}$, argue that the arc length on any interval has the same value as the area under the curve.
	\end{problem}

	\noindent {\it Solution:} First, notice that
	\[
		\sqrt{1 + \big(f'(x)\big)^2} = \sqrt{1 + \bigg(\frac {e^{2x}}{16} - \frac 12 + e^{-2x}\bigg)} = \sqrt{\bigg(\frac {e^x}4 + e^{-x}\bigg)^2} = f(x).
	\]
	Thus, if $a < b$ and $L_f([a,b])$ is the arc length of $f(x)$ when $a \le x \le b$, then
	\[
		L_f([a,b]) = \int_a^b \sqrt{1 + \big(f'(x)\big)^2} \, dx = \int_a^b f(x) \, dx,
	\]
	which is the area under curve $f(x)$ from $a$ to $b$.
	\qed
	
	%--------PROBLEM 4
	
	\begin{problem}
		Determine whether the following series is absolutely convergent, conditionally convergent, or divergent:
		\[
			\sum_{n=1}^\infty (-1)^n \frac{\arctan n}{n^2}.
		\]
	\end{problem}

	\noindent {\it Solution:} Since 
	\[
		\sum_{n=1}^\infty \bigg{|} (-1)^n \frac{\arctan n}{n^2}\bigg{|} = \sum_{n=1}^\infty \frac{|\arctan n|}{n^2} \le \sum_{n=1}^\infty \frac{\pi/2}{n^2},
	\]
	which converges, by the Comparison Test the given series is absolutely convergent.
	\qed
	
	%---------------------------------PROBLEM 5
	
	\begin{problem}
		Find the radius of convergence and the interval of convergence of the following power series:
		\[
			(a) \ \sum_{n=1}^\infty \frac{(2x - 1)^n}{5^n \sqrt{n}} \quad \quad (b) \ \sum_{n=2}^\infty \frac{b^n}{\ln n}(x-a)^n, \ \ b > 0.
		\]
	\end{problem}

	\noindent {\it Solution:} (a) Since
	\[
		\lim_{n \to \infty} \frac{|2x - 1|^{n+1}}{5^{n+1}\sqrt{n+1}} \cdot \frac{5^n \sqrt{n}}{|2x - 1|^n} = |2x - 1| \lim_{n \to \infty} \frac 15 \sqrt{\frac{n}{n+1}} = \frac{|2x - 1|}5,
	\]
	it follows by the Ratio Test that radius of convergence is $5/2$. Substituting $2x - 1 = -5$ and $2x - 1 = 5$ in the original power series, we can see that
	\[
		\sum_{n = 1}^\infty (-1)^n \frac 1{\sqrt{n}} \ \text{ and } \ \sum_{n=1}^\infty \frac 1{\sqrt{n}}
	\]
	are convergent (by the Alternating Test) and divergent (by the $p$-test), respectively. Hence the interval of convergence is $[-2,3)$.
	
	(b) The solution is similar to part (a): the radius of convergence is $1/b$ and the interval of convergence is $[a - 1/b, a + 1/b)$.
	\qed

	\begin{problem}
		Find the Taylor series of the following functions:
		\[
			(a) \ f(x) = \frac{x^2}{\sqrt{2 + x}} \quad \quad (b) \ f(x) = \sin^2 x.
		\]
	\end{problem}

	\noindent {\it Solution:} (a) Using the Binomial Series,
	\begin{align*}
		f(x) &= \frac{x^2}{\sqrt{2}}\bigg(1 + \frac x2 \bigg)^{-1/2} = \frac{x^2}{\sqrt{2}}\sum_{n=0}^\infty \binom{-1/2}{n}\frac{x^n}{2^n} \\
			&= \frac{x^2}{\sqrt{2}}\sum_{n=0}^\infty (-1)^n\frac{1 \cdot 3 \cdot 5 \cdots (2n-1)}{2^n n!}\frac{x^n}{2^n} \\
			&= \sum_{n=0}^\infty (-1)^n\frac{1 \cdot 3 \cdot 5 \cdots (2n-1)}{4^n \sqrt{2} \, n!} x^{n+2}.
	\end{align*}
	
	(b) Since $\sin^2 x = (1 - \cos 2x)/2$, using the Taylor series for $\cos 2x$ we find that
	\[
		f(x) = \frac 12 - \frac 12 \sum_{n=0}^\infty \frac{(-1)^n}{(2n)!}(2x)^n = \frac 12 + \sum_{n=0}^\infty \frac{(-1)^{n-1}2^{n-1}}{(2n)!}x^n.
	\]
	\qed
	
	\begin{problem}
		Solve the following differential equations:
		\[
			(a) \ \frac{dy}{dx} = e^{2x}y - y  + e^{2x} -1 \quad \quad (b) \ t^2 \frac{dy}{dt} + 3ty = \sqrt{1+t^2}, \ t > 0.
		\]
	\end{problem}

	\noindent {\it Solution:} (a) After factorizing the right-hand side of the differential equation, we immediately realize that it is a separable equation:
	\[
		\frac{dy}{dx} = (e^{2x} - 1)(y + 1).
	\]
	Therefore
	\[
		\ln|y + 1| + C = \int \frac{dy}{y+1} = \int (e^{2x} - 1)\,dx = \frac 12 e^{2x} - x.
	\]
	Hence $|y+1| = A\exp(e^{2x}/2 - x)$, where $A > 0$, which is equivalent to $y = A\exp(e^{2x}/2 - x) - 1$ where $A \neq 0$. Since the constant function $y = -1$ is also a solution of the differential equation given, we conclude that the set of solutions can be described as follows
	\[
		y = Ae^{e^{2x}/2 - x} - 1, \text{ where } A \in \rr.
	\]
	
	(b) Notice that this is a linear differential equation whose integrating factor is
	\[
		I(t) = e^{\int 3/t \, dt} = e^{3\ln|t|} = t^3.
	\]
	Hence $(t^3y) = t\sqrt{1 + t^2}$, which implies that
	\[
		t^3y = \int t \sqrt{1 + t^2} \, dt = \frac 12 \int \sqrt{u}\,du = \frac 12 \int \sqrt{t} \, dt = \frac 13 t^{3/2} + C. 
	\]
	Thus, the set of solutions is given by
	\[
		y = \frac{1}{3t^3}(t^{3/2} + C), \text{ where } C \in \rr.
	\]
	\qed
	

	\begin{problem}
		Suppose a population growth according to a logistic model with initial population $1000$ and carrying capacity $10,000$. If the population grows to $2500$ after one year, what will the population be after another three years?
	\end{problem}

	\noindent {\it Solution:} The logistic model is described by the differential equation
	\[
		\frac {dP}{dt} = kP\bigg(1 - \frac PM \bigg),
	\]
	where $k$ is a constant and $M$ is the carrying capacity. In the current case, $M = 10^4$. After solving the integrals in equation resulting from separating variables, namely
	\[
		\int \frac{dP}{P(1 - \frac P{10^4})} = \int k dt,
	\]
	we find that
	\begin{align*}
		P(t) = \frac{10^4}{1 + Ae^{-kt}}, \text{ where } A = \frac{M - P(0)}{P(0)}.
	\end{align*}
	Since $P(0) = 1000$, it follows that $A = 9$ and
	\begin{equation} \label{eq:problem8}
		P(t) = \frac{10^4}{1 + 9e^{-kt}}.
	\end{equation}
	We can use the fact that $P(1) = 2500$ to find $k$ since from equation \eqref{eq:problem8} we get
	\[
		k = -\frac 1t \ln \bigg(\frac 19 \bigg(\frac{10^4}{P(t)} - 1 \bigg)\bigg).
	\]
	Therefore $k = \ln 3$ and so the equation modeling the population under study is
	\[
		P(t) = \frac{10^4}{1 + 27e^{-t}},
	\]
	The population after another three years will be $P(4)$.
	\qed

	\begin{problem}
		Find the general solution of the following differential equation:
		\[
			y'' - 4y' + 5y = 6e^{-x}.
		\]
	\end{problem}

	\noindent {\it Solution:} The auxiliary equation, $z^2 - 4z + 5 = 0$ has to conjugate complex roots, namely $2-i$ and $2+i$, the set of solutions of the associated homogeneous equation, $y'' - 4y' + 5y = 0$, is
	\[
		a e^2\cos x + b e^2 \sin x \ \text{ where} \ a,b \in \rr.
	\]
	To find a particular solution of the non-homogeneous, substitute $y_0 = Ae^{-x}$ in the initial equation, and solve it to obtain $A = 3/5$. Hence the set of solutions for the given differential equation is
	\[
		\frac 35 e^{-x} + a e^2\cos x + b e^2 \sin x \ \text{ where} \ a,b \in \rr.
	\]
	\qed

	\begin{problem}
		Use power series to solve the following initial-value problem:
		\begin{equation} \label{eq:problem10}
			y'' + xy = 0, \quad y(0) = 1 \quad y'(0) = 0.
		\end{equation}
	\end{problem}
	
	\noindent {\it Solution:} Substituting
	\[
		y = \sum_{n=0}^\infty a_n x^n \ \text{ and } \ y'' = \sum_{n=2}^\infty a_n n(n-1)x^{n-2}
	\]
	in equation \eqref{eq:problem10} we obtain
	\begin{align*}
		0 &= \sum_{n=2}^\infty a_n n(n-1)x^{n-2} + x\sum_{n=0}^\infty a_n x^n \\
		  &= 2a_2 + \sum_{n=0}^\infty a_{n+3}(n+3)(n+2) x^{n+1} + \sum_{n=0}^\infty a_n x^{n+1} \\
		  &= 2a_2 + \sum_{n=0}^\infty \big(a_{n+3}(n+3)(n+2) + a_n\big)x^{n+1}.
	\end{align*}
	Therefore $a_2 = 0$ and for every $n \ge 0$ we can compute every coefficient $a_{n+3}$ in terms of $a_0$ and $a_1$ by using the formula
	\[
		a_{n+3} = \frac{-1}{(n+3)(n+2)}a_n.
	\]
	Therefore the set of solutions is
	\[
		y = a_0 \sum_{n=0}^\infty \frac{(-1)^n}{(3n)_1!}x^{3n} + a_1\sum_{n=0}^\infty \frac{(-1)^n}{(3n+1)_2!}x^{3n+1},
	\]
	where $(3n)_1!$ is the product of all integers from $1$ to $3n$ omitting those that are of the form $3k+1$, and $(3n+1)_2!$ is the product of all integers from $1$ to $3n+1$ omitting those that are of the form $3k+2$.
	\qed
	
	
%	\begin{thebibliography}{20}
		
	%	\bibitem{jS15} J.~Stewart: \emph{Single Variable Calculus} 8th Edition, Cengage Learning, Boston 2015.
		
%	\end{thebibliography}
	
\end{document}