What would cause a tropical fish to die after only a few weeks?

It could be they were sick BEFORE you bought them. Often times fish that are bought at pet stores don't live very long. I myself had a fantail goldfish bought at a small pet store that lived 6 years. But that seems to be the exception, not the rule.

I would look at all the fish in the store before I bought one. Often times what other fish look like might be an indication of how well the fish are. Fish are finicky. They require such care, and a certain environment to survive, so it can be tricky to care for them.

I think it could be new tank syndrome.When you firstset up your tank you must always (seed)your filter.To do this add only 1 or two hardy fish and feed sparingly,you can also buy a product called filter start which will let you add more fish after aweek or two.youshould also test your pH,nitrite,and ammonia levels,ammonia is a killer of fish.