Q:

Can you apply Combat Expertise/Deadly Defense after a trip attempt?

I have a trip-build swordsage with Improved Trip and a spiked chain. Is this legit:
Trip attempt at full attack modifier.
Trip succeeds.
Free melee attack on prone target.
Take -2 off attack to activate Deadly Defense.  
Is that correct, or does the -2 attack apply before the trip attempt?

A:

No
Combat Expertise reads

When you use the attack action or the full attack action in melee, you can take a penalty of as much as -5 on your attack roll and add the same number (+5 or less) as a dodge bonus to your Armor Class. This number may not exceed your base attack bonus. The changes to attack rolls and Armor Class last until your next action. 

You can only activate combat expertise as part of those two specific actions (either taken on your turn or taken as as the resolution of a readied action). You cannot activate it as part of an attack of opportunity or a free melee attack granted by another feat.

