Is comparative advantage only beneficial with convex utility functions? I've been playing around with the numbers associated with the traditional comparative advantage problem provided by Ricardo.
(https://en.wikipedia.org/wiki/Comparative_advantage)

I looked at comparative advantage in my Econ 101 class, but I was surprised to find when reviewing it that it seems like comparative advantage is itself not enough to ensure trade. (I had thought this was sufficient to ensure trade for all optimizing agents.)

Am I correct in believing you'd need the utility function for at least one of the countries in the standard comparative advantage example to be convex, with a diminishing marginal rate of substitution (e.g., a Cobb-Douglass function of the form $U(x,y) = (x)^{0.5} (y)^{0.5}$)? Or am I missing something? It seems to me that without diminishing marginal rate of substitution (which isn't a huge assumption, of course), there's no benefit to trade.
What traditionally matters is a quasiconcave utility function (that is, the individual/country at least weakly prefers mixing such that all better sets are convex). I assume that's what you're referring to when you describe the Cobb-Douglass example.

Though I believe your comment about the functional form of utility is overall correct. If, for example, the utility function were
$$
u(x_{1},x_{2})=\max\{x_{1},x_{2}\}
$$
both countries would produce whatever they were more productive in, and neither country would be incentivized to trade.

(But again, I think the key is quasiconcavity of the utility functions, not convexity.)