\noi
\be
\item Show that if $S_1$ and $S_2$ are each convex sets in $\R^n$, then
$\ds S_1 \cap S_2$ is also convex.

\item Use Definition \ref{Th:convexity_FOC_convexity_def} to show that each of the following functions is convex on its given domain.
\be
\item The absolute value function,  $f(x)=|x|$. (Hint: Use the triangle inequality.)
\item Any quadratic function, $f(x)=ax^2+bx+c$, where $a$, $b$, and $c$ are real numbers and $a \geq 0$.
\item The Euclidean norm function, $f:\R^n \to \R$ defined as $f(\vecx)=\| \vecx \|$.
\ee

\item Show that the \emph{affine transformation}, $f: \R^n \to \R$, defined
as $f(\vecx)= \veca^t \vecx +b$, for some fixed vector, $\veca$, in $\R^n$ and
fixed real number, $b$, is both convex and concave on $\R^n$.

\item Show that $f(x)=x^4$ is strictly convex on $\R$. (Hint: Use Theorem \ref{Th:convexity_FOC_linear_approx_inequality}.)

\item Suppose that $\ds f(x_1,x_2)= 2x_1^2x_2+x_1^2x_2^2-4x_1x_2-2x_1x_2^2$.
Show that
$f$ is neither convex nor concave on $\R^2$. (Hint: First fix $x_1$,
say $x_1=1$, and consider the graph of $f(1,x_2)$. Then fix $x_2=1$ and consider the graph of $f(x_1,1)$.)

\item Suppose $f:S \to \R$ and $g:S \to \R$ are both convex. Show that
$\alpha f + \beta g$ is then convex on $S$ for any nonnegative values of $\alpha$ and $\beta$.

\item Suppose  $S \subseteq \R^n$ and that $f:S \to \R$ is a convex function. If
$\psi:\R \to \R$ is convex on $f(S)$, show that the composite, $\psi \circ f$, is convex on $S$.

%\item Let $\ds A=\begin{bmatrix} \alpha & 0 \\ 0 & \beta \end{bmatrix}$ and define
%$f:\R^2 \to \R$ by $\ds f(\vecx)=\vecx^t A \vecx$.
%	\be
%	\item For what values of $\alpha$ and $\beta$ will $f$ be convex? strictly convex?
%	\item For what values of $\alpha$ and $\beta$ will $f$ be concave? strictly concave?
%	\ee
\item Suppose $f: \R^n \to \R$ is convex and differentiable on $\R^n$, $A$ is an $n$-by-$n$ matrix, and $\vecb$ a vector in $\R^n$. Define $\phi: \R^n \to \R$ by
    $\phi(\vecx)=f(A\vecx+\vecb)$. Show that $\phi$ is convex on $\R^n$ and
     determine a formula for $\nabla \phi(\vecx)$ in terms of $\nabla f$.
\item Suppose that $\ds S \subseteq \R^n$
is convex and that $\ds f:S \to \R$ is a convex function. For fixed $y \in \R$, we define
the corresponding \emph{lower-level set}\index{lower level set} as
\begin{equation}
f^{-1}(y)=\left\{\vecx \mid \vecx \in S \mbox{ and } f(\vecx) \leq y \right\}.
\end{equation}
Prove that $\ds f^{-1}(y)$ is a convex set for every $y \in \R$.

\item Suppose that the constraint functions
$g_1,g_2,\ldots,g_m$ in the general NLP (\ref{E:overview_NLP_general_NLP_form})
are all convex. Show that the feasible region of the NLP is then a convex set.
(Hint: Combine the result from the previous exercise with that of Exercise 1.)


\item The \emph{Body Fat Index} (BFI) is one means of measuring an
individual's fitness. One method of computing this value is Brozek's formula,
which defines
\begin{equation*}
\mbox{BFI} = \frac{457}{\rho}-414.2,
\end{equation*}
where $\rho$ denotes the body density in units of kilograms per liter. Unfortunately,
an accurate measurement of $\rho$ can only be accomplished through a
process known as hydrostatic weighing, which requires recording an individual's weight while
under water, with all air expelled from his or her lungs. In an effort to devise less time-consuming means
for estimating BFI, researchers have collected data that suggests a linear relationship
between BFI and various body measurements \cite{PenroseBodyFat}. Table \ref{Ta:BodyMeasurementData} lists
the weight, height, and various body measurements for ten individuals. The last column
indicates the BFI for these same individuals, as determined by the process of hydrostatic
weighing and Brozek's formula.

\newpar
Let $\vecx$ denote a vector in $\R^5$ that records a person's weight, height, abdomen
circumference, wrist circumference, and neck circumference. Use multiple linear regression to find the linear function
$\ds f:\R^n \to \R$, given by $f(\vecx)=\veca^t\vecx$, which best
fits the given data, in the sense of least-squares, and can be used
to predict an individual's body fat index, based upon the five obtained measurements types.
Calculate the corresponding coefficient of determination.

\begin{table}[h]
\caption{Body measurement data}
\label{Ta:BodyMeasurementData}
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
Weight (lb.) & Height (in.) & Abdomen (cm.)  & Wrist (cm.) & Neck (cm.) & BFI \\ \hline
154.25	& 67.75 & 85.2 	& 17.1 & 36.2 & 12.6 \\ \hline
173.25	& 72.25 & 83 	& 18.2 & 38.5 & 6.9 \\ \hline
154		& 66.25 & 87.9 	& 16.6 & 34 & 24.6 \\ \hline
184.75	& 72.25 & 86.4 	& 18.2 & 37.4 & 10.9 \\ \hline
184.25	& 71.25 & 100 	& 17.7 & 34.4 & 27.8 \\ \hline
210.25	& 74.75 & 94.4 	& 18.8 & 39 & 20.6 \\ \hline
181		& 69.75 & 90.7 	& 17.7 & 36.4 & 19 \\ \hline
176		& 72.5 	& 88.5 	& 18.8 & 37.8 & 12.8 \\ \hline
191		& 74 	& 82.5 	& 18.2 & 38.1 & 5.1 \\ \hline
198.25	& 73.5 	& 88.6 	& 19.2 & 42.1 & 12 \\ \hline
\end{tabular}
\end{table}

\ee 