Sketching f given f'