Final answer:
The equation to represent the total cost of a gym membership is y = 40x + 20, where x is the number of months.
Step-by-step explanation:
To represent the total cost, y, of a gym membership, we can use the equation y = 40x + 20, where x represents the number of months. The $40 per month is multiplied by the number of months to calculate the total monthly cost, and then the $20 sign-up fee is added to get the total cost.