The Energy Department is providing $4 million in funding to develop new technologies to locate and extract valuable rare earth elements from fluids produced by geothermal and other deep earth drilling.