Why can utility functions be continuous, and what does this imply for marginal utility? I am studying microeconomics at the introductory undergraduate level and two related but distinct questions are puzzling me. 

First, my textbooks express utility functions as continuous functions by default, but this is puzzling. If the consumer can only consumer in whole number quantities (indeed from what I've seen so far, the solutions for the optimal basket all involve whole number quantities), then surely the utility function should be a discrete function, not continuous? A continuous utility function implies that an optimal basket could be say, x=8.232324232342, y=3.23942, for instance. 

Secondly, even we if we accept as fact that a utility function can be continuous, how exactly do we interpret the concept of marginal utility at a point? So for instance, given the utility function (single good) $U(X)=X^2+6X+7$, the marginal utility of consuming the 6th good should be $U(6)-U(5)$, because marginal utility is the increase in utility as a result of consuming an additional unit of the good. Instead, marginal utility is, in fact just, $U'(6)$ which is usually not equivalent to $U(6)-U(5)$ (it's not in this case, too). So what's going on here? Am I missing something? I know the former way is called the "arc" measure, and the latter the "point" measure - I understand the arc measure, but I cannot understand the point measure. Doesn't marginal utility always measure the increase in utility arising from consuming one additional unit of the good? The point measure seems to imply $U'(6) = U(6)-U(5.999999999...)$.
Utility functions can be continuous because quantitites can be continuous. (Think liters instead of bottles of wine or kilos instead of loafs of bread.) But even if quantities are discrete; whenever a unit is reasonably small (grains of salt: yes; cars: no) it is just way more convenient to work with smooth functions than with discrete ones, since the former allow you to calculate derivatives.

Introductory textbooks often use discrete quantities ("additional utility of consuming the next unit") to define marginal utility, since this is more intuitive. However, as soon as you have smooth utility functions, you better use the derivative of utility instead. Think of the point measure as the limit of the arc measure as the increase in quantity goes to zero. (That's more or less how the derivative is defined.) If quantities are discrete but very small and your utility function is reasonable, then the two measures are almost identical anyway. As an example, if your utility function is defined over $x$ = the number of grains of salt on your chips, then, using e.g. $u(x)=1-(x/100-1)^2$, your $MU$ at $x=100$ is $0$ if you use the derivative and $-0.0001$ if you just calculate $u(101)-u(100)$. To find the optimal quantity, setting $MU=0$ is of course easier than listing 200 discrete values and searching for the maximum.