On the characterization of the Friedrichs extension of ordinary or elliptic differential operators with a strongly singular potential