To solve the problem, we need to determine the value of ( q ) in the quadratic equation ( x^2 + qx + p = 0 ), given the following conditions:
- ( p ) and ( q ) are positive integer constants.
- ( p ) is a prime number.
- The equation has two distinct integer solutions.
Let’s approach this step by step.
Step 1: Understand the quadratic equation and its roots
For a quadratic equation ( x^2 + qx + p = 0 ), the roots (solutions) can be found using the quadratic formula:
[
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
]
Here, ( a = 1 ), ( b = q ), and ( c = p ). Thus, the roots are:
[
x = \frac{-q \pm \sqrt{q^2 - 4p}}{2}
]
The problem states that the roots are two distinct integers, say ( m ) and ( n ), where ( m \neq n ). For the roots to be integers, the discriminant ( \Delta = q^2 - 4p ) must be a perfect square, and the numerator ( -q \pm \sqrt{q^2 - 4p} ) must be divisible by 2 (since the denominator is 2).
Additionally, by Vieta’s formulas, the sum of the roots ( m + n ) and the product of the roots ( m \cdot n ) are related to the coefficients of the quadratic equation:
- Sum of roots: ( m + n = -q )
- Product of roots: ( m \cdot n = p )
Since ( p ) is a prime number and the roots ( m ) and ( n ) are distinct integers, we need to consider how ( p ) (a prime) can be expressed as the product of two distinct integers ( m ) and ( n ).
Step 2: Analyze the product of the roots
The product of the roots is ( m \cdot n = p ), where ( p ) is a prime number. A prime number ( p ) can only be factored as ( p = a \cdot b ) where ( a = 1 ) and ( b = p ), or ( a = -1 ) and ( b = -p ), if ( a ) and ( b ) are integers. However, we need ( m ) and ( n ) to be distinct integers, and their product must be positive (since ( p > 0 )).
Let’s consider the possible pairs ( (m, n) ) such that ( m \cdot n = p ):
- If both ( m ) and ( n ) are positive, the only integer factors of a prime ( p ) are ( 1 ) and ( p ). So, ( m = 1 ) and ( n = p ), or ( m = p ) and ( n = 1 ). These are not distinct as separate pairs, but they satisfy ( m \neq n ).
- If both ( m ) and ( n ) are negative, say ( m = -a ) and ( n = -b ), then ( m \cdot n = (-a)(-b) = ab = p ). Again, the only integer factors of ( p ) are ( 1 ) and ( p ), so ( a = 1 ) and ( b = p ), leading to ( m = -1 ) and ( n = -p ), or vice versa.
- If one root is positive and the other is negative, say ( m = a ) and ( n = -b ), then ( m \cdot n = a \cdot (-b) = -ab = p ). But ( p > 0 ), so this is not possible (since ( -ab ) would be negative).
Thus, the possible pairs of distinct integer roots ( (m, n) ) are:
- ( (1, p) ) or ( (p, 1) ), where both roots are positive.
- ( (-1, -p) ) or ( (-p, -1) ), where both roots are negative.
Step 3: Analyze the sum of the roots
Now, consider the sum of the roots, ( m + n = -q ). Since ( q ) is a positive integer, ( -q < 0 ), meaning ( m + n ) must be negative. Let’s evaluate the two possible cases for the roots.
Case 1: Roots are ( 1 ) and ( p )
If the roots are ( 1 ) and ( p ), then:
- Product: ( 1 \cdot p = p ), which satisfies ( m \cdot n = p ).
- Sum: ( 1 + p = -q ).
Since ( q > 0 ), we have ( 1 + p = -q ), which implies ( q = -(1 + p) ). But ( -(1 + p) < 0 ), and ( q ) must be a positive integer, so this case is not possible.
Case 2: Roots are ( -1 ) and ( -p )
If the roots are ( -1 ) and ( -p ), then:
- Product: ( (-1) \cdot (-p) = p ), which satisfies ( m \cdot n = p ).
- Sum: ( -1 + (-p) = -1 - p = -q ).
From ( -1 - p = -q ), we solve for ( q ):
[
q = 1 + p
]
This satisfies the condition that ( q ) is a positive integer, since ( p \geq 2 ) (as ( p ) is a prime number, with the smallest prime being 2).
Step 4: Verify the discriminant
For the roots to be integers, the discriminant ( \Delta = q^2 - 4p ) must be a perfect square. Let’s check this for ( q = 1 + p ):
[
\Delta = q^2 - 4p = (1 + p)^2 - 4p = 1 + 2p + p^2 - 4p = p^2 - 2p + 1 = (p - 1)^2
]
The discriminant ( (p - 1)^2 ) is indeed a perfect square, confirming that the roots are integers.
Step 5: Check the roots
Using ( q = 1 + p ), the quadratic equation becomes ( x^2 + (1 + p)x + p = 0 ). The roots are:
[
x = \frac{-(1 + p) \pm \sqrt{(1 + p)^2 - 4p}}{2}
]
We already computed the discriminant:
[
\sqrt{(1 + p)^2 - 4p} = \sqrt{(p - 1)^2} = p - 1
]
So the roots are:
[
x = \frac{-(1 + p) \pm (p - 1)}{2}
]
- First root: ( x = \frac{-(1 + p) + (p - 1)}{2} = \frac{-1 - p + p - 1}{2} = \frac{-2}{2} = -1 )
- Second root: ( x = \frac{-(1 + p) - (p - 1)}{2} = \frac{-1 - p - p + 1}{2} = \frac{-2p}{2} = -p )
The roots are ( x = -1 ) and ( x = -p ), which are distinct integers (since ( p \geq 2 )), and their product is ( (-1) \cdot (-p) = p ), satisfying all conditions.
Step 6: Match with the answer choices
We found ( q = 1 + p ). The answer choices are:
- (A) ( 2p )
- (B) ( \sqrt{p} )
- (C) ( p - 1 )
- (D) ( p + 1 )
Clearly, ( q = 1 + p = p + 1 ), which matches option (D).
Step 7: Test with an example
To confirm, let’s test with a specific prime ( p ). Choose ( p = 2 ):
- ( q = 1 + p = 1 + 2 = 3 )
- Equation: ( x^2 + 3x + 2 = 0 )
- Roots: Solve ( x^2 + 3x + 2 = (x + 1)(x + 2) = 0 ), so ( x = -1 ) or ( x = -2 ).
- Check: The roots are ( -1 ) and ( -2 ), both distinct integers, and their product is ( (-1) \cdot (-2) = 2 = p ).
Try another prime, ( p = 3 ):
- ( q = 1 + p = 1 + 3 = 4 )
- Equation: ( x^2 + 4x + 3 = 0 )
- Roots: Solve ( x^2 + 4x + 3 = (x + 1)(x + 3) = 0 ), so ( x = -1 ) or ( x = -3 ).
- Check: The roots are ( -1 ) and ( -3 ), both distinct integers, and their product is ( (-1) \cdot (-3) = 3 = p ).
The solution ( q = p + 1 ) holds consistently.
Final Answer:
The value of ( q ) is ( p + 1 ). Thus, the correct answer is:
D. ( p + 1 )