Joseph J. Fahey, 78, a retired research scientist with the U.S. Geological Survey, died of cancer Sunday at the Fairland Nursing Home in Silver Spring where he had lived for a little over a year.

He was a former resident of University Park.

He had retired from the survey in 1971 after almost 45 years of service in the geologic division. He had been a project leader of the rock and mineral analysis laboratories in the branch of analytical laboratories at survey headquarters in Washington.

Mr. Fahey was a pioneer in developing methods for detecting trace amounts of mercury in the environment, and devised a method for determining fluorine in rocks and waters. During World War II, he improved methods for extinguishing incendiary magnesium bombs.

Mr. Fahey was credited with triggering a multimillion-dollar trona industry in Wyoming when he discovered deposits of this valuable mineral, an impure type of hydrous sodium carbonate.

He was awarded the Interior Department's Distinguished Service Award in 1970.

Mr. Fahey was born in Massena, N.Y. He attended Catholic University from 1919 to 1921 and then studied at George Washington University at night while working for the bureau of public roads in the Agriculture Department. He joined the geological survey in 1927.

He was a former president and member of the board of managers of the Washington section of the American Chemical Society and a former officer of the Geological Society of Washington, the Washington Academy of Science and the Washington professional chapter of Alpha Chi Sigma, an honorary chemical organization.

He was a fellow of the Mineralogical Society of America and belonged to mineralogical societies in Great Britain and Ireland, France, Italy and Canada.

His wife, Gertrude died in 1978.

He is survived by four children, Patricia Lutian of Stratford, Conn., James D. of Rockville, Ellen Kubisiak of Adelphi, and T. Michael of Laurel, 22 grandchildren and four great-grandchildren.