%-----------------------------------------------
% DOCUMENT PREAMBLE
%-----------------------------------------------

\documentclass[12pt]{article}

%call general packages for use here
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ebgaramond-maths}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{MnSymbol}

%in-document hyperlink control
\usepackage{hyperref}

%TiKZ
\usepackage{tikz,pgfplots}
\usepackage{tkz-euclide}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{positioning}
\pgfplotsset{
every axis/.append style={
axis lines=middle,
axis line style={<->,white!50!black},
label style={font=\scriptsize,color=white!50!black},
tick label style={font=\scriptsize,color=white!50!black},
tick style={-,color=white!50!black},
major tick length={2pt},
}
}

%inserting image files
\usepackage{graphicx}
\graphicspath{images/}

%margin control
\usepackage{geometry} 
\geometry{
inner=1.75in,
outer=1.75in,
top=1.5in,
bottom=1.5in,
bindingoffset=.5cm,
%showframe %uncomment to see the type block
}

%section format control
\usepackage{titlesec}
\titleformat{\section}{\sc}{\thesection}{}{}
\titlespacing*{\section}{0cm}{0.5cm}{0.5cm}{}
\titleformat{\paragraph}[leftmargin]{}{}{}{}{}
\titlespacing*{\paragraph}{1em}{0.5cm}{0.5cm}{}
%\titlespacing{\paragraph}{0pt}{0pt}{1em}
\setlength{\parindent}{0pt}

%improves typeset quality
\usepackage{microtype}

%-----------------------------------------------
% BEGIN DOCUMENT
%-----------------------------------------------

\begin{document}

\thispagestyle{empty}

\begin{center}
{\Large NMU Math \& CS Department} \\
\vspace{0.5cm}
{\Large Problem of the Month, January 2023}
\end{center}

\paragraph{} Suppose there are two sine waves $10$ meters wide with $10$ meter amplitude, and they are moving towards one another at a constant rate of $1$ meter per second.

\begin{center}
\begin{tikzpicture}  
\begin{axis}[
trig format plots=rad,
y=1mm,
x=1mm,
scale=2,
xmin=-5,
xmax=40,
ymin=-5,
ymax=15,
xlabel={$x$},
ylabel={$y$},
ytick={0,10},
xtick={0,10,20,30},
%xticklabels={,,},
%yticklabels={,,},
]
\addplot[domain=0:10,samples=200,color=red!60!black,smooth,thick]({x},{(10*sin(pi*x/10))});
\addplot[domain=20:30,samples=200,color=red!60!black,smooth,thick]({x},{(10*sin(pi*x/10))});
\end{axis}
\end{tikzpicture}
\end{center}

\paragraph{} Suppose they don't interact as they pass each other, and consider the shaded region of their overlap.

\begin{center}
\begin{tikzpicture}  
\begin{axis}[
trig format plots=rad,
y=1mm,
x=1mm,
scale=2,
xmin=-5,
xmax=40,
ymin=-5,
ymax=15,
xlabel={$x$},
ylabel={$y$},
ytick={0,10},
xtick={0,10,20,30},
%xticklabels={,,},
%yticklabels={,,},
]
\addplot[domain=14:24,samples=200,color=red!60!black,smooth,thick]({x},{(10*sin(pi*(x-14)/10))});
\addplot[domain=14:15,samples=200,color=red!60!black,smooth,thick, name path=A]({x},{(10*sin(pi*(x-14)/10))});
\addplot[domain=6:16,samples=200,color=red!60!black,smooth,thick]({x},{(10*sin(pi*(x-6)/10))});
\addplot[domain=15:16,samples=200,color=red!60!black,smooth,thick, name path=B]({x},{(10*sin(pi*(x-6)/10))});
\addplot[draw=none,domain=14:16,name path=C]({x},{0});
\addplot[color=white!85!black] fill between[of=A and C];
\end{axis}
\end{tikzpicture}
\end{center}

\begin{center}
\begin{tikzpicture}  
\begin{axis}[
trig format plots=rad,
y=1mm,
x=1mm,
scale=2,
xmin=-5,
xmax=40,
ymin=-5,
ymax=15,
xlabel={$x$},
ylabel={$y$},
ytick={0,10},
xtick={0,10,20,30},
%xticklabels={,,},
%yticklabels={,,},
]
\addplot[domain=12:22,samples=200,color=red!60!black,smooth,thick]({x},{(10*sin(pi*(x-12)/10))});
\addplot[domain=12:15,samples=200,color=red!60!black,smooth,thick, name path=A]({x},{(10*sin(pi*(x-12)/10))});
\addplot[domain=8:18,samples=200,color=red!60!black,smooth,thick]({x},{(10*sin(pi*(x-8)/10))});
\addplot[domain=15:18,samples=200,color=red!60!black,smooth,thick, name path=B]({x},{(10*sin(pi*(x-8)/10))});
\addplot[draw=none,domain=12:18,name path=C]({x},{0});
\addplot[color=white!85!black] fill between[of=A and C];
\end{axis}
\end{tikzpicture}
\end{center}

\paragraph{} What is greatest rate of change experienced by the area of the shaded region? Make sure to include the correct units, and explain your work.

\end{document}