for

1

He wanted a pen for to write a letter to his lover.
He wanted a pen for write a letter to his lover.
He wanted a pen to write a letter to his lover.

Use to + infinitive to express purpose. It explains why someone does something or wants something: ‘We went to the bar to have a beer.’

Use for + noun: ‘We went to the bar for a beer.’

Do not use for to + infinitive or for + base form.

We can use for + -ing to explain what something is used for: ‘This knife is for cutting bread.’

2

Don Quixote was written for Cervantes.
Don Quixote was written by Cervantes.

Many accidents are caused for alcohol.
Many accidents are caused by alcohol.

In a passive sentence, use by to say who or what does or causes the action: ‘The window was broken by one of the children.’

Use for to say who something is intended for: ‘This book was written for children.’