\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{Solutions for Quiz 3}
	
	\maketitle
	
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%\section{Introduction} \label{sec:intro}
	\noindent {\footnotesize Note: Most of the problems were taken from the textbook} \cite{jS15}. %\\
	
	%---------------------------------PROBLEM 1
	
	\begin{problem}
		Find the Maclaurin series of $f(x) = \frac{1}{\sqrt{5-x}}$.
	\end{problem}

	\noindent {\it Solution:} 
		Notice that
		\begin{align*}
			\frac{1}{\sqrt{5 - x}} &= \frac{1}{\sqrt{5}} \left( 1 -  \frac{x}{5} \right)^{-1/2} \\
											&= \frac{1}{\sqrt{5}}  \sum_{n  = 0}^\infty \binom{-1/2}{n} \left( -\frac{x}{5} \right)^n \\
											&= \frac{1}{\sqrt{5}}  \sum_{n  = 0}^\infty \frac{ (-1)^n (-\frac{1}{2}) (-\frac{1}{2} - 1) \dots (-\frac{1}{2} - n + 1) }{5^n n!} x^n \\
											&= \frac{1}{\sqrt{5}}  \sum_{n  = 0}^\infty \frac{(\frac{1}{2}) (\frac{1}{2} + 1) \dots (\frac{1}{2} + n - 1) }{5^n n!} x^n \\
											&= \frac{1}{\sqrt{5}}  \sum_{n  = 0}^\infty \frac{1 \cdot 3 \cdot \ldots \cdot (2n - 1)}{10^n n!} x^n.
		\end{align*}
	\hfill \qed
    %\vspace{10pt}
	
	%---------------------------------PROBLEM 2
	
	\begin{problem}
		Evaluate $\int_0^1 e^{-x^2} \, dx$ correct to within an error of $0.001$. [Hint: Use Taylor expansion, then use the Alternating Estimation Theorem.]
	\end{problem}
	
	\noindent {\it Solution:}
		The Taylor series for $f(x) = e^{-x^2}$ is
		\[
			e^{-x^2} = \sum_{n = 0}^{\infty} \frac{(-x^2)^n}{n!} = \sum_{n = 0}^{\infty} (-1)^n \frac{x^{2n}}{n!}.
		\]
		Then
		\begin{align*}
			\int_0^1 e^{-x^2} dx &= \int_0^1 \bigg(\sum_{n = 0}^{\infty} (-1)^n \frac{x^{2n}}{n!}\bigg) dx \\
			&= \bigg(\sum_{n = 0}^{\infty} (-1)^n \frac{ x^{2n + 1}} {(2n + 1)n!} \bigg) \bigg|_0^1 \\
			&= \sum_{n = 0}^{\infty} (-1)^n \frac{1} {(2n + 1)n!}  \\
			&= 1 - \frac{1}{3} + \frac{1}{10} - \frac{1}{42} + \frac{1}{216} - \frac{1}{1320} + \cdots.
		\end{align*}
		After applying the Alternating Estimation Theorem to estimate the error, we see that the first term with absolute within the given value of $0.001$ is the sixth term (i.e., $n = 5$)
		\[
			\frac{1}{11 \cdot 5!} = \frac{1}{1320} < 0.001.
		\]
		Hence, 
		\[
			\int_0^1 e^{-x^2} dx \approx  1 - \frac{1}{3} + \frac{1}{10} - \frac{1}{42} + \frac{1}{216}.
		\]
		is an approximation within the given error.
	\hfill \qed
	
	%---------------------------------PROBLEM 3
	

	\begin{problem}
		Solve the differential equation $\frac{dy}{dx} = \frac{x^5 + 1}{x^3y^2 + y^4x^3}$.
	\end{problem}

	\noindent {\it Solution:}
		We can rewrite our initial equation as
		\[
			\frac{dy}{dx} = \frac{x^5 + 1}{x^3(y^2 + y^4)} = \left(\frac{x^5 + 1}{x^3}\right) \left(\frac{1}{y^2 + y^4}\right)
		\]
		and we obtain that
		\begin{equation} \label{eq1}
			\int (y^2 + y^4) dy = \int \frac{x^5 + 1}{x^3} dx \tag{1}
		\end{equation}
		Integrating equation (\ref{eq1}), we have
		\[
			\frac{1}{3}y^3 + \frac{1}{5} y^5 = \frac{1}{3} x^3 - \frac{1}{2 x^2} + C. 
		\]
		
	\hfill \qed
	
	%---------------------------------PROBLEM 4

	
	\begin{problem}
		Suppose that a population develop according to the logistic equation $dP/dt = 0.06P - 0.0006P^2$, where $t$ is measured in weeks. (a) What is the carrying capacity? (b) What is the value of $k$? (c) What are the equilibrium solutions. (d) If the initial population is $50$, what is the population after $10$ weeks?
	\end{problem}
	
	\noindent {\it Solution:} 
		Rewriting the given logistic equation, we have
		\[
			dP/dt = 0.06P(1 - 0.01P) = 0.06P\bigg(1 - \frac{P}{100}\bigg). \tag{2} \label{eq2}
		\]
		As a result, the carrying capacity is $M = 100$ (a) and $k = 0.06$ (b). 
		For part (c), we need to find the values of $P$ for which $dP/dt = 0$. Looking at (\ref{eq2}), we see that $dP/dt = 0$ only when $P = 0$ or $P = 100$. Hence, the equilibrium solutions are $P = 0$ and $P = 100$. 
		Lastly, for part (d), we need to find the solution to the logistic equation, namely, we need to find the values of $A$, $k$, and $M$ and substitute them in the following equation
		\[
			P(t) = \frac{M}{1 + Ae^{-kt}}.
		\]
		In previous parts, we found the values of $M = 100$ and $k = 0.06$. To find $A$, we use the formula
		\[
			A = \frac{M - P_0}{P_0} = \frac{100 - 50}{50} = 1.
		\]
		Thus,
		\[
			P(t) = \frac{100}{1 + e^{-0.06t}}.
		\]
		Finally, the population after 10 weeks is $P(10) = 100/(1 + e^{-0.6})$.
		
	\hfill \qed
	
	
	%---------------------------------PROBLEM 5
	
	\begin{problem}
		Solve the first-order linear differential equations:
		\begin{enumerate}
			\item $y' - y = e^x$
			\item $y' + 2xy = 1$.
		\end{enumerate}
	\end{problem}
	
	\noindent {\it Solution:} 
	
	\begin{enumerate}
		\item We have $P(x) = -1$, $Q(x) = e^x$, and $I(x) = e^{\int-1dx} = e^{-x}$. Hence
		\[
			y = (x + C)e^x.
		\]
		\item Multiplying by $e^{x^2}$ the given equation, we obtain
		\[
			e^{x^2}y' + e^{x^2}2xy = e^{x^2}.
		\]
		Moreover, integrating the previous equation, we have
		\begin{align*}
			e^{x^2}y = \int (e^{x^2}y)' &= \int e^{x^2} dx
		\end{align*}
		and, therefore,
		\begin{align*}
		y &= \frac{\int e^{x^2} dx}{e^{x^2} }.
		\end{align*}
		
	\end{enumerate}
	
	\hfill \qed
	
	\begin{thebibliography}{20}
		
		\bibitem{jS15} J.~Stewart: \emph{Single Variable Calculus} 8th Edition, Cengage Learning, Boston 2015.
		
	\end{thebibliography}
	
\end{document}