A student once asked Rabbi Yosef Dov Soloveitchik whether it is permitted to cook milk and meat together (without eating it) for the sake of medical experiment and advance. The Torah states clearly that not only may one not eat or enjoy this mixture but one is not even allowed to cook milk and meat together. One would presume therefore that even cooking for scientific reasons would be prohibited.
However, Rav Soloveichik magnificently deduces from the Rambam a slightly different attitude: The Rambam claims (Laws of prohibited substances, chapter 9) that the Torah prohibits the eating of milk and meat mixtures cooked together a fortiori (kal va chomer) from their cooking. That is, if their cooking is prohibited then how much more so must their eating be prohibited.
Rav Soloveitchik asks how can we make sense of this logic – what connection is there between the cooking of milk and meat and the eating of this mixture? He concludes that cooking milk and meat is only prohibited, according to the Rambam, if it is done with the anticipation of eating the mixture. Hence, the Rambam was able to suggest that if their cooking is prohibited (if done with the intention of eating), then the actual eating must all the more so be prohibited.
Based on this discussion the Rav felt there would not be a problem with the cooking of milk and meat if it is done in the name of science where there is no intention to eat the mixture at the time of cooking.
It should be noted, however, that most of contemporary halachic decisors do not agree with Rav Soloveitchik’s lenient approach. A scientist who experiences the necessity to cook milk and meat for the sake of his research should first consult carefully with a halachic mentor, because the experiment may have to be significantly modified for the sake of complying with the commandment of “lo tivasheil gdi bachaleiv imo”.[For further halachic material see Badey HaShulchan beginning of chapter 77.]