Mathematical optimization
Many problems are much harder, though, and solving them analytically is not feasible: in these cases, numerical methods are often used.  This often is a result of when the decisions that need to be made involve whole numbers.  A baker can usually make half of a recipe, but consider a rancher trying to determine how many cattle and sheep to graze.  Limitations may include amount of land available or money to purchase the animals. The optimization function is to maximize profit. If they could purchase a fraction of a cow or sheep, then the problem is pretty easy to solve.  However, since one can only buy whole sheep or cows, the problem becomes very difficult to solve perfectly, so the best one can do is sometimes to get a "best guess" using numerical methods with the help of a computer.