But the work there was not to his liking, and after a short time he gave it up for an instructorship in natural science at the university of Wooster, Ohio, which in turn he resigned in order to return to Troy as assistant professor of physics.
He at first taught mathematics at Yale; but in 1895 was made assistant professor of political economy, and in 1898 professor.
In 1882 he was called to Harvard where he taught as instructor in philosophy, assistant professor (1885-92), professor of the history of philosophy (1892-1914) and Alford professor of religion, moral philosophy, and civil polity (after 1914).
He was instructor in history at Harvard in 1883-1887, assistant professor in 1887-1897, and became professor in 1897.
From 1870 to 1877 he was assistant professor of history at Harvard and from 1870 to 1876 was editor of the North American Review.
He graduated, at West Point in 1853, served for two years in the artillery, was assistant professor of natural and experimental philosophy at West Point in 1855-1860, and while on leave (1860-1861) was professor of physics at Washington university, St Louis.
He began life as a clerk, but, obtaining an appointment to a cadetship at West Point in 1825, he graduated there in 1829, and acted as assistant professor of mathematics 1829-1832.
He there came under the influence of Victor Cousin, and in 1817 he was appointed assistant professor of philosophy at the normal and Bourbon schools.
After graduating at the United States Military Academy at West Point in 1825, he acted as assistant professor there for some time, and as a lieutenant in the corps of engineers he was engaged for a year or two in the erection of coast fortifications.
After acting for a short time as assistant in Harvard College Observatory, he was appointed assistant professor of mathematics in the U.S. Naval Academy in 1866, and in the following year became director of the Allegheny Observatory at Pittsburg, a position which he held until his selection in 1887 as secretary of the Smithsonian.