Use of the gerund and infinitive in English I'm doing a language exchange with a Spanish lady, and she encountered an issue in english grammar that I had never seen before. 

The following sentences are both acceptable;

* 'I like to do it'     _(infinitive)_
* 'I like doing it' _(gerund)_

However only the gerund form of enjoy is acceptable, i.e.,

'I enjoy doing it'

And only the infinitive form of agree is acceptable;

'I agree to do it'

I stared at her list of verbs for a long while and could not find any significant pattern in the three sets of verbs (i.e. followed by gerund, infinitive or both). Google wasn't much help apart from giving me the same lists that she was puzzling over. Is there a pattern or reason for this part of our grammar?