One proposed solution to the latter problem is to substitute oil-based fuels by biofuels, although this is not as straightforward as is often presented. In addition to the simple fact that growing fuel-crops must inevitably compete for limited arable land on which to grow food-crops, there are vital differences in the properties of biofuels, e.g. biodiesel and bioethanol, from conventional hydrocarbon fuels such as petrol and diesel, which will necessitate the adaptation of engine-designs to use them, for example in regard to viscosity at low temperatures, e.g. in planes flying in the frigidity of the troposphere. Raw ethanol needs to be burned in a specially adapted engine to recover more of its energy in terms of tank to wheels miles, otherwise it could deliver only about 70% of the "kick" of petrol, pound for pound.
In order to obviate the competition between fuel and food crops, it has been proposed to grow algae to make biodiesel from. Some strains of algae can produce 50% of their weight of oil, which is transesterified into biodiesel in the same way that plant oils are. Compared to e.g. rapeseed which might yield a tonne of biodiesel per hectare, or 8 tonnes from palm-oil, perhaps 40─90 tonnes per hectare is thought possible from algae , grown in ponds of equivalent area. Since the ponds can in principle be placed anywhere, there is no need to use arable land for them. Some algae grow well on salt-water too which avoids diverting increasingly precious freshwater from normal uses, as is the case for growing crops which require enormous quantities of freshwater.
The algae route sounds almost too good to be true. Having set-up these ponds, albeit on a large scale, i.e. they would need an area of 10,000 km2 (at 40 t/ha) to produce 40 million tonnes of diesel, which is enough to match the UK's transportation demand for fuel if all vehicles were run on diesel-engines [the latter are more efficient in terms of tank to wheels miles by about 40% than petrol-fuelled spark-ignition engines], one could ideally have them to absorb CO2 from smokestacks (thus simultaneously solving another little problem) by photosynthesis, driven only by the flux of natural sunlight. The premise is basically true; however, for algae to grow, vital nutrients are also required, as a simple elemental analysis of dried algae will confirm. Phosphorus, though present in under 1% of that total mass, is one such vital ingredient, without which algal growth is negligible. I have used two different methods of calculation to estimate how much phosphate would be needed to grow enough algae, first to fuel the UK and then to fuel the world:
(1) I have taken as illustrative the analysis of dried Chlorella , which contains 895 mg of elemental phosphorus per 100 g of algae.
UK Case: To make 40 million tonnes of diesel would require 80 million tonnes of algae (assuming that 50% of it is oil and this can be converted 100% to diesel).
The amount of "phosphate" in the algae is 0.895 x (95/31) = 2.74 %. (The Formula Weight, FW of PO43- is 95, while that of P is 31).
Hence that much algae would contain: 80 million x 0.0274 = 2.19 million tonnes of phosphate. Taking the chemical composition of the rock as fluorapatite, Ca5(PO4)3F, FW 504, we can conclude that this amount of "phosphate" is contained in 3.87 million tonnes of rock phosphate. In fact, rock phosphate is a more impure material than this, and the mineral usually used for fertilizer production is reckoned to contain 29─34% P2O5. From the ratio of FW for PO43-/0.5 P205 (95/71), we may deduce that there are (71/95) x 2.19 million = 1.64 million tonnes of P2O5 contained in the above amount of “phosphate”. Taking the range average of 31.5% for the mineral P concentration, reckoned as P2O5, this would accord with 5.20 million tonnes of actual “rock phosphate”, a conversion factor of 1.34.
World Case: The world gets through 30 billion barrels of oil a year, of which 70% is used for transportation (assumed). Since 1 tonne of oil is contained in 7.3 barrels, this equals 30 x 109/7.3 = 4.1 x 109 tonnes and 70% of that = 2.88 x 109 tonnes of oil for transportation.
So this would need twice that mass of algae = 5.76 x 109 tonnes of it, containing:
5.76 x 109 x 0.0274 = 158 million tonnes of phosphate. As before, taking the chemical composition of the material as fluorapatite, Ca5(PO4)3F, FW 504, this amount of "phosphate" is contained in 279 million tonnes. Applying the factor of 1.34 as arrived at above, to account for the typical degree of impurity in the mineral, this accords with 374 million tonnes of actual mined rock phosphate.
(2) To provide an independent estimate of these figures, I note that growth of this algae is efficient in a medium containing a concentration of 0.03─0.06% phosphorus; since I am not trying to be alarmist, I shall use the lower part of the range, i.e 0.03% P. "Ponds" for growing algae vary in depth from 0.3─1.5 m, but I shall assume a depth of 0.3 m.
UK Case: assuming (vide supra) that producing 40 million tonnes of oil (assumed equal to the final amount of diesel, to simplify the illustration) would need a pond/tank area of 10,000 km2. 10,000 km2 = 1,000,000 ha and at a depth of 0.3 m, this amounts to a volume of: 1,000,000 x (1 x 104 m2/ha) x 0.3 m = 3 x 109 m3.
A concentration of 0.03 % P = 0.092% phosphate, and so each m3 (1 m3 weighs 1 tonne) of volume contains 0.092/100 = 9.2 x 10-4 tonnes (920 grams) of phosphate. Therefore, we need:
3 x 109 x 9.2 x 10-4 = 2.76 million tonnes of phosphate, which is in reasonable accord with the amount of phosphate taken-up by the algae (2.19 million tonnes), as deduced above. This corresponds to 4.87 million tonnes of Ca5(PO4)3F, or by applying the 1.34 “impurity factor” to 6.53 million tonnes of rock phosphate.
World Case: The whole world needs 2.88 x 109 tonnes of oil, which would occupy an area of 2.88 x 109/40 t/ha = 7.20 x 107 ha of land to produce it.
7.2 x 107 ha x (104 m2/ha) = 7.2 x 1011 m2 and at a pond depth of 0.3 m they would occupy a volume = 2.16 x 1011 m3. Assuming a density of 1 tonne = 1 m3, and a concentration of PO43- = 0.092%, we need:
2.16 x 1011 x 0.092/100 = 1.99 x 108 tonnes of phosphate, i.e. 199 million tonnes. This corresponds to 352 million tonnes of Ca5(PO4)3F, or 472 million tonnes of rock phosphate.
This is also in reasonable accord with the figure deduced from the mass of algae accepting that not all of the P would be withdrawn from solution during the algal growth.
Now, world rock phosphate production amounts to around 140 million tonnes (noting that we need 472 million tonnes to grow all the algae), and food production is already being thought compromised by rock phosphate resource depletion. The US produces less than 40 million tonnes of rock phosphate annually, but would require enough to produce around 25% of the world's total algal diesel, in accord with its current "share" of world petroleum-based fuel, or 118 million tonnes of rock phosphate. Hence, for the U.S., security of fuel supply could not be met by algae-to-diesel production using even all its indigenous rock phosphate output, and significant imports would still be needed. This is in addition to the amount of the mineral necessary to maintain agriculture.
The world total of rock phosphate has been reckoned at 8,000 million tonnes (Mt) and that in the U.S. at 2,850 Mt, using a Hubbert Linearization analysis . The total world reserve, as expressed in terms of P2O5 content, is estimated to be in the range 3,600─8,000 Mt . However, as is true of all resources, what matters is the rate at which it can be produced, and that once the peak is reached, what remains will be inexorably harder (of diminishing EROEI) to recover. The peak in world oil production will impact on the peak in phosphorus production, since rock phosphate, and all other mineral substances, is mined and recovered using machinery powered by liquid fuels that are refined from crude oil.
I remain optimistic over algal diesel, but clearly if it is to be implemented on a serious scale its phosphorus has to come from elsewhere than mineral rock phosphate. There are regions of the sea that are relatively high in phosphates and could in principle be concentrated to the desired amount to grow algae, especially as salinity is not necessarily a problem. Recycling phosphorus from manure and other kinds of plant and animal waste appears to be the only means to maintain agriculture at its present level beyond the peak for rock phosphate, and certainly if additionally, algae are to be produced in earnest. In principle too, the phosphorus content of the algal-waste left after the oil-extraction process could be recycled into growing the next batch of algae. These are all likely to be energy-intensive processes, however, requiring "fuel" of some kind, in their own right. A recent study  concluded that growing algae could become cost-effective if it is combined with environmental clean-up strategies, namely sewage wastewater treatment and reducing CO2 emissions from smokestacks of fossil-fuelled power stations or cement factories. This combination appears very attractive, since the impacts of releasing nitrogen and phosphorus into the environment and also those of greenhouse gases might be mitigated, while conserving precious N/P nutrient and simultaneously producing a material that can replace crude oil as a fuel feedstock.
It is salutary that there remains a competition between growing crops (algae) for fuel and those for food, even if not directly in terms of land, for the fertilizers that both depend upon. This illustrates for me the complex and interconnected nature of, indeed Nature, and that like any stressed chain, will ultimately converge its forces onto the weakest link in the "it takes energy to extract energy" sequence. It seems quite clear that with food production already stressed, the production of (algal) biofuels will never be accomplished on a scale anywhere close to matching current world petroleum fuel use ( > 20 billion barrels/annum). Thus, the days of a society based around personalized transport powered by liquid hydrocarbon fuels are numbered. We must reconsider too our methods of farming, to reduce inputs of fertilisers, pesticides and fuel. Freshwater supplies are also at issue, in the complex transition to a more localised age that uses its resources much more efficiently.
There is a Hubbert-type analysis of human population growth which indicates that rather than rising to the putative "9 billion by 2050" scenario, it will instead peak around the year 2025 at 7.3 billion, and then fall . It is probably significant too that that population growth curve fits very closely both with that for world phosphate production and another for world oil production . It seems to me highly indicative that it is the decline in resources that will underpin our demise in numbers as is true of any species: from a colony of human beings growing on the Earth, to a colony of bacteria growing on agar nutrient in a Petri-dish.
 “Making Fuel From Algae: Identifying fact Amid Fiction,” BY C.J.Rhodes, in Algal Fuels: Phycology, Geology, Biophotonics, Genomics and Nanotechnology, J.Seckbach (ed.), Springer, Dordrecht, in press.
 "Chlorella" - Wikipedia.
 “Environmental Life Cycle Comparison of Algae to Other Bioenergy Feedstocks,” By Andres F. Clarens, Eleazer P. Ressurreccion, Mark A. White and Lisa M. Colosi, Environ. Sci. Technol., 2010, 44, 1813.
 "Algae to Biofuel Conversion; Survival in the Oil Dearth Era," By C.J.Rhodes, Science Progress, 2009, Vol. 92, 39.