You can't make this comparison based purely on average damage... You have to take the (constantly ingored) fact that archers get to do this damage from a safe distance into account.
No, actually I didn't ignore it. In fact, when the final analysis came down, I included all the extra factors that weigh in. You say that the safe distance is ignored, but neglect to mention the lack of a threatened area. When you do a balance analysis, you have to factor it all in.
Edit: I found it. (Actually Wizardru did)
Note that this is just for 3.0, not 3.5. A 3.5 analysis is at the end. It also doesn't get into haste and/or manyshot, which really skew things in favor of the archer, and I welcome those changes in 3.5
----------------------------------
Note: this is probably riddled with math errors and there are optimizations that could be done to both characters.
Let's ponder a pair of 28 point buy characters. One archer, one greatsword fighter. Perhaps we can add a two-weapon fighter later. Both are human fighters and will remain so during their career so as to facilitate a fair comparison. I will equip them very modestly as they level up, giving only the most basic weapons so as to simplify the comparison. No prestige classes, core rules basically. These characters are not optimized or tweaked
so they could be better, but at least they're on equal footing.
Starting stats:
GreatswordGuy
STR 18, DEX 10, CON 16
ArcherGuy
STR 14, DEX 18, CON 14
(Int, wis, and cha will be 8 for both)
At level 5
=============================================
GreatswordGuy
STR 19, DEX 10, CON 16. Avg hp = 27.5+15=42.5
Feats: Power attack, weapon focus (greatsword), weapon spec (greatsword), Cleave, Combat reflexes, Great Cleave
With his +1 greatsword he is +11 to hit and 2d6+7 (avg. 14) damage. If he feels he has an easy hit, he can go as far as +6 to hit, and 2d6+12 (avg. 19) damage via power attack.
ArcherGuy
STR 14, DEX 19, CON 14 Avg hp = 27.5+10=37.5
Feats: Weapon Focus (composite longbow) Point blank shot, Precise Shot, Rapid Shot, Weapon specialization (composite longbow), Improved initiative
With his +1 mighty composite longbow (considerably more expensive than the greatsword) the archer is +11 to hit and 1d8+2 (avg 6.5) damage. Inside 30 feet the archer is +12 to hit, and 1d8+5 damage (avg 9.5). With a rapid shot inside 30 feet (the archer's best move) he is +10/+10 at 1d8+6 dmg (avg 10.5
ea, 21 combined).
Analysis: Looks about even to me. If we assign "favorable" conditions to each character, the swordsman will do 19 points on a power-attacked hit, and may cleave. The archer will do 21 points. The swordsman can also respond to attacks of opportuntity that the archer cannot, and the swordsman can move and do his damage, so they are slight points in favor of the swordsman.
At level 10
=============================================
GreatswordGuy
STR 20, DEX 10, CON 16. Avg hp = 55+30=85
Feats: Power attack, weapon focus (greatsword), weapon spec (greatsword), Cleave, Combat reflexes, Great cleave, Improved critical, Improved initative, Dodge, Iron will, Great Fortitude <Note that the important feats are all taken at this point and it matters less now. I'd love expertise for this guy but he's too dumb.>
With his +2 greatsword he is +18/+13 to hit and 2d6+9 (avg. 16, total 32) damage. If he feels he has an easy hit, he can go as far as +8/+3 to hit, and 2d6+19 (avg. 26, total 52) damage via power attack. A bit extreme for most cases tho.
ArcherGuy
STR 14, DEX 20, CON 14 Avg hp = 55+20=75
Feats: Weapon Focus (composite longbow) Point blank shot, Precise Shot, Rapid Shot, Weapon specialization (composite longbow), Improved initiative, sharp shooter, etc. <Note that the important feats are all taken at this point and it matters less now>
With his +2 mighty composite longbow and +2 arrows (assuming the availability of greater magic weapon, which is reasonable at this level) the archer is +20/+15 to hit and 1d8+5 (avg 9.5, total 19) damage. With a rapid shot inside 30 feet (the archer's best move) he is +18/+18/+13 at 1d8+9 dmg (avg 13.5 ea, 40.5 combined).
Analysis: The conclusion becomes harder now but the archer is showing slightly more damage. They are at about the same to hit bonus without power attack. On the other hand with power attack, the swordsman looses accuracy but can pull closer in damage. I'd say at this level, we're starting to see a gap open in damage but there are mitigating factors.
At level 15
=============================================
GreatswordGuy
STR 21, DEX 10, CON 16. Avg hp = 82.5+45=127.5
Feats: Power attack, weapon focus (greatsword), weapon spec (greatsword), Cleave, Combat reflexes, Great cleave, Improved critical, Improved initative, Dodge, Iron will, Great Fortitude <Note that the important feats are all taken at this point and it matters less now. I'd love expertise for this guy but he's too dumb.>
With his +4 greatsword he is +23/+18/+13 to hit and 2d6+11 (avg. 18, total 54) damage. If he feels he has an easy hit, he can go as far as +8/+3/-2 to hit, and 2d6+26 (avg. 33, total 99) damage via power attack. A bit extreme for most cases tho. At this point however he can expect to be using power attack more regularly.
ArcherGuy
STR 14, DEX 21, CON 14 Avg hp = 82.5+30=112.5
Feats: Weapon Focus (composite longbow) Point blank shot, Precise Shot, Rapid Shot, Weapon specialization (composite longbow), Improved initiative, sharp shooter, etc. <Note that the important feats are all taken at this point and it matters less now>
With his +4 mighty composite longbow and +5 arrows (assuming the availability of greater magic weapon, which is reasonable at this level) the archer is +28/+23/+18 to hit and 1d8+11 (avg 15.5, total 46.5) damage. With a rapid shot inside 30 feet (the archer's best move) he is +26/+26/+22/+16 at 1d8+14 dmg (avg 18.5 ea, 74 combined).
Analysis: The archer has a more distinct lead now. He can be prety sure of doing his 74, while the swordsman will average 54 at lower accuracy. This is a pretty sizable damage gap. However the swordsman can still take AOO's and threaten hexes however and that's hard to account for in the numbers, and can do a good bit more damage with power attack. Even a 5 point shift means
a 15 point damage change. The swordsman has the flexibility of doing more damage to low AC targets, while the archer's bonus is wasted. The key difference seems to be the stacking of magical bows and arrows.
As an aside you now have the solid edge in hp for the swordsman. They will have about the same AC I believe. The archer either has to give up dex bonus and wear heavy armor, or wear light armor. Either case will make their AC's converge.
Conclusion here is that the archer is doing more damage, but the swordsman is more flexible and a different battlefield presence, akin to the difference between a tank and a piece of artillery. The swordsman will have an edge defensively, which helps compensate for the lower damage. The swordsman also has twice the crit range of the archer, and this will raise his damage accordingly (Swordsman crits on a 17-20 vs archer on a 19-20) but this would be offset slightly by the higher crit multiplier on the bow.
Again these characters are minimally equipped. If a simple item like a stat bonus item is introduced, it allows the archer to simply hit more (assuming dex boosted) whereas the melee fighter gains more damage and hit bonus. A +2 to damage per swing for the swordsman closes the gap significantly. The archer could take a strength item and increase the pull on the bow however so this hardly makes a huge difference. I think this point is key to consider and I may revise the analysis later to include the effect of a +4 strength item at this level.
At level 18
=============================================
GreatswordGuy
STR 22, DEX 10, CON 16. Avg hp = 153
Feats: Power attack, weapon focus (greatsword), weapon spec (greatsword), Cleave, Combat reflexes, Great cleave, Improved critical, Improved initative, Dodge, Iron will, Great Fortitude <Note that the important feats are all taken at this point and it matters less now. I'd love expertise for this guy but he's too dumb.>
With his +5 greatsword he is +30/+25/+20/+15 to hit and 2d6+13 (avg. 20, total 80) damage. If he feels he has an easy hit, he can go as far as +12/+7/+2/-3 to hit, and 2d6+31 (avg. 38, total 152) damage via power attack. Can't hit the broad side of a barn of course. However we know at this point however he can expect to be using power attack more regularly.
ArcherGuy
STR 14, DEX 22, CON 14 Avg hp = 135
Feats: Weapon Focus (composite longbow) Point blank shot, Precise Shot, Rapid Shot, Weapon specialization (composite longbow), Improved initiative, sharp shooter, etc. <Note that the important feats are all taken at this point and it matters less now>
With his +5 mighty composite longbow and +5 arrows the archer is
+35/+30/+25/+20 to hit and 1d8+12 (avg 16.5, total 49.5) damage. With a rapid shot inside 30 feet (the archer's best move) he is +33/+33/+28/+23/+18 at 1d8+15 dmg (avg 19.5 ea, 97.5 combined).
Analysis: The damage gap actually shrunk, since you can't get better than a +5 arrow which the archer had earlier. Also if you throw the strength item into the mix, I think the gap is even smaller.
There's a lot more work that could be done here, but overall I don't think there's the problem that some people are convinced there is.
--------------------------------------
Now let's add in what we know about 3.5:
DR: Hard to say what effect these changes will have since we don't know the exact nature. A special purpose weapon will be easier to come by than special arrows of course. Also since the archer does lower damage per shot, the DR will hurt the archer more without the means to bypass it. But it's all guesswork.
Haste: this can go a lot of ways depending what kind of tricks you use. Too varied to fold in here.
GMW: A big change. By slowing down the rate at which the arrows go up in their bonus, you tune down the archer's damage. I generally assumed that the swordsman and archer had the same level of GMW available to them (cast by a spellcaster of their level) but since the arrow/bow bonus stacks, this would be more of a cut for the archer. Also in practice, most fighters have magic weapons but archers use a lot of GMW for arrows.
So the 3.5 changes, what little we know, would seem to close the gap further.