← 返回资讯屏轩教育 · 行业资讯

Solutions with Integer Values | 整数解的求解方法

2026-08-02 15:11 · 本文部分内容由AI辅助创作

📚 Solutions with Integer Values | 整数解的求解方法

In A-Level Mathematics, many problems require finding solutions where all variables are integers. This goes beyond ordinary algebraic solving – you need to combine factoring, bounding techniques, number theory ideas and careful logical reasoning. This article walks you through the essential methods for tackling integer-solution problems, with plenty of worked examples and clear explanations.

在 A-Level 数学中,许多问题要求寻找所有变量均为整数的解。这超出了常规的代数求解——你需要综合运用因式分解、范围限定、数论思想和严谨的逻辑推理。本文带你系统掌握处理整数解问题的核心方法,并配有大量详细例题和清晰讲解。


1. What are Integer Solutions? | 什么是整数解?

a set of values for the variables that makes the equation true, where every variable is an integer (…, –2, –1, 0, 1, 2, … s infinitely many real solutions, but only finitely many integer solutions if we also restrict x and y to be positive, say (1,4), (2,3), etc.

整数解是指方程中每个变量的取值均为整数(…, –2, –1, 0, 1, 2, …)且能使等式成立的一组值。例如方程 x + y = 5 有无穷多个实数解,但如果限制 x 和 y 为正整数,则只有有限个整数解,如 (1,4)、(2,3) 等。

In many A-Level contexts, the variables represent countable objects (people, coins, exam scores), so integer solutions are the only physically meaningful ones. Questions often appear in proof, algebra and even coordinate geometry, asking you to "find all integer pairs" or "determine whether an integer solution exists".

在许多 A-Level 情境中,变量代表可数的对象(人数、硬币、考试分数),因此只有整数解才有实际意义。这类问题常出现在证明、代数甚至坐标几何中,要求你“找出所有整数对”或“判断是否存在整数解”。


2. Integer Solutions to Linear Equations in Two Variables | 二元一次方程的整数解

are given integers. A necessary condition for integer solutions is that the greatest common divisor (gcd) of a and b must divide c. If it does not, there is no integer solution.

最简单的情形是二元一次丢番图方程:ax + by = c,其中 a、b、c 为给定整数。存在整数解的必要条件是 a 和 b 的最大公因数 (gcd) 必须整除 c。若不整除,则无整数解。

set of solutions is given by the formulas below, where d = gcd(a,b) and t is any integer.

一旦通过试凑或扩展欧几里得算法找到一个特解 (x₀, y₀),全体解便可由下列公式给出,其中 d = gcd(a,b),t 为任意整数。

x = x₀ + (b/d)t, y = y₀ – (a/d)t (t ∈ ℤ)

x = x₀ + (b/d)t, y = y₀ – (a/d)t (t ∈ ℤ)

Example: Solve 15x + 21y = 9 for integers. Since gcd(15,21)=3 and 3|9, solutions exist. Divide by 3: 5x + 7y = 3. A particular solution is x₀=2, y₀=–1 because 5(2)+7(–1)=3. Hence all integer solutions are x = 2 + 7t, y = –1 – 5t, with t ∈ ℤ.

示例:求方程 15x + 21y = 9 的整数解。由于 gcd(15,21)=3 且 3 整除 9,解存在。除以 3 得 5x + 7y = 3。一个特解为 x₀=2, y₀=–1,因为 5×2+7×(–1)=3。因此所有整数解为 x = 2 + 7t, y = –1 – 5t, t ∈ ℤ。


3. Integer Roots of Quadratic Equations | 二次方程的整数根

bx + c = 0 with integer coefficients, integer roots exist only if the discriminant Δ = b² – 4ac is a perfect square. Moreover, if α and β are the roots, Vieta's formulas give α+β = –b/a and αβ = c/a, which are rational; for integers, these must actually be integers.

对于整系数二次方程 ax² + bx + c = 0,仅当判别式 Δ = b² – 4ac 为完全平方数时才可能有整数根。此外,若 α 和 β 为二根,由韦达定理有 α+β = –b/a 和 αβ = c/a,它们为有理数;若要求整数,则必须实际上为整数。

cs, a=1). Combine this with the sum condition to find both roots without solving the quadratic.

这通常能让你快速缩小范围:若猜测存在整数根,它必然是常数项 c 的因数(对于首项系数 a=1 的首一二次式)。结合两根之和的条件,不用真正求解就能找到两个根。

Example: Solve x² – rs of 12: ±1, ±2, ±3, ±4, ±6, ±12. Checking pairs whose sum is 7 gives 3 and 4. Indeed, (x–3)(x–4)=0, so roots are 3 and 4, both integers.

示例:在整数范围内求解 x² – 7x + 12 = 0。可能的整数根是 12 的因数:±1, ±2, ±3, ±4, ±6, ±12。检验哪两个之和为 7,得到 3 和 4。确实 (x–3)(x–4)=0,两根 3 和 4 均为整数。


4. Factorisation into Product Form: AB = Constant | 因式分解为乘积形式:AB = 常数

A powerful technique is to rewrite an equation so that the product of two integer expressions equals a known integer constant. Then you list all factor pairs of the constant and solve the resulting linear systems.

一种强有力的技巧是将方程变形,使得两个整数表达式的乘积等于一个已知整数常数。然后列出该常数的所有因数对,再解出对应的线性方程组。

For instance, to solve xy + 2x – y = 5, add 2 to both sides and factor: xy + 2x – y – 2 = 3 → (x – 1)(y + 2) = 3. Since x, y are integers, (x– integer factors of 3: (±1, ±3) and (±3, ±1). This yields four possible integer solutions.

例如,求解 xy + 2x – y = 5,两边加 2 并分解:xy + 2x – y – 2 = 3 → (x – 1)(y + 2) = 3。由于 x、y 为整数,(x–1) 和 (y+2) 必须是 3 的整数因子:(±1, ±3) 及 (±3, ±1)。由此得到四组可能的整数解。

Example continued: From (x–1, y+2) = (1,3) ⇒ x=2, y=1; from (3,1) ⇒ x=4, y=–1; from (–1,–3) ⇒ x=0, y=–5; from (–3,–1) ⇒ x=–2, y=–3. Check them in the original equation.

续示例:由 (x–1, y+2) = (1,3) ⇒ x=2, y=1;由 (3,1) ⇒ x=4, y=–1;由 (–1,–3) ⇒ x=0, y=–5;由 (–3,–1) ⇒ x=–2, y=–3。代入原方程验证均成立。


广告 / Sponsored

5. Using Inequalities to Bound Integer Values | 利用不等式限定整数范围

ive integers and 1/x + 1/y = 1/4, without loss of generality assume x ≤ y. Then 1/x ≥ 1/2(1/x+1/y) = 1/8, so x ≤ 8. This bounds the search.

很多时候,你可以从方程本身推导出不等式,以限制可能整数解的范围。例如,若 x、y 为正整数且满足 1/x + 1/y = 1/4,不失一般性假设 x ≤ y,那么 1/x ≥ (1/2)(1/x+1/y) = 1/8,故 x ≤ 8。这大大缩小了搜索范围。

with x ≤ 8 and 1/x > 1/4, we actually need x > 4, so x = 5,6,7,8. Then compute y = 1/(1/4 – x=5 gives y=20 (integer). So solutions are (5,20), (6,12), and by symmetry (12,6), (20,5).

对上述方程,在 x ≤ 8 且 1/x < 1/4 的前提下,实际上需要 x > 4,因此 x = 5,6,7,8。计算 y = 1/(1/4 – 1/x)。只有 x=6 得整数 y=12,x=5 得 y=20(整数)。所以解为 (5,20), (6,12),再由对称性得 (12,6), (20,5)。


6. Modular Arithmetic: Proving Non-existence or Narrowing Options | 模运算:证明无解或缩小选项

Modular arithmetic is an elegant tool for showing that certain equations have no integer solutions. The key is to consider the equation modulo a well-chosen integer, typically 3, 4, 5 or 8, and use the fact that squares modulo n can only take a few values.

模运算是一种优雅的工具,用于证明某些方程无整数解。关键是选择一个合适的整数 n(常取 3、4、5 或 8)来考察方程在该模下的性质,并利用平方数模 n 只能取有限几个值的事实。

e, prove that x² + y² = 2059 has no integer solution. Look modulo 4: any integer square is ≡ 0 or 1 mod 4. So x² + y² mod 4 can only be 0, 1 or 2. But 2059 = 4×514 + 3 ≡ 3 mod 4, contradiction. Therefore no integer solutions exist.

例如,证明 x² + y² = 2059 无整数解。考虑模 4:任何整数的平方模 4 只能为 0 或 1。因此 x² + y² 模 4 只能为 0、1 或 2。但 2059 = 4×514 + 3,模 4 余 3,矛盾。故此方程无整数解。

Modular checks can also restrict possibilities. If solving x² – 3y² = 5, modulo 3 gives x² ≡ 5 ≡ 2 mod 3. But squares mod 3 are 0 or 1, never 2; so no integer solutions exist either.

模检验也可用于缩小可能性。若求解 x² – 3y² = 5,模 3 得 x² ≡ 5 ≡ 2 mod 3。但平方数模 3 只能是 0 或 1,不可能为 2;故同样无整数解。


7. Simultaneous Equations with Integer Variables | 含整数变量的联立方程组

When solving simultaneous equations where variables must be integers, solve algebraically first as you would for real numbers, then impose the integer condition on the expressions obtained. Substitution or elimination typically yields a relation that can be treated with the factorisation or bounding methods above.

当求解变量必须为整数的联立方程组时,先像处理实数一样进行代数求解,然后在所得表达式上施加整数条件。代入法或消元法通常会导出一个关系式,可以用前面的因式分解或范围限定方法处理。

10 and xy = 16. These are the sum and product of two numbers, so they are the roots of t² – 10t + 16 = 0 ⇒ t = 2 or 8. Thus solutions are (2,8) and (8,2) – both integers.

示例:求所有满足 x + y = 10 和 xy = 16 的整数对 (x,y)。这是两数之和与之积,因此它们是方程 t² – 10t + 16 = 0 的根 ⇒ t=2 或 8。故解为 (2,8) 和 (8,2)——均为整数。

Another type: Solve x² – y² = 21 and x, y ≥ 0 integers. Factor: (x–y)(x+y) = 21. Let u = x– 1, and u, v have same parity (both even or both odd). Factor pairs of 21: (1,21), (3,7), (–1,–21), etc. Only the positive pairs with u+v even give valid x, y.

另一类:求解 x² – y² = 21,x,y 为非负整数。因式分解:(x–y)(x+y) = 21。设 u = x–y, v = x+y,均为整数,uv=21,且 u 与 v 同奇偶。21 的因数对:(1,21), (3,7), (–1,–21) 等。只有那些使 u+v 为偶数的正因数对才能产生有效的 x、y。


8. Geometry and Integer Lattice Points | 几何与整数格点

Integer solutions to equations of curves correspond to lattice points (points with integer coordinates) on those curves. This geometric perspective often reveals symmetries or bounds that simplify the search.

曲线方程的整数解对应曲线上的格点(坐标均为整数的点)。这一几何视角时常能揭示对称性或范围,从而简化搜索。

3, ±4, ±5. Checking combinations gives the 12 lattice points: (±3,±4), (±4,±3), (±5,0), (0,±5).

例如,圆 x² + y² = 25 上的整数点要求两坐标的平方和为 25。可能的整数坐标只有 0, ±3, ±4, ±5。检验组合得到 12 个格点:(±3,±4), (±4,±3), (±5,0), (0,±5)。

integer points can be found using the linear Diophantine method; geometrically they form an evenly spaced set of points on the line.

类似地,对于直线 3x + 5y = 16,可以借助线性丢番图方法找出整数点;从几何上看,这些点是直线上均匀分布的一列格点。


9. Symmetry and Substitutions | 对称性与变量替换

ity. This reduces the number of cases to check because any solution can be permuted to satisfy the ordering.

对于具有对称性的方程,常可不妨设变量有序,如 x ≤ y ≤ z。这能减少需检验的情形,因为任何解均可通过排列满足该顺序。

(x) term dominates; rearranging can lead to a contradiction unless x is small. Through bounding we find only (1,2,5) and permutations work. The substitution x → 1, then solve for y, z gives a simpler factorisation.

示例:求 xy + yz + zx = xyz + 2 的所有正整数解。方程关于 x,y,z 对称。假设 1 ≤ x ≤ y ≤ z。左边 ≤ 3yz,故 yz(x) 项占主导;整理后除非 x 很小,否则会导出矛盾。通过限定范围可发现仅有 (1,2,5) 及其排列成立。令 x=1 代入,再解 y、z 会得到更简单的因式分解。


10. Common Pitfalls and Strategic Tips | 常见错误与解题策略

that factor pairs include negative integers. When you have AB = 6, for instance, (A,B) = (–2,– nsider all integer divisors, including negatives, unless the problem restricts positivity.

一个常见错误是忘记因数对包括负整数。例如 AB = 6 时,(A,B) = (–2,–3) 与 (2,3) 同为有效选项。除非题目

Published by TutorHao | A-Level Revision Series | aleveler.com

广告 / Sponsored
现货 Cambridge International AS & ALevel IT Coursebook剑桥国际IGC…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥467.0

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao