Assume I have a longsword and an empty off hand, the Improved Trip feat, and a BAB of 6.
Can I attack on 6 with my longsword, attempt to trip on 1 with my hand, and if I succeed, follow up with my longsword?
You have to make a trip attempt unarmed, or with a trip weapon, but the follow up attack from Improved Trip states
If you trip an opponent in melee combat, you immediately get a melee attack against that opponent as if you hadn’t used your attack for the trip attempt.
Ultimately, it's up to your DM, since it's a bit unclear, but the language seems to imply it must be from the same attack that triggered the feat. However, it could be interpreted a couple of ways, where attack is general or referring to the specific attack that triggered the feat.