Cochran made 10 of 11 free throws for the Wildcats (5-4, 2-0 Southern Conference).
After losing most of a 21-point lead at the end of the first half, Davidson kept Wofford at arm's length early in the second before pushing it to 47-33 with 11:54 remaining.
Wofford closed to 51-47 on Spencer Collin's dunk with 5:31 to go.
Davidson's Jake Cohen made a layup for a 57-50 advantage with 3:29 left, and the Wildcats held on for the victory.
The Wildcats led 31-10 with 3:36 to go in the first half, but Wagener hit two 3-pointers during a 12-point spurt to pull Wofford to 31-22 at the break.