A new method improves the extraction and separation of rare earth elements—a group of 17 elements critical for technologies such as smart phones and electric car batteries—from unconventional sources.