1) The cost of something = something's cost.
for example: the total cost of attending the seminar=
The seminar's total attendance cost Here "of" shows what the cost "belongs to".
2) The total cost to attend the seminar
to is used as a function word there:
—used as a function word to indicate purpose, intention, tendency, result, or end
came to our aid
drink to his health
to as function word to indicate purpose etc.
3) The total cost for attending the seminar.
Essentially, 2) and 3) mean the same thing in this particular case though technically one can differentiate them with regard to meaning. The difference is explained below.
\ fər, (ˈ)fȯr , Southern also (ˈ)fär\
Definition of for (Entry 1 of 5)
1a —used as a function word to indicate purpose
a grant for studying medicine
for as function word to indicate purpose
Please note that in terms of usage: for is followed by the ing form of the verb and to is followed by the infinitive. This is a general rule.
for and to can be used to mean different things as in the example in the sample sentence. Below is an example where they differ in meaning.
Difference between function words "to" and "for" preceding a verb.
- The cost for cleaning the office [where cleaning is an activity]
- The cost to clean the office [where clean merely defines the purpose]
Now, one can also apply this to the example:
- The total cost for attending the seminar [the activity of attending] VERSUS
- The total cost to attend the seminar [the purpose of the cost]
Please note: in the examples given, the prepositions are not related to the verb calling for them. Sometimes verbs do "take" this or that prepositions for a particular meaning and may even be a phrasal verb. But often also different prepositions are used for different grammatical purposes.