In lang=en terms the difference between optimize and affect
is that
optimize is to become optimal while
affect is to make a show of; to put on a pretence of; to feign; to assume to make a false display of.
As verbs the difference between optimize and affect
is that
optimize is (originally|intransitive) to act optimistically or as an optimist while
affect is to influence or alter or
affect can be (obsolete|transitive) to aim for, to try to obtain.
As a noun affect is
(obsolete) one's mood or inclination; mental state.