%----------------------------------
% This document can serve as a template for your own Portfolio Problem Solutions.
% Additionally, this is an example of an excellent solution.
%----------------------------------
% All of this stuff with '%' in front is a comment and ignored by the compiler.
%
% The lines before the "\begin{document}" line is called the preamble.
% This is where you load particular packages you need.
% Until you are more experienced, or the program says you are missing packages, it is safe to ignore it.
%
%----------------------------------
\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}
\setlength{\parindent}{0in}
%These packages allow the most of the common "mathly things"
\usepackage{amsmath,amsthm,amssymb}
%This package allows you to add graphs or any other images.
\usepackage{graphicx}
\usepackage{color}
\usepackage{enumerate}
\usepackage{multicol}
%------------------------------------------
% The stuff you want to edit starts here.
%------------------------------------------
\begin{document}
\title{Calculus I Portfolio} %You can change the title to something more catchy if you wish, just make sure it is equally informative.
\author{Professor Sarah}%Replace this with your name.
\maketitle
%I would recommend creating a new document by for each problem/project, and using the 'Share' button above so that collaborators can edit. Then copy the content, not the preamble and begin/end{document}, into a file that is your portfolio containing all final drafts in order.
{\bf Problem \#1 - Section 1.2 - Exercise 2} %Replace this with your chosen problem or the title of the lab/project.
\\
{\bf Collaborators:} Include the (first and last) names of your group members for projects
\\ % These double backslashes you see start a newline, or skips a line.
%Provide the entire statement of each part of the problem.
Let $\displaystyle{g(x) = -\frac{|x+3|}{x+3}}$.
% Mathematical input must be between two '$' and the command \displaystyle{} allows the fraction input to not be so squished.
\begin{enumerate}[(a)] %This environment numbers '\item's. The stuff in the square brackets specifies the form of the numbering. You can leave this out and it will start and 1 and continue. You can type this yourself (be sure to always include the matching \end{} command) or use the button above (possibly in the 'More' list).
\item What is the domain of $g$?
% You should always indicate your solution in some way. I'll use a couple of options in this template. Choose what you like best, or use another option, just be consistent throughout your document, unlike this example.
% \bf produces boldface font between { }. Similarly, you may use \it for italics.
{\bf Solution:} The domain of $g$ is all real numbers except $x = -3$, or equivalently $(-\infty, -3) \cup (-3, \infty)$. If we wanted to compute $g(-3)$ the denominator of the fraction would evaluate to 0. Outputs for any other real number input can be computed, and therefore those numbers are elements of the domain.
\bigskip
% You can specify vertical blank space in a few ways. This is one option. You can also use \smallskip or \medskip.
\item Use a sequence of values near $a = -3$ to estimate the value of $\lim_{x \rightarrow -3} g(x)$, if you think the limit exists. If you think the limit doesn't exist, explain why.
{\color{blue}
% I am trying to make use of as many different LaTeX tools as possible. You certainly do not need to use multiple columns, and they environment can be a bit finicky at times. The number between the final { } specifies the number of columns and is required.
\begin{multicols}{2}
% These double '$'s mean that the mathematical content is not inline, but gets its own line and is centered. Equivalently, you can use \[ and \].
% The array environment will allow you to build a variety of charts. The content of the final { } gives specifics about the columns. Here, there are two columns. The 'r' specifies the contents of the first column will be aligned on the right, the '|' creates the vertical line between columns, and the 'l' aligns the contents of the second column on the left. You can also use 'c' to center the column contents. The '&' within the array tell the compiler to move to the next cell, and the \\ move to a new line. \hline draws the horizontal line near the top. Note that the array environment itself must occur within a math environment: '$', '$$', or \[ \], but you do not need to do this for each cell entry.
$$\begin{array}{r|l}
x & g(x) \\
\hline
-3.1 & 1 \\
-3.01 & 1 \\
-3.001 & 1 \\
-3.0001 & 1 \\
-2.9999 & -1 \\
-2.999 & -1 \\
-2.99 & -1 \\
-2.9 & -1
\end{array}$$
\columnbreak %This isn't always necessary to start a new column, but can be helpful.
We can use a computer or calculator generate the table, or make the computations by hand. It appears from the table that the limit does not exist. Using inputs smaller than -3, we can make $g$ as close to 1 (actually, exactly 1) that we wish. Similarly, by using inputs larger than -3, we can make $g$ as close to -1 as we wish. Since the function $g$ cannot have two different limits at $x = -3$, we say the limit does not exist.
\end{multicols}
}
\newpage %You don't need to use this, I just didn't like how the page break happened right in the middle of the solution.
\item Use algebra to simplify the expression $\frac{|x+3|}{x+3}$ and hence work to evaluate $\lim_{x \rightarrow -3} g(x)$ exactly, if it exists, or to explain how your work shows the limit fails to exist. Discuss how your findings compare to your results in (b).
{\bf Solution:} Since the absolute value function is defined piece-wise, we will perform two different sets of calculations.
If $x > -3$, then $x + 3 > 0$ and
\begin{align*}
\frac{|x+3|}{x+3} & = \frac{x+3}{x+3}\\
& = 1.
\end{align*}
% The align environment is a special type of array with two columns. These are not long calculations here, but I wanted to show you align because it is very good for calculations with many steps. The '*' means the lines will not be numbered. You really only need the line numbers if you want to refer back to a specific step.
If $x < -3$, then $x + 3 < 0$ and
\begin{align*}
\frac{|x+3|}{x+3} & = \frac{-(x+3)}{x+3} \\
& = -1.
\end{align*}
These computations algebraically show that our chart from part (b) is not misleading. For $x < -3$, $g(x) = 1$ and for $x > -3$, $g(x) = -1$. Since these are distinct values, the limit of $g$ as $x$ approaches -3 does not exist.
\vspace{.5in}
% You can also specify vertical space this way. This works horizontally as well with something like \hspace{2cm}.
\item True or false: $g(-3) = -1$. Why?
\begin{quote} %This environment distinguishes its content by creating slightly wider margins.
Solution: This statement is false. Since -3 is not in the domain of $g$, the left side of the equation does not make sense. If we did evaluate $g$ at $x = -3$, we would arrive at $\frac{0}{0}$, an indeterminate form.
\end{quote}
\vfill
% When you have a nice nearly-full page of text, this is a good option and will space things out evenly if you put it in all the spots you want space.
\item True or false: $-\frac{|x+3|}{x+3} = -1$. Why? How is this equality connected to your work above with the function $g$?
\begin{quote}
{\color{blue}
This statement is also false. The equation holds only when $x > -3$. The expression on the left hand side is that of the function $g$, when it makes sense. Since the statement is false, this implies that the function $g$ has a discontinuity at $x = -3$.
}
\end{quote}
\vfill
\newpage
\item Based on all of your work above, construct an accurate, labeled graph of $y = g(x)$ on the interval $[-4, -2]$, and write a sentence that explains what you now know about $\displaystyle{\lim_{x \rightarrow -3} g(x)}$.
{\color{blue}
Solution: The following graph shows the attributes of $g$ determined above. Namely, that -3 is not in the domain, $g$ is discontinuous at $x = -3$, and $\displaystyle{\lim_{x \rightarrow -3} g(x)}$ does not exist.
\begin{center} %This centers everything.
\includegraphics[scale = .3]{PortfolioExampleGraph}
% Click on Project in the upper left. Then Add files... You need to upload your picture file here. I think pdf files tend to look the best, but you can explore other options. This graph was produced in GeoGebra and exported as a pdf file. The [ ] are optional and used to specify properties including size. You can use the 'scale' option as I have, or something like 'width = 4in' or 'height = 6cm'.
\end{center}
}
Notice that the $y$-axis crosses at $x = -2$, only so that it will appear in the picture.
\end{enumerate}
\end{document}