系数为[-2k,2k]非零整数的二次函数有实根的概率估计
Great question—since you're looking for a probability estimate (not exact values), let's break this down using your example where (a, b, c \in [-100, 100]) (I assume we're excluding zero for all variables here, since total cases are (200^3), which matches 200 non-zero values per variable).
First, the key condition: a quadratic (f(x) = ax^2 + bx + c) intersects the X-axis if and only if its discriminant is positive:
b² - 4ac > 0 ⇒ b² > 4ac
Let's split this into manageable cases to count favorable outcomes:
Case 1: (ac < 0) (opposite signs for a and c)
If (ac) is negative, (4ac) is negative—and since (b²) is always non-negative, (b² > 4ac) is automatically true here.
Calculating the number of favorable pairs:
- (a > 0) (100 values: 1 to 100) and (c < 0) (100 values: -100 to -1): (100 × 100 = 10,000) (a,c) pairs
- (a < 0) (100 values: -100 to -1) and (c > 0) (100 values:1 to 100): another (10,000) pairs
- For each of these (20,000) (a,c) pairs, b can be any of the 200 non-zero values.
Total favorable outcomes here: (20,000 × 200 = 4,000,000)
Case 2: (ac > 0) (same signs for a and c)
Here, (4ac) is positive, so we need (b² > 4ac) to hold. This is trickier, but we can use a continuous approximation (since 100 is large, discrete vs continuous results are very close).
First, count the total (a,c) pairs here:
- Both positive: (100 ×100 =10,000) pairs
- Both negative: (100×100=10,000) pairs
Total: (20,000) pairs
For each pair, (4ac) ranges from 4 (when |a|=|c|=1) to 40,000 (when |a|=|c|=100). Since (b²) maxes out at (100²=10,000), any pair where (4ac >10,000) (i.e., (ac>2500)) can't satisfy (b²>4ac).
Using integration to estimate the average proportion of valid b values per (a,c) pair (treating variables as continuous in [1,100]):
- The proportion of b values where (|b|>2\sqrt{ac}) is (1 - \frac{2\sqrt{ac}}{100}) when (ac<2500), and 0 otherwise.
- Calculating the double integral for this proportion gives us approximately 0.562 (or 56.2%).
Total favorable outcomes here: (20,000 ×200 ×0.562 ≈2,248,000)
Total Estimated Probability
Adding the two cases together:
Total favorable ≈ (4,000,000 +2,248,000=6,248,000)
Total possible cases: (200^3=8,000,000)
Estimated probability: (\frac{6,248,000}{8,000,000}≈0.781) (or ~78%)
This is a solid approximation—since we used continuous integration for the tricky case, the exact discrete value would be very close to 78%.
内容的提问来源于stack exchange,提问作者Diego

