We use modeling to determine the optimal relative plant carbon allocations between foliage, fine roots, anti-herbivore defense, and reproduction to maximize reproductive output. The model treats these plant components and the herbivore compartment as variables. Herbivory is assumed to be purely folivory. Key external factors include nutrient availability, degree of shading, and intensity of herbivory. Three alternative functional responses are used for herbivory, two of which are variations on donor-dependent herbivore (models 1a and 1b) and one of which is a Lotka–Volterra type of interaction (model 2). All three were modified to include the negative effect of chemical defenses on the herbivore. Analysis showed that, for all three models, two stable equilibria could occur, which differs from most common functional responses when no plant defense component is included. Optimal strategies of carbon allocation were defined as the maximum biomass of reproductive propagules produced per unit time, and found to vary with changes in external factors. Increased intensity of herbivory always led to an increase in the fractional allocation of carbon to defense. Decreases in available limiting nutrient generally led to increasing importance of defense. Decreases in available light had little effect on defense but led to increased allocation to foliage. Decreases in limiting nutrient and available light led to decreases in allocation to reproduction in models 1a and 1b but not model 2. Increases in allocation to plant defense were usually accompanied by shifts in carbon allocation away from fine roots, possibly because higher plant defense reduced the loss of nutrients to herbivory.