Pimentel and Patzek have two tables for soy-biodiesel in their paper. I have adjusted the numbers in the first table, which were listed in 1000 kcal/hectare, to match those in the second table, which were listed as 1000 kcal/1000 kg of biodiesel produced. This makes the energy inputs comparable:

Input Thousand kcal  
Soybean Production  
Labor 591  
Machinery 750  
Diesel 920  
Gasoline 562  
LPgas 52  
Nitrogen 123  
Phosphorus 325  
Potassium 100  
Lime 2809  
Seeds 1154  
Herbicides 271  
Electricity 60  
Transport 83  
Total Soybean Production 7801
Making Biodiesel from Soybeans
Electricity 697  
Steam 1350  
Cleanup Water 160  
Space Heat 152  
Direct Heat 440  
Losses 300  
Stainless Steel 158  
Steel 246  
Cement 106  
Total Biodiesel Production 3609
Total Energy   11410

They write in the article that the biodiesel has an energy value of 9 million kcal, and the soymeal adds 2.2 million kcal, for a total of 11.2 million kcal. (In their second table, they actually totalled the numbers incorrectly, coming up with 11,878 instead of 11410!) So, by their own numbers, they are showing 11.2 million kcal of output from 11.41 million kcal of input, or a net energy loss of only 1.8%.

If the 11.41 million kcal could not possibly be reduced in any way, and if it all came from high-value liquid fuels like gasoline and petrodiesel, P&P would have a point--biodiesel doesn't pay. But when you've made a bunch of assumptions biased against biodiesel, and you still end up less than 2% shy of an energy gain, it is time to look for the inefficiencies and reduce them. 2809 thousand kilocalories of lime required to grow 5556 kg of soybeans? Find a way to grow soybeans using less lime, or a more efficient way to produce lime. Their "transport" category assumes that machinery, fuel and seeds were shipped 1000 km. And much of the energy required to process biodiesel--electricity, steam, heat--can easily be produced sustainably from solar.

[Update] Here's an interesting development! I found an online version of Pimentel's 1996 book Food, Energy and Society, which is listed in a footnote as a source for several of the numbers in the tables above. On page 125, the book says:

In the United States, soybean yields an average in food energy amounting to 7.6 million kcal/ha (Table 10.17). Production inputs total 1.8 million kcal/ha, so the output/input ratio is 4:1. The 2 largest inputs are for herbicides and seeds, the third largest for manufacturing the machinery. Note that the yield of protein is higher for soy beans than for any other legume tabulated.

But in the most recent article, the one claiming that biodiesel is a loser, Pimentel and Patzek list soybean energy yield as 9.6 million kcal/ha, more than the book numbers, but they also list the input energy as 3.746 million kcal/ha, over TWICE the energy the 1996 book claims. While the net gain in energy per hectare remains about the same (5.8 kcal), the ratio decreases substantially--from over 4:1 down to 2.56:1.

From looking into a few of the other footnotes, it would appear that the main reason for the doubling of the input energy required to grow soybeans comes from the lime input. Apparently lime is used in places with low soil pH to bring pH up over 6.0, better suited for soybeans. This seems to be the case in areas of Iowa and Minnesota, although I haven't found a source indicating the general distribution of soil pH's or where lime is being used and where it isn't. It would appear that lime use is a recent development that has substantially increased yields in certain places, but at a high energy cost. Unfortunately, P&P don't explain this--they just list that 4800 kg of lime is required per hectare of soybeans, at a cost of 1.349 million kcal, even though it would seem that ten years ago lime wasn't even used in American soybean production.

[Update, July 21]

The National Biodiesel Board has issued a response to the recent Pimentel/Patzek study which claims that biodiesel is a net energy loser. The NBB cites a 1998 study sponsored by the Departments of Agriculture and Energy which shows a soil-to-wheel positive energy balance (3.2:1) for soy biodiesel when used in an urban bus. The Secretaries of the Departments of Agriculture and Energy are always people appointed by presidents whose first step towards nomination was the Iowa caucuses and who were elected by the electoral college (which gives inordinate weight to lightly-populated farm states), and whose nominations were confirmed by the U.S. Senate in which some fairly unimpressive farm-staters like Bob Dole and Tom Daschle have wielded large power. So it can be fairly assumed that the USDA and the DOE are going to undertake a study on biodiesel with a bit of a bias towards finding a favorable conclusion. Still, the 314-page USDA/DOE report is far more thorough than the 12-page P&P study (of which only two pages deal with biodiesel). USDA/DOE also explain their terms in much greater detail, making the crucial distinctions which need to be made to determine whether making biodiesel from soybeans is "renewable" or even worthwhile at all. For example:
The fossil energy ratio tells us something about the degree to which a given fuel is or is not renewable. It is defined simply as the ratio of the final fuel product energy to the amount of fossil energy required to make the fuel:

Fossil Energy Ratio = Fuel Energy/Fossil Energy Inputs

If the fossil energy ratio has a value of zero, then a fuel is not only completely nonrenewable, but it provides no useable fuel product energy as a result of the fossil energy consumed to make the fuel. If the fossil energy ratio is equal to 1, then this fuel is still nonrenewable. A fossil energy ratio of one indicates that no loss of energy occurs in the process of converting the fossil energy to a useable fuel. For fossil energy ratios greater than 1, the fuel actually begins to provide a leveraging of the fossil energy required to make the fuel available for transportation. As a fuel approaches being "completely" renewable, its fossil energy ratio approaches "infinity." In other words, a completely renewable fuel has no requirements for fossil energy.

(USDA/DOE report, p. 207) In contrast, Pimentel and Patzek don't define their terms well, and pick and choose whatever they can find to make biodiesel look bad. For example, on page 72 of their report (it's in a journal, so page 72 is actually page 8) they say:
Sheehan and others of the Department of Energy also report a negative energy return in the conversion of soybeans into biodiesel. They report "1 MJ of biodiesel requires an input of 1.24 MJ of primary energy."
This is deception at its worst. First off, Sheehan is one of the authors of the USDA/DOE report which supports biodiesel production. More importantly, unlike P&P, the USDA/DOE report defines what is meant by "primary energy:"
Total Primary Energy. All raw materials extracted from the environment can contain energy. In estimating the total primary energy inputs to each fuel’s life cycle, we consider the cumulative energy content of all resources extracted from the environment.
(page 206) So "primary energy" includes not only the diesel fuel to run the trucks and tractors used to grow and process the soybeans--it includes the solar energy captured by the soybean plants, and every other form of energy used in the process. P&P cite the 1.24 ratio of primary energy in to energy out as a bad thing, when in fact all it demonstrates is that biodiesel production is not a perpetual motion machine. As the USDA/DOE study points out, the real key, given our current circumstances, is the fossil energy ratio. Actually, I would expand that to be a non-renewable energy ratio, since I'm afraid that one of the main responses to both peak oil and global warming is going to be calls for using more nuclear energy. Nevertheless, the USDA/DOE study is much more careful about defining their terms and pointing out what the real issues are than are P&P. As I see it, biodiesel wins the argument. If we hope to still have some mechanized ground and air transportation available to us in the future, we'll need energy-dense liquid fuels. We can either grow a bunch of plants and animals, let them die, and wait 50 million years or so for the earth to turn them into oil and coal, or we can grow oil-yielding plants and process them into liquid fuels today in the most efficient way possible. The USDA/DOE report makes a good case that the process can actually be quite efficient in the most important ways, while the P&P study completely fails to disprove that. Full disclosure: My investment in biodiesel consists of a 2001 Volkswagen Golf TDI, a few stickers, and half a tank of B99 biodiesel. If I could be convinced that biodiesel was actually making things worse, I could switch to running on petrodiesel--it would be easier (more stations) and currently cheaper. But I'll say that a couple of die-hard anti-biodiesel professors have taken their best shot at biodiesel and missed completely, and I'll keep running on biodiesel unless somebody makes a much better case.

[Update 2, July 21]

Mike Briggs at the BioDieselNow forums posted the following response:

Based on quick analyses a few friends (scientists in various fields) have done of Pimentel's biodiesel (and ethanol) energy balance assessments, and comparing to previous assessments (such as the 1998 assessment done by the DOE/NREL which they found a positive energy balance of 3.2):

1. Pimentel used highly inflated numbers for energy inputs practically everywhere. A few examples:

2. The electricity used by the soy oil processing plant he claimed was ten times as much as the DOE used in their analysis - even though the DOE's electricity figures were already inflated to twice as much as what plants coming online at the time were using. So, Pimentel's electricity usage in processing is at least 20 times what's realistic for processing plants.

3. Pimentel included the energy to build the farm machinery as an energy requirement - but didn't properly account for the fact that the machinery lasts decades (he basically treated it almost as if you have to buy new tractors, combines, and everything else every year or two).

4. Pimentel included the food eaten by workers (on the farm and everywhere) as a fossil energy input - as if one unit of energy in the form of any food requires one unit of energy in the form of fossil fuels to produce. Not at all realistic.

5. He included way, way, way too much lime as being needed for treating soils, and with a very high energy input for producing the lime. For example (these numbers come from Mark Ambrose of the NCSU FOrestry Dept.), in North Carolina, where the soil is highly acidic (so you need more lime than normal), farmers growing soy typically put 2500 kg of lime on per hectare every 3-4 years (so 625-833 kg/hectare). In the mid-western US, where soils are less acidic, considerably less is used. Yet, Pimentel claimed that 4800 kg is needed PER YEAR - roughly an order of magnitude too much for most soy farmland in the US).

6. He used fertilizer application rates too high by 20-50%, and overstated the fossil energy input for fertilizer production by at least a factor of 2.

7. Used plant processing efficiencies from the mid-80s (for the ethanol analysis) - modern efficiencies are far, far greater.

And so on. Basically at every step of the process, he greatly overstates energy inputs (ranging from 10% to hundreds of percentage points), and then also claims substantially lower yields (basically using the lowest yields he could find, even though it meant going back decades).

That's why Pimentel has no credibility in the scientific community. Unfortunately, the media doesn't care about that. Talk of his analysis has been going on all over the place - it seems that this is the start of a campaign against biofuels.