Tonicization - Borrowing one or two chords from a closely related key to heighten the harmonic intensity and color.
Leading tone relationship - When an accidental resolves upward by a half step.
If you have an accidental that resolves upward by a half step, then you have a leading cone relationship in a new key.
If the altered note is the third of the borrowed chord and analyze as a major triad or major-minor seventh chord, then you have a chord functioning as a dominant (V or V7) in another key.
If the altered note is the root of a diminished triad or seventh chord, then you have a secondary chord functioning as a leading tone vii° or vii°7 in another key.
A secondary chord symbol has two parts:
Look at the chord symbol below the slash; that is your new tonic.
Spell the chord as requested above the slash including correct inversion in the key of the new tonic.
Resolve the secondary chord to the new tonic following the rules of resolution for that key (Ti goes to Do and Fa goes to Mi).
Recognize the leading-tone relationship that occurs between the altered note Ti and the note it leads to Do in the new key.
If the chromatic note is an essential member of the chord that leads to a non-tonic chord and if it has dominant function, then there’s a secondary relationship resolving to a temporary tonic.
Most common way to notate what you hear:
An accidental resolving upward by a half step usually signals a leading-tone relationship and a temporary shift to a new tonic.
If you have a Fi-So in your melody, then you may harmonize with either a secondary dominant or a secondary leading tone.
If your melody gives you So-Fi-So or Mi-Fi-So, then harmonize the first chord with I 6/4.
Most common melodic patterns containing an accidental
If the Fi occurs in the melody, then most likely your chord is in the root position.
If the So-Fi-So pattern is in the bass line and the chord quality is major, then you have a secondary dominant in first inversion because the third of the chord will be Fi and that note is in the bass.
\