Holmes and Watson must solve the case of a murdered mathematician on Elementary. "Solve for X" is the second episode of the show's second season.
Added:

Elementary Season 2 Episode 2 Quotes

[To Joan] I want to make sure Joey isn't taking advantage of you.

Sherlock

[To Sherlock] Where's your better half?

Bell