In my finance classes, I always learned that the a firm earning an "economic profit" is one for which its return on invested capital (ROIC) is greater than it's opportunity cost of capital (usually calculated using the Weighted Average Cost of Capital). But, in my economics classes, I learned that economic profit accrues to a firm that has the ability to price above marginal cost (the demand curve for its product is not infinitely elastic).
Are these two definitions compatible? Is there a way to connect the two? The reason for my question is that I have noticed situations in which the two don't concur. For example, oil companies have negligible market share (when considered globally; e.g. Exxon, the largest U.S. oil major, has about 3% market share - will try to find the reference for this, can't currently remember) and sell a commodity product, and so that's pretty close to the "competitive ideal" as depicted in any Intermediate Micro class. However, if you look at Exxon's ROIC, it has at times been in the 30% range, much higher than any reasonable estimate of WACC (usually around 7-12%). So there appears to be a discrepancy between two different measures of "economic profit".