The function of g += t^2-t represents the total number of games played by t teams in a sports league in which each team plays each of the other teams twice. The Metro League plays a total of 132 games. How many teams are in the league?

t^2-t = 132 ?

t^2 - t - 132 = 0

(t-12)(t+11) = 0

t = 12

To find the number of teams in the league, we need to set up an equation using the given information.

The function g += t^2 - t represents the total number of games played by t teams. Since each team plays each of the other teams twice, the total number of games can be calculated using the combination formula nCr, where n represents the number of teams and r represents the number of games played between two teams.

In this case, the combination formula becomes:

g = C(t, 2) * 2

where C(t, 2) represents the number of combinations of t teams taken 2 at a time, and we multiply by 2 to account for each team playing each other twice.

Now we can set up the equation using the given information:

132 = C(t, 2) * 2

To solve this equation, we can rearrange it to isolate C(t, 2):

C(t, 2) = 66 / 2 = 33

Now we need to find the value of t that satisfies this equation. We can do this by finding the number of combinations of t teams taken 2 at a time and equating it to 33.

The formula for combinations is given by:

C(t, 2) = t! / [(t - 2)! * 2!]

where t! represents the factorial of t.

Using this formula, we can substitute C(t, 2) = 33:

33 = t! / [(t - 2)! * 2!]

Next, we simplify the equation:

33 = t * (t - 1) / (2 * 1)

Simplifying further, we get:

33 = t * (t - 1) / 2

Multiplying both sides of the equation by 2, we have:

66 = t * (t - 1)

Expanding the equation, we get:

66 = t^2 - t

Rearranging the equation, we have:

t^2 - t - 66 = 0

Now we can solve this quadratic equation using factoring, completing the square, or the quadratic formula. In this case, we can factor the equation:

(t + 6) * (t - 11) = 0

From this factorization, we have two possible solutions: t + 6 = 0 or t - 11 = 0.

Solving each of these equations, we find:

t + 6 = 0 => t = -6
t - 11 = 0 => t = 11

Since the number of teams cannot be negative, the only valid solution is t = 11.

Therefore, there are 11 teams in the Metro League.