EML 3002L M.E. Tools Lab 10/04/16
Mathcad only Van Dommelen 12:30-1:45 pm

NO CELL PHONES. NO HEADPHONES/BUDS. NO CALCULATORS. You may only have a pen or pencil with you and use this exam sheet for scratch paper. ONLY MATHCAD AND ITS HELP MAY BE ACTIVE ON YOUR COMPUTER. REMAIN SEATED AT ALL TIMES.

FILE PATH AND NAME IN THE LEFT HEADER, YOUR NAME IN THE RIGHT HEADER. PAGE N OF NN IN THE CENTER FOOTER.

SAVE FREQUENTLY. A CRASH IS NO EXCUSE FOR ANYTHING. SAVE BEFORE PDF CREATION!!!

After translation into mathematics, only Mathcad may be used to solve the full problem as posed. Use the appropriate procedures as covered in the lectures. Answers must be boxed.

  1. (20%) A notoriously ill-conditioned matrix is the Vandermonde matrix. The simplest example of a Vandermonde matrix is

    \begin{displaymath}
V_{i,j}=i^{j-1}\qquad\mbox{for}\qquad i=1,\ldots,n \quad j=1,\ldots,n
\end{displaymath}

    Warning: note that we are numbering indices here starting from 1. Take $n=8$ and let $i$ and $j$ range from 1 to $n$. Then define matrix V as in the formula above. Show the matrix with all coefficients simple integers (i.e. no powers of 10 as MathCAD does by default). Given that numbers in MathCAD in our lab have a relative error of roughly $10^{-16}$, determine the expected relative error in the solution of a system $V\vec x=\vec b$. Now as an example take vector $\vec b$ so that $b_i=i^6$. Find $x$. Given that the exact solution $\vec x$ has all coefficients zero except the second-last one, which is 1, state the actual relative error. (This is a bit smaller than expected, maybe because all initial numbers in the system are exact integers.)

    Solution

  2. (20%) Find the barrel (approximated as a right-circular cylinder of radius $r$ and height $h$) that has the smallest surface area (so material cost) given that the volume $V(r,h)$ must be at least 2 m$^3$. (Include the circular top and bottom as well as the curved lateral side in the area.) Take the initial guesses for radius and height to be 1 m each. Be sure to print out the best $r$ and $h$ individually.

    Solution

  3. (40%) We measured a function $f$ that, unknown to us, is exactly equal to $f_{\rm ex}(t)=\sin(t)$. We did 9 measurements $i=1,\ldots,9$ at time values $-4+0.8i$. Show vectors $t_{\rm m}$ and $f_{\rm m}$. Because we see that the measurements are anti-symmetric around $x=0$, we would like to approximate them in the least-square sense by a cubic of the form

    \begin{displaymath}
f_{\rm cls}(t) = C_1 + C_2 t + c_3 t^3
\end{displaymath}

    (Note final power is 3.) Find this function.

    Then make a presentation-quality graph that shows exact and approximating cubic above as lines of different colors, and the measured values as symbols. Label axes as simply $f$ and $t$, and title the graph as Cubic Least Squares. Make sure to provide a suitable high-quality legend.

    Solution

  4. (20%) Consider the function

    \begin{displaymath}
f(x,y) = (x^4+y^4)^{1/4}
\end{displaymath}

    (No, MathCAD does not, as far as known, allow you to undefine variables. If you have a name conflict with earlier variables, the best way seems to be to simply change names.) Solve the equation $f(x,y)=1$ symbolically for $y$ as a function of $x$.

    Then make a contour plot, showing contours of constant $f$ in the $x,y$-plane. (Presentation quality is not required.)

    Solution

Solutions without credit distribution.