Do onions help to sweeten tomato sauce?
Onions contain a good amount of sugar; that is why they brown and burn easily.

The sweetness is more than often hidden behind the sharp onion smell and taste.

Some onions like the vidalia onion varieties are really sweet.

One way to test if an onion will sweeten the tomato sauce would be to prepare two similar batches, one with onion, and one without.

After that sauce is cooked you need to measure the sugar level of the sauce; there are many ways to do it (chemically, mechanically, use Google).

Another less precise test is just to do blind tasting tests from the 2 batches. Use friends and fellow students to taste the 2 sauces and ask them which one is sweeter; statistically, the sauce with the onion should be sweeter.

You could also do multiple batches with different increasing amounts of onions to see how the amount of onion changes the sweetness of the sauce.