Let the number of sides of the two polygons be denoted as \( n_1 \) and \( n_2 \). According to the problem, we have the following two equations:
-
The total number of sides: \[ n_1 + n_2 = 13 \]
-
The total number of diagonals: The formula for the number of diagonals \( D \) in a polygon with \( n \) sides is given by: \[ D = \frac{n(n-3)}{2} \] Therefore, the total number of diagonals in the two polygons can be expressed as: \[ D_1 + D_2 = 25 \] where \( D_1 = \frac{n_1(n_1 - 3)}{2} \) and \( D_2 = \frac{n_2(n_2 - 3)}{2} \). Thus, we rewrite the second equation as: \[ \frac{n_1(n_1 - 3)}{2} + \frac{n_2(n_2 - 3)}{2} = 25 \] Multiplying through by 2 to eliminate the fraction: \[ n_1(n_1 - 3) + n_2(n_2 - 3) = 50 \]
Now we can express \( n_2 \) in terms of \( n_1 \): \[ n_2 = 13 - n_1 \]
Substituting \( n_2 \) into the diagonal equation: \[ n_1(n_1 - 3) + (13 - n_1)((13 - n_1) - 3) = 50 \] This simplifies to: \[ n_1(n_1 - 3) + (13 - n_1)(10 - n_1) = 50 \]
Expanding the second term: \[ n_1(n_1 - 3) + (130 - 13n_1 - 10n_1 + n_1^2) = 50 \] Combining like terms: \[ n_1(n_1 - 3) + (n_1^2 - 23n_1 + 130) = 50 \]
Now simplifying further: \[ n_1^2 - 3n_1 + n_1^2 - 23n_1 + 130 = 50 \] Combining terms gives: \[ 2n_1^2 - 26n_1 + 130 = 50 \] Subtracting 50 from both sides: \[ 2n_1^2 - 26n_1 + 80 = 0 \]
Dividing the entire equation by 2: \[ n_1^2 - 13n_1 + 40 = 0 \]
Next, we factor this quadratic equation: \[ (n_1 - 8)(n_1 - 5) = 0 \] Thus, we have two possible solutions for \( n_1 \): \[ n_1 = 8 \quad \text{or} \quad n_1 = 5 \]
If \( n_1 = 8 \), then: \[ n_2 = 13 - 8 = 5 \] If \( n_1 = 5 \), then: \[ n_2 = 13 - 5 = 8 \]
Hence, the two polygons have \( n_1 = 8 \) sides and \( n_2 = 5 \) sides, respectively.
To confirm, we can calculate the number of diagonals:
- For a polygon with 8 sides: \[ D_1 = \frac{8(8-3)}{2} = \frac{8 \times 5}{2} = 20 \]
- For a polygon with 5 sides: \[ D_2 = \frac{5(5-3)}{2} = \frac{5 \times 2}{2} = 5 \]
The total number of diagonals is \( 20 + 5 = 25 \), which matches the given condition.
Thus, the number of sides in the two polygons is \( 8 \) and \( 5 \).