This is better handled by the rules for Invisibility, rather than the basic tactical movement rules
An important point to remember: just because a Large creature tactically occupies a 10 ft. square doesn't mean it literally fills up that square (unless it's a Gelatinous Cube or some other exceptional creature...) - just as your average Elf is not 5 ft. wide...
The tactical grid is an abstraction, its underlying assumption is that a 5 ft. square is the area a Medium sized creature needs to effectively swing its weapon, not the minimum area it can stand on.
The combat systems assumes as a default that any non-helpless opponent will actively try to block your passage (not necessarily by physically blocking your way - waving a weapon at you is equally effective...).
This is not necessarily the case for an invisible creature.
If there's a clear tactical advantage for the invisible opponent to allow you to pass it (maybe so you provoke an AoO, or so it may keep its location or presence hidden), it makes sense that the opponent may allow you to pass it - just as a friendly creature would.
The rules for Invisibility state that:
(emphasis mine)
[...] A creature can generally notice the presence of an active invisible creature within 30 feet with a DC 20 Perception check. The observer gains a hunch that “something's there” but can't see it or target it accurately with an attack.
It's practically impossible (+20 DC) to pinpoint an invisible creature's location with a Perception check. Even once a character has pinpointed the square that contains an invisible creature, the creature still benefits from total concealment (50% miss chance).
So, clearly, while you are moving near it, you are allowed a Perception check to try and notice the invisible opponent (with an insane DC 40 + opponent's Stealth check if it is standing still) - but you don't automatically detect it - merely moving past or through its area is not actively searching for the invisible opponent - that's a standard action:
A creature can grope about to find an invisible creature. A character can make a touch attack with his hands or a weapon into two adjacent 5-foot squares using a standard action. If an invisible target is in the designated area, there is a 50% miss chance on the touch attack. If successful, the groping character deals no damage but has successfully pinpointed the invisible creature's current location. [...]
Now, since there's a 50% miss chance even when you are actively searching for the creature - it makes no sense that by simply walking around you can automatically detect it: Allowing that will mean that rather than using a standard action to test 2 squares (forgoing your attacks), you could just use a move-action to test 6 squares (for normal Medium unencumbered speed) avoid the 50% miss chance, and attack the creature in the same round.
So, while the movement rules don't specifically handle this situation, it seems to me that you could handle this in one of two ways:
- The PC simply passes through the occupied area - it may get a "free" Perception check to allow him to notice the opponent (probably rolled secretly by the DM if the player isn't aware of the opponent).
- The PC still has some chance to "bump into" the invisible opponent - I'd still treat this as a Stealth vs. Perception check rather than use the flat 50% miss chance (to reflect the fact the the foe is actively trying to avoid detection, and does its best to stay out of your way), but this is really the DM's call.
Personally, I'd just use option #1.
As a side note: Even with only a 5 ft. reach, You'll still provoke an AoO when you leave the square adjacent to the invisible opponent in order to (unwittingly try to) move into its space. It does not have to allow you to pass just to hit you...