parallel when a=2
perpendicular when a=-1/2
Check the picture below.
since the diameter of the cone is 6", then its radius is half that or 3", so getting the volume of only the cone, not the top.
1)
![\bf \textit{volume of a cone}\\\\ V=\cfrac{\pi r^2 h}{3}~~ \begin{cases} r=radius\\ h=height\\[-0.5em] \hrulefill\\ r=3\\ h=4 \end{cases}\implies V=\cfrac{\pi (3)^2(4)}{3}\implies V=12\pi \implies V\approx 37.7](https://tex.z-dn.net/?f=%5Cbf%20%5Ctextit%7Bvolume%20of%20a%20cone%7D%5C%5C%5C%5C%20V%3D%5Ccfrac%7B%5Cpi%20r%5E2%20h%7D%7B3%7D~~%20%5Cbegin%7Bcases%7D%20r%3Dradius%5C%5C%20h%3Dheight%5C%5C%5B-0.5em%5D%20%5Chrulefill%5C%5C%20r%3D3%5C%5C%20h%3D4%20%5Cend%7Bcases%7D%5Cimplies%20V%3D%5Ccfrac%7B%5Cpi%20%283%29%5E2%284%29%7D%7B3%7D%5Cimplies%20V%3D12%5Cpi%20%5Cimplies%20V%5Capprox%2037.7)
2)
now, the top of it, as you notice in the picture, is a semicircle, whose radius is the same as the cone's, 3.
![\bf \textit{volume of a sphere}\\\\ V=\cfrac{4\pi r^3}{3}~~ \begin{cases} r=radius\\[-0.5em] \hrulefill\\ r=3 \end{cases}\implies V=\cfrac{4\pi (3)^3}{3}\implies V=36\pi \\\\\\ \stackrel{\textit{half of that for a semisphere}}{V=18\pi }\implies V\approx 56.55](https://tex.z-dn.net/?f=%5Cbf%20%5Ctextit%7Bvolume%20of%20a%20sphere%7D%5C%5C%5C%5C%20V%3D%5Ccfrac%7B4%5Cpi%20r%5E3%7D%7B3%7D~~%20%5Cbegin%7Bcases%7D%20r%3Dradius%5C%5C%5B-0.5em%5D%20%5Chrulefill%5C%5C%20r%3D3%20%5Cend%7Bcases%7D%5Cimplies%20V%3D%5Ccfrac%7B4%5Cpi%20%283%29%5E3%7D%7B3%7D%5Cimplies%20V%3D36%5Cpi%20%5C%5C%5C%5C%5C%5C%20%5Cstackrel%7B%5Ctextit%7Bhalf%20of%20that%20for%20a%20semisphere%7D%7D%7BV%3D18%5Cpi%20%7D%5Cimplies%20V%5Capprox%2056.55)
3)
well, you'll be serving the cone and top combined, 12π + 18π = 30π or about 94.25 in³.
4)
pretty much the same thing, we get the volume of the cone and its top, add them up.

Assuming the 12 students are the remaining 1/8th, you'd have 96 students, since 12*8=96
When the domain of the function is continuous, a different approach may well be required, although even here we note that in practice, optimization problems are usually solved using a computer, so that in the final analysis the solutions are represented by strings of binary digits (bits).