He invented the seismometer in 1842.
Forbes was born at 86 George Street in Edinburgh, the fourth son of Sir William Forbes, 7th Baronet, of Monymusk and Pitsligo (1773–1828) and Williamina Belches of Invermay. His brothers were the advocate and agriculturalist Sir John Stuart Hepburn Forbes of Fettercairn and Pitsligo and the banker Charles Forbes.
He entered the University of Edinburgh in 1825, and soon afterwards began to contribute papers to the Edinburgh Philosophical Journal anonymously under the signature "Δ". At the age of nineteen he became a fellow of the Royal Society of Edinburgh, and in 1832 he was elected to the Royal Society of London. At this time he maintained correspondence with Sir David Brewster, who encouraged him to pursue an original research in science. A year later he was appointed professor of natural philosophy in Edinburgh University, in succession to Sir John Leslie, and during his tenure of that office, which he did not give up till 1860, he not only proved himself an active and efficient teacher, but also did much to improve the internal conditions of the university. In 1859 he was appointed successor to Brewster in the principalship of the United College of St Andrews, a position which he held until his death at Clifton in 1868.
As a scientific investigator he is best known for his researches on heat and on glaciers. Between 1836 and 1844 he published in the Trans. Roy. Soc. Ed. four series of "Researches on Heat," in the course of which he demonstrated that tourmaline would polarise infrared thermal radiation, by transmission through a bundle of thin mica plates inclined to the transmitted ray, and by reflection from the multiplied surfaces of a pile of mica plates placed at the polarising angle, and also its circular polarisation by two internal reflections in rhombs of rock salt. His work won him the Rumford Medal of the Royal Society in 1838, and in 1843 he received its Royal Medal for a paper on the "Transparency of the Atmosphere and the Laws of Extinction of the Sun's Rays passing through it."
In 1846 he began experiments on the temperature of the earth at different depths and in different soils near Edinburgh, which yielded determinations of the thermal conductivity of trap-tufa, sandstone and pure loose sand. Towards the end of his life he was occupied with experimental inquiries into the laws of the conduction of heat in iron bars, and his last piece of work was to show that the thermal conductivity of iron diminishes with increase of temperature.
His attention was directed to the question of the flow of glaciers in 1840 when he met Louis Agassiz at the Glasgow meeting of the British Association, and in subsequent years he made several visits to Switzerland, where he was particularly impressed by Bernhard Studer's theories, and also to Norway for the purpose of obtaining accurate data. His observations led him to the view that a glacier is an imperfect fluid or a viscous body which is urged down slopes of a certain inclination by the mutual pressure of its parts, and involved him in some controversy with Tyndall and others both as to priority and to scientific principle. A notable defender of Forbes in this controversy was John Ruskin, the two having first met by coincidence in 1844 during a study tour of the Alps.
During these expeditions, he made many measurements of the boiling point of water at various altitudes. This data set, published in 1857, is often known in statistics as Forbes' data, its utility being that:It illustrates how a curvilinear relationship between a dependent and independent variable can be transformed into a linear model by knowledge of the physical phenomenon observed.
It emphasises the importance of residuals analysis in linear regression as the residuals manifest an outlier that is not apparent in a visual inspection of the raw data.
Forbes was also interested in geology, and published memoirs on the thermal springs of the Pyrenees, on the extinct volcanoes of the Vivarais (Ardêche), on the geology of the Cuchullin and Eildon hills, etc. In addition to about 150 scientific papers, he wrote Travels through the Alps of Savoy and Other Parts of the Pennine Chain, with Observations on the Phenomena of Glaciers (1843); Norway and its Glaciers (1853); Occasional Papers on the Theory of Glaciers (1859); A Tour of Mont Blanc and Monte Rosa (1855). He was also the author (1852) of the "Dissertation on the Progress of Mathematical and Physical Science," published in the 8th edition of the Encyclopædia Britannica.
The Forbes River and Forbes Glaciers in New Zealand are named after him as is Aiguille Forbes between the Glacier de Saleina and the Glacier du Tour in the Mont Blanc massif.
James David Forbes was a devout Christian, as can be seen in the work "Life and Letters of James David Forbes" (1873), a compilation of personal letters written by Forbes, co-authored by John Campbell Shairp and Forbes' student Peter Guthrie Tait.
He is buried in Dean Cemetery in Edinburgh. The grave is marked by a simple but large grey granite Celtic cross and lies on the south side of the main path just west of the roundel. His wife, Alicia Wauchope (1824-1885), is buried with him. His cousins were Scottish Episcopal Church leaders Alexander Penrose Forbes and George Hay Forbes. His son was the scientist Prof George Forbes.Travels through the Alps of Savoy and Other Parts of the Pennine Chain, with Observations on the Phenomena of Glaciers. 1843.
Norway and its Glaciers. 1853.
A Tour of Mont Blanc and Monte Rosa. 1855.
Occasional Papers on the Theory of Glaciers. 1859.