To solve the problem of how many students are in the class, we can set up a couple of equations based on the information provided. Let's break it down step by step.
Understanding the Problem
We have a certain number of students, which we'll denote as S, and a certain number of rows, which we'll denote as R. The number of students per row can be expressed as P. Thus, we can say:
- S = R × P (Total students equals rows times students per row)
Setting Up the Equations
From the problem, we have two scenarios:
- If one student is added to each row, the number of rows decreases by 2.
- If one student is removed from each row, the number of rows increases by 3.
We can express these scenarios mathematically:
- When one student is added: S = (R - 2) × (P + 1)
- When one student is removed: S = (R + 3) × (P - 1)
Formulating the Equations
Now, we can set up our equations based on the above expressions:
- From the first scenario: S = (R - 2)(P + 1)
Expanding this gives us:
S = RP + R - 2P - 2
- From the second scenario: S = (R + 3)(P - 1)
Expanding this gives us:
S = RP - R + 3P - 3
Equating the Two Expressions
Since both expressions equal S, we can set them equal to each other:
RP + R - 2P - 2 = RP - R + 3P - 3
Simplifying the Equation
Now, let's simplify this equation:
- Cancel RP from both sides:
- R - 2P - 2 = -R + 3P - 3
Rearranging gives us:
Finding the Total Number of Students
Now we have a relationship between R and P. We can express R in terms of P:
R = (5P - 1)/2
Now, substituting this back into the equation for S:
S = R × P = ((5P - 1)/2) × P
This simplifies to:
S = (5P^2 - P)/2
Testing Possible Values
Now, let's test the answer choices provided to find a suitable integer value for S:
- A) 55: 2S = 110 → 5P^2 - P = 110 → 5P^2 - P - 110 = 0 (not a perfect square)
- B) 30: 2S = 60 → 5P^2 - P = 60 → 5P^2 - P - 60 = 0 (not a perfect square)
- C) 115: 2S = 230 → 5P^2 - P = 230 → 5P^2 - P - 230 = 0 (not a perfect square)
- D) 60: 2S = 120 → 5P^2 - P = 120 → 5P^2 - P - 120 = 0
Solving for P in option D:
P = 5 gives us R = (5*5 - 1)/2 = 12 and S = 60. This fits all conditions.
Final Answer
The total number of students in the class is 60.