\documentclass[11pt,reqno]{amsart}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Math packages
\usepackage{amscd} %for diagrams
\usepackage{amsfonts} %extra math fonts
\usepackage{amsmath} %miscellaneous enhancements for math formulas
%\usepackage{amsrefs} %pack­age for bib­li­ogra­phies
%for alpha style while using amsart/amsrefs, use the option 
%\usepackage[shortalphabetic]{amsrefs} or [alphabetic], see
%https://tex.stackexchange.com/questions/381082/bibtex-style-alpha-is-not-working
\usepackage{amssymb} %extra math symbols
\usepackage{amsthm} %theorems set-up
\usepackage{latexsym} %extra math symbols
\usepackage{mathrsfs} %\math­scr sommand
\usepackage{mathtools} %pro­vides a se­ries of pack­ages de­signed to en­hance 
%the ap­pear­ance of doc­u­ments con­tain­ing a lot of math­e­mat­ics
%\mathtoolsset{showonlyrefs} %This numbers only equations that are labeled and referred to
       %Use \mathtoolsset{showonlyrefs=true,showmanualtags=true} to show also manual tags
       %For issues with subequations, use \noeqref to silently reference the equations, see:
       %https://tex.stackexchange.com/questions/62037/mathtools-showonlyrefs-fails-with-subequations
\usepackage{slashed}  %Use­ful for the Physi­cist’s ‘Feyn­man slashed char­ac­ter’ no­ta­tion.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Basic general latex packages
\usepackage{verbatim}
\usepackage{cases}
\usepackage[dvips]{epsfig}
\usepackage{epsf} %The orig­i­nal (and now ob­so­les­cent) graph­ics in­clu­sion 
%macros for use with dvips, still widely used by Plain TEX users (in par­tic­u­lar).
%\usepackage{hyperref}
\usepackage[bookmarksnumbered,pdfpagelabels=true,plainpages=false,colorlinks=true,
            linkcolor=black,citecolor=black,urlcolor=black]{hyperref}
\usepackage{url}
\usepackage{color}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{enumitem} %for breaks in enumeration:
%http://tex.stackexchange.com/questions/135726/intertext-like-command-in-enumerate-environment
\usepackage{cite} %automatically order references in multiple cites

%More general latex packages
\usepackage{pifont} %com­mands for Pi fonts
\usepackage{upgreek} %up­right Greek let­ters
\usepackage{fancyhdr} %ex­ten­sive fa­cil­i­ties, both for con­struct­ing head­ers and foot­ers, 
%and for con­trol­ling their use
\usepackage{calligra} %cal­li­graphic font in the hand­writ­ing style
\usepackage{marvosym} %Euro cur­rency sym­bol as de­fined by the Euro­pean com­mis­sion, 
%along with sym­bols for struc­tural en­gi­neer­ing; sym­bols for steel cross-sec­tions; 
%as­tron­omy signs (sun, moon, plan­ets); the 12 signs of the zo­diac; scis­sor sym­bols; 
%CE sign and oth­ers.
\usepackage[percent]{overpic} %a cross be­tween the LATEX pic­ture en­vi­ron­ment and 
%the \in­clude­graph­ics com­mand
\usepackage{pict2e} %ex­tends the ex­ist­ing LATEX pic­ture en­vi­ron­ment
\usepackage[hypcap=false]{caption} %option false to avoid warning when hyperref is loaded
\usepackage{wasysym} %The WASY2 (Waldi Sym­bol) font by Roland Waldi pro­vides many 
%glyphs like male and fe­male sym­bols and as­tro­nom­i­cal sym­bols, as well as the 
%com­plete lasy font set and other odds and ends
\usepackage{accents}
\usepackage{float} % used to place images in exact locations 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Margins, spacing, etc.

%EXACT 1in MARGINS with geometry package                         
%geometry package:
%ftp://ftp.fu-berlin.de/tex/CTAN/macros/latex/contrib/geometry/geometry.pdf
\usepackage[papersize={8.5in,11in}, margin=1in,footskip=0.4in,vmarginratio={1:1},hmarginratio={1:1}]{geometry} 
%nohead option from:
%see the documentaion and:
%https://tex.stackexchange.com/questions/318696/1-inch-all-around
%Uselful: option showframe prints the frames on the page for actual visualization
%marginratio is important when using amsart, see:
%https://tex.stackexchange.com/questions/133860/problem-with-margins-using-amsart-and-geometry-packages

%EXACT 1in MARGINS by hand       
%\setlength{\textwidth}{6.5in}     
%\setlength{\oddsidemargin}{0in} 
%\setlength{\evensidemargin}{0in}  
%\setlength{\textheight}{8.8in}   
%\setlength{\topmargin}{0in}      
%\setlength{\headheight}{0in}     
%\setlength{\headsep}{0in}        
%\setlength{\footskip}{.2in}      

%These give wider space on the page
%\setlength{\textwidth}{6.75in} \setlength{\textheight}{8.6in}
%\hoffset=-0.9truein \voffset=-0.1truein
%\baselineskip=7.0mm
%\setlength{\baselineskip}{1.09\baselineskip}
%These are all to reduce blank space between paragraphs, sections etc
%http://www.terminally-incoherent.com/blog/2007/09/19/latex-squeezing-the-vertical-white-space/
%see also
%http://tex.stackexchange.com/questions/108684/spacing-before-and-after-section-titles
%\usepackage[compact]{titlesec}
%\setlength{\parskip}{0pt}
%\setlength{\parsep}{0pt}
% \setlength{\headsep}{0pt}
%\setlength{\topskip}{0pt}
% \setlength{\topmargin}{0pt}
%\setlength{\topsep}{5pt}
%\setlength{\partopsep}{0pt}
%\linespread{0.95}
%\titlespacing{\section}{0pt}{3pt}{1pt}
%\titlespacing{\subsection}{0pt}{3pt}{1pt}
%\titlespacing{\subsubsection}{0pt}{*0}{*0}

%Changing margins in parts of the text:
%http://tex.stackexchange.com/questions/68855/changing-top-bottom-left-right-margins-on-the-fly
%\begin{adjustwidth}{2cm}{2cm}
%text here
%\end{adjustwidth}
%\usepackage{changepage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Counting, table of contents, etc.
\setcounter{secnumdepth}{4} %depth to which section numbering occurs
\setcounter{tocdepth}{4}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Header, running title
%Comment these to eliminate the running title and authors in the header
\pagestyle{fancy}
\headheight 27pt
\rhead[]{\thepage}
\chead[\textsf{MATH 2610}]{\textsf{Vanderbilt University}}
\lhead[\thepage]{}
\rfoot[]{}
\cfoot{}
\lfoot{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Theorems, definitions, equations, etc.
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{claim}[theorem]{Claim}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{assumption}[theorem]{Assumption}

\theoremstyle{definition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{convention}[theorem]{Convention}

\newenvironment{dem}{{\noindent \bf Proof: }}{\hfill $\qed$\\ \medskip}
\newenvironment{sketch}{{\noindent \bf Proof sketch: }}{\hfill $\qed$\\ \medskip}

%\numberwithin{equation}{section}
\allowdisplaybreaks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%General commands

%%%%%%%%%%%%%%%%
\newcommand{\norm}[1]{\Vert#1\Vert}
\newcommand{\abs}[1]{\vert#1\vert}
\newcommand{\nnorm}[1]{\left\Vert#1\right\Vert}
\newcommand{\aabs}[1]{\left\vert#1\right\vert}
\newcommand{\generalfunction}{\mathrm{f}}
\newcommand{\td}{t} %use for the time variable, and if one wants to change it for x^0, adjust here

\newcommand{\dive}{\mbox{\upshape div}\mkern 1mu}
\newcommand{\curl}{\mbox{\upshape curl}\mkern 1mu}
\newcommand{\tr}{\operatorname{tr}}
\newcommand{\vol}{\operatorname{vol}}
\newcommand{\id}{\operatorname{id}}


%to create space among tensor indices
\newcommand{\mss}{\hspace{0.2cm}}
\newcommand{\ms}{\hspace{0.25cm}}
\newcommand{\msm}{\hspace{0.3cm}}
\newcommand{\msb}{\hspace{0.35cm}}
%alternatively, using tensor package, e.g., $M\indices{^\alpha_\beta}$.
\usepackage{tensor}

%Variables and operators in text form: choose between using 
%\mbox, \operatorname, etc.:
%\newcommand{\uperpvort}{\mbox{\upshape vort}}
%\newcommand{\uperpvort}{\operatorname{vort}}
%See:
%https://tex.stackexchange.com/questions/70632/difference-between-various-methods-for-producing-text-in-math-mode
%https://tex.stackexchange.com/questions/48459/whats-the-difference-between-mathrm-and-operatorname/48463
%for differences


%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Enumerating etc.
%https://tex.stackexchange.com/questions/116101/add-bold-enumerate-items
%https://tex.stackexchange.com/questions/23723/latex-enumerate-bold-item-with-non-bold-text
\newenvironment{myenumeratealpha}
{ 
	\begin{enumerate}[label=\textbf{(\alph*)},ref=(\alph*), itemsep=1pt,parsep=0pt,topsep=2pt,labelsep=2pt,wide]
}
{ \end{enumerate}                  } 

\newenvironment{myenumerateroman}
{ 
	\begin{enumerate}[label=\textbf{(\roman*)},ref=(\roman*), itemsep=1pt,parsep=0pt,topsep=2pt,labelsep=2pt,wide]
}
{ \end{enumerate}                  } 

\newenvironment{myenumerateRoman}
{ 
	\begin{enumerate}[label=\textbf{(\Roman*)},ref=(\Roman*), itemsep=1pt,parsep=0pt,topsep=2pt,labelsep=2pt,wide]
}
{ \end{enumerate}                  } 

\newenvironment{myitemize}
{ 
	\begin{itemize}[itemsep=1pt,parsep=0pt,topsep=2pt,labelsep=2pt,wide=6pt]
}
{ \end{itemize}                  } 
%%%%%%%%%%%%%%%%


\begin{document}
%The [Short title] and [Disconzi] will be overriden by the Header, running title commands
\title[MATH 2610]{MATH 2610, Examples of section 2.3}
\author[Vanderbilt]{Vanderbilt University}

\maketitle



\noindent \textbf{Question 1.} Find a solution to the initial value problem
\begin{gather}
\begin{cases}
(50+t) x^\prime + x - 8t = 400 , \\
 x(0) = 10,
\end{cases}
\nonumber
\end{gather}
where $t\geq 0$. 

\vskip 0.2cm 

\noindent \textbf{Question 2.} Consider the two interconnected tanks shown 
in figure \ref{fig_tanks}. Tank 1 initially contains $30 gal$ of water
and $25 oz$ of salt, while tank 2 initially contains $20 gal$ of water and $15 oz$ of salt. Water containing $1 oz/gal$ of salt
flows into tank 1 at a rate of $1.5 gal/min$. The mixture flows from tank 1 to tank 2 at a rate of $3gal/min$. Water containing
$3 oz/gal$ of salt also flows into tank 2 at a rate of $1 gal/min$ (from the outside, see picture). The mixture drains from tank 2
at a rate of $4 gal/min$, of which some flows back to tank 2 at a rate of $1.5 gal/min$, while the remainder leaves the tank. \\
(a) Let $Q_1(t)$ and $Q_2(t)$, respectively, be the amount of salt in each tank at time $t$. Write down differential equations
and initial conditions that model the flow process. Observe that the system of differential equations is non-homogeneous. \\
(b) Find the values of $Q_1(t)$ and $Q_2(t)$ for which the system is in equilibrium, i.e., does not change with time.

\begin{figure}[!ht]
\centering
\includegraphics[scale=.5]{fig_tanks.pdf}
\caption{Tanks of problem 2.}
\label{fig_tanks}
\end{figure}


\vskip 0.2cm

\noindent \textbf{SOLUTIONS.} 
\vskip 0.2cm

\noindent \textbf{Question 1.} Since $t \geq 0$, we can divide the 
equation by $50 + t$ as this term is never zero, obtaining
\begin{gather*}
 \frac{dx}{dt} + \frac{x}{50 + t} - \frac{8t}{50 + t} = \frac{400}{50+t},
\end{gather*}
or,
\begin{gather*}
 \frac{dx}{dt} + \frac{x}{50 + t}  = \frac{400 + 8t}{50+t}  
 = 8\frac{50 + t}{50+t} = 8.  
\end{gather*}
The equation
\begin{gather*}
 \frac{dx}{dt} + \frac{x}{50 + t} = 8.
\end{gather*}
is a linear first order equation. As showed in class, the general solution to
\begin{gather}
x^\prime + p x = q,
\label{eq}
\end{gather}
is
\begin{gather}
x(t) = \Big ( \int q(t) e^{\int p(t)\,dt}\, dt + C \Big ) e^{-\int p(t)\,dt}.
\label{formula}
\end{gather}
It is \textbf{very important} to notice that (\ref{formula}) can 
only be applied when the equation is written in the form (\ref{eq}), i.e., 
with the coefficient multiplying $x^\prime$ being one. That's why 
we had to first divide the equation by $50+t$.

In our case, using (\ref{formula}), we find:
\begin{gather*}
 x(t) = \frac{4(t^2 + 100t + 125)}{50 + t}.
\end{gather*}

\vskip 0.2cm

\noindent \textbf{Question 2.}
The volumes of the tanks 1 and 2 are
\begin{gather*}
V_1(t) = 30 + 1.5t - 3t + 1.5 t = 30, \\
V_2(t) = 20 + 3t + 1t  - 4t = 20.
\end{gather*}
We can write an equation of the form
\begin{gather}
\text{rate of change of salf in the tank } = \text{ in } - \text{ out },
\nonumber
\end{gather}
as done in the examples of section 1.1 
Then
\begin{align*}
\begin{cases}
\begin{array}{rrr}
Q_1^\prime & = &1.5 \times 1 - 3 \frac{Q_1}{V_1} + 1.5 \frac{Q_2}{V_2}, \\
Q_2^\prime & = & 1 \times 3  + \frac{Q_1}{V_1}  - 4\frac{Q_2}{V_2}, 
\end{array}
\end{cases} \\
Q_1(0) = 25, Q_2(0) = 15.
\end{align*}
Or
\begin{align*}
\begin{cases}
\begin{array}{rrr}
Q_1^\prime & = &1.5 - \frac{Q_1}{10} +  \frac{1.5}{20} Q_2, \\
Q_2^\prime & = & 3  + \frac{Q_1}{20}  -4\frac{Q_2}{20}, 
\end{array}
\end{cases} \\
Q_1(0) = 25, Q_2(0) = 15.
\end{align*}
The equilibrium is given by 
\begin{align*}
\begin{cases}
\begin{array}{rrr}
0 & = &1.5 - \frac{Q_1}{10} +  \frac{1.5}{20} Q_2, \\
0 & = & 3  + \frac{Q_1}{20}  -4\frac{Q_2}{20}, 
\end{array}
\end{cases} 
\end{align*}
which gives $Q_1^E = 42$, $Q_2^E = 36$.


\bibliographystyle{plain}
\bibliography{References.bib}

\end{document}
