根号と無理数の計算
根号とは何か
「面積が2の正方形の一辺は?」—— を満たす正の数です。これが (ルート2)です。
は「2乗すると になる非負の数」です。
√4 = 2 (2² = 4)
√9 = 3 (3² = 9)
√2 ≈ 1.414... (有理数で表せない)
のように分数で表せない数を無理数と言います。「1.4142135…」と小数点以下が永遠に続き、どこにも繰り返しのパターンが現れません。ギリシャの数学者が「比を取れない数」として発見し、哲学的な混乱を引き起こしたと言われています。
根号の計算規則
直感的に言えば、「根号の中の掛け算は、根号の外でも掛け算になる」というルールです。
√a × √b = √(ab) (a ≥ 0, b ≥ 0)
√a / √b = √(a/b) (a ≥ 0, b > 0)
(√a)² = a (a ≥ 0)
√(a²) = |a| (a は任意)
注意: ではなく です。たとえば なら 。「マイナスを2乗すると必ずプラスになる」ので、答えは必ず 0 以上になります。
計算例
(「4 を外に出す」発想)
( の係数を足す)
(掛けてから整理)
幾何学的な√の構成
は一辺が 1 の正方形の対角線の長さです——これがピタゴラスの定理です。
「長さ の線分を実際に引ける」——つまり は「見えない数」ではなく、コンパスと定規で正確に作図できる「実在する長さ」です。同様に もコンパスと定規で作図できます。
var t = 0;
var cx = 200, cy = 270;
var unit = 70;
function drawArrow(x1, y1, x2, y2, color) {
ctx.strokeStyle = color;
ctx.lineWidth = 2.5;
ctx.beginPath();
ctx.moveTo(x1, y1);
ctx.lineTo(x2, y2);
ctx.stroke();
var angle = Math.atan2(y2 - y1, x2 - x1);
ctx.fillStyle = color;
ctx.beginPath();
ctx.moveTo(x2, y2);
ctx.lineTo(x2 - 8*Math.cos(angle-0.4), y2 - 8*Math.sin(angle-0.4));
ctx.lineTo(x2 - 8*Math.cos(angle+0.4), y2 - 8*Math.sin(angle+0.4));
ctx.closePath();
ctx.fill();
}
function loop() {
ctx.clearRect(0, 0, W, H);
t += 0.015;
var prog = (Math.sin(t) + 1) / 2;
ctx.fillStyle = '#94a3b8';
ctx.font = '14px monospace';
ctx.textAlign = 'center';
ctx.fillText('ピタゴラスの定理で √ を構成する', W/2, 22);
// Base unit along x-axis
ctx.strokeStyle = '#64748b';
ctx.lineWidth = 1;
ctx.setLineDash([4, 4]);
ctx.beginPath();
ctx.moveTo(cx, cy - 0*unit);
ctx.lineTo(cx + 3*unit, cy);
ctx.stroke();
ctx.setLineDash([]);
// Step 1: √2 = hyp of (1,1)
var x1 = cx + unit, y1 = cy;
var x2 = cx + unit, y2 = cy - unit;
var xh = cx, yh = cy;
// horizontal leg
drawArrow(xh, yh, x1, y1, '#3b82f6');
ctx.fillStyle = '#93c5fd'; ctx.font = '13px monospace'; ctx.textAlign = 'center';
ctx.fillText('1', (xh+x1)/2, yh + 16);
// vertical leg
drawArrow(x1, y1, x2, y2, '#22c55e');
ctx.fillStyle = '#86efac';
ctx.fillText('1', x2 + 14, (y1+y2)/2);
// hypotenuse √2
ctx.strokeStyle = '#f59e0b';
ctx.lineWidth = 2.5;
ctx.beginPath();
ctx.moveTo(xh, yh);
ctx.lineTo(x2, y2);
ctx.stroke();
ctx.fillStyle = '#fbbf24';
ctx.fillText('√2', (xh+x2)/2 - 14, (yh+y2)/2 - 4);
// Step 2: √3 = hyp of (√2, 1)
var x3 = cx + Math.sqrt(2)*unit, y3 = cy;
var x4 = cx + Math.sqrt(2)*unit, y4 = cy - unit;
drawArrow(x3, y3, x4, y4, '#22c55e');
ctx.fillStyle = '#86efac'; ctx.fillText('1', x4 + 14, (y3+y4)/2);
ctx.strokeStyle = '#8b5cf6'; ctx.lineWidth = 2.5;
ctx.beginPath();
ctx.moveTo(xh, yh);
ctx.lineTo(x4, y4);
ctx.stroke();
ctx.fillStyle = '#c4b5fd';
ctx.fillText('√3', (xh+x4)/2 - 14, (yh+y4)/2 + 2);
// Step 3: √5 = hyp of (2, 1)
var x5 = cx + 2*unit, y5 = cy;
var x6 = cx + 2*unit, y6 = cy - unit;
drawArrow(x5, y5, x6, y6, '#22c55e');
ctx.fillStyle = '#86efac'; ctx.fillText('1', x6 + 14, (y5+y6)/2);
ctx.strokeStyle = '#ef4444'; ctx.lineWidth = 2.5;
ctx.beginPath();
ctx.moveTo(xh, yh);
ctx.lineTo(x6, y6);
ctx.stroke();
ctx.fillStyle = '#fca5a5';
ctx.fillText('√5', (xh+x6)/2 - 14, (yh+y6)/2 + 10);
// origin dot
ctx.fillStyle = '#fff';
ctx.beginPath();
ctx.arc(xh, yh, 4, 0, Math.PI*2);
ctx.fill();
// legend
ctx.fillStyle = '#fbbf24'; ctx.font = 'bold 13px monospace'; ctx.textAlign = 'left';
ctx.fillText('√2 ≈ 1.414', 380, 100);
ctx.fillStyle = '#c4b5fd';
ctx.fillText('√3 ≈ 1.732', 380, 122);
ctx.fillStyle = '#fca5a5';
ctx.fillText('√5 ≈ 2.236', 380, 144);
requestAnimationFrame(loop);
}
loop(); 分母の有理化
のように分母に根号がある場合、計算の都合上「分母を整数にしたい」ことがあります。これを有理化と言います。
「なぜ有理化するの?」——手計算のときに の方が より扱いやすいからです。また、いくつかの答えが「同じかどうか」を比べるときにも揃えた形の方が便利です。
単純な根号
1/√2 = 1/√2 × √2/√2 = √2/2
上下に同じ を掛ける——「1をかけても値は変わらない、ただし という形で」。
二項の場合(共役を使う)
1/(√3 + 1) = 1/(√3+1) × (√3-1)/(√3-1)
= (√3-1) / (3-1)
= (√3-1) / 2
分母 になって根号が消えます——これが共役(conjugate)の活用です。「符号だけ変えた式をかけると、二乗になって根号が消える」という発想です。
| 元の式 | 有理化の乗数 | 有理化後 |
|---|---|---|
二重根号の外し方
が成り立ちます()。
なぜかと言うと、 なので、「この展開式の を取る」とちょうど元の式になります。
例:
、 なので :
√(5 + 2√6) = √(3 + 2√(3·2) + 2) = √3 + √2
例:
、 なので :
√(8 - 2√15) = √5 - √3 (√5 > √3 なので正)
var xVal, step, timer;
step = 0;
timer = 0;
function loop() {
ctx.clearRect(0, 0, W, H);
timer++;
if (timer > 90) { timer = 0; step = (step + 1) % 4; }
xVal = Math.max(1, Math.min(9, (mx / W) * 9));
var sqrtX = Math.sqrt(xVal);
var lines = [
'元の式: 1 / (√' + xVal.toFixed(1) + ' + 1)',
'共役乗算:× (√' + xVal.toFixed(1) + ' - 1) / (√' + xVal.toFixed(1) + ' - 1)',
'展開後: (√' + xVal.toFixed(1) + ' - 1) / (' + xVal.toFixed(1) + ' - 1)',
'結果: (√' + xVal.toFixed(1) + ' - 1) / ' + (xVal - 1).toFixed(1) + ' ≈ ' + ((sqrtX - 1)/(xVal - 1)).toFixed(4)
];
var colors = ['#93c5fd', '#fbbf24', '#86efac', '#c4b5fd'];
ctx.fillStyle = '#94a3b8';
ctx.font = '14px monospace';
ctx.textAlign = 'center';
ctx.fillText('有理化ステップ(マウスで x を変える)', W/2, 28);
ctx.fillText('x = ' + xVal.toFixed(2) + ' √x ≈ ' + sqrtX.toFixed(4), W/2, 50);
for (var i = 0; i <= step; i++) {
ctx.fillStyle = colors[i];
ctx.font = (i === step ? 'bold ' : '') + '15px monospace';
ctx.textAlign = 'left';
ctx.fillText(lines[i], 40, 90 + i * 44);
if (i < step) {
ctx.strokeStyle = colors[i];
ctx.lineWidth = 0.5;
ctx.globalAlpha = 0.3;
ctx.beginPath();
ctx.moveTo(40, 98 + i * 44);
ctx.lineTo(560, 98 + i * 44);
ctx.stroke();
ctx.globalAlpha = 1;
}
}
var orig = 1 / (sqrtX + 1);
var rationalized = (sqrtX - 1) / (xVal - 1);
ctx.fillStyle = Math.abs(orig - rationalized) < 0.0001 ? '#22c55e' : '#ef4444';
ctx.font = '13px monospace';
ctx.textAlign = 'center';
ctx.fillText('元の値 ' + orig.toFixed(4) + ' 有理化後 ' + rationalized.toFixed(4) + (Math.abs(orig-rationalized)<0.0001?' ✓':''), W/2, 268);
requestAnimationFrame(loop);
}
loop(); 根号の四則演算まとめ
加法: √a + √b は (a = b のときのみ) 2√a に合体できる
√2 + √3 は合体できない(√5 ≠ √2+√3)
乗法: √a × √b = √(ab)
√2 × √8 = √16 = 4
除法: √a / √b = √(a/b)
√18 / √2 = √9 = 3
有理化:分母に根号 → 分子・分母に共役を掛ける
まとめ
- (符号に注意——マイナスの数を2乗してから√を取ると必ずプラスになる)
- (積の根号——根号の中で掛けても、外で掛けても同じ)
- 有理化は分母を整数にするための操作。共役 との積 を利用
- 二重根号 ( のとき)
次回はいよいよ複素数へ。 という「実在しない」数を導入することで、代数の世界が大きく広がります。