指数・対数の方程式
指数方程式の解き方
「預金が2倍になるのは何年後?」「放射性物質が半分になるのは何年後?」——こういった問いを解くのが指数方程式です。
大きく3つのパターンに分かれます——まず「底をそろえられるか?」を確認し、そうでなければ「置換」か「対数を取る」かを選びます。
パターン① 底をそろえる
「同じ底ならば指数の大小で比較できる」——両辺を同じ底の累乗で表すことができれば、一番簡単に解けます。
パターン② 置換する
「」と気づいたら、()と置き換えれば二次方程式になります:
()とおくと :
→ 、 →
パターン③ 対数をとる
「底をそろえられないときは両辺の対数を取る」——指数の計算を対数の計算に変換します。
対数方程式の解き方
「真数条件を忘れずに!」——対数の定義域は正の数だけなので、解が真数条件を満たすかどうかの確認が必須です。
パターン① 同じ底に変換
注意:真数条件 、つまり を確認。 は満たす。
「対数 = 数字」の形は、「底の(数字)乗 = 真数」に変換するだけです。
パターン② 対数の性質を使う
は真数条件()を満たさないので不適。 が解。
「対数の足し算は真数の掛け算」——この変換で二次方程式になることが多いです。
インタラクティブデモ:グラフによる指数方程式の解
と水平線 の交点が の解です。マウスを上下に動かすと が変わり、解 が更新されます——「グラフの交点が方程式の解」という視覚的な確認ができます。
function loop() {
ctx.clearRect(0, 0, W, H);
var ox = W / 2 - 80, oy = H - 40;
var scaleX = 55, scaleY = 35;
var k = Math.max(0.1, ((H - my) / H) * 9 + 0.1);
function toScreen(x, y) {
return { sx: ox + x * scaleX, sy: oy - y * scaleY };
}
// Grid
ctx.strokeStyle = 'rgba(255,255,255,0.06)';
ctx.lineWidth = 1;
for (var gx = -2; gx <= 5; gx++) {
var gs = toScreen(gx, 0);
ctx.beginPath(); ctx.moveTo(gs.sx, 0); ctx.lineTo(gs.sx, H); ctx.stroke();
}
for (var gy = 0; gy <= 9; gy += 2) {
var gs2 = toScreen(0, gy);
ctx.beginPath(); ctx.moveTo(0, gs2.sy); ctx.lineTo(W, gs2.sy); ctx.stroke();
}
// Axes
ctx.strokeStyle = 'rgba(255,255,255,0.3)';
ctx.lineWidth = 1.5;
ctx.beginPath(); ctx.moveTo(0, oy); ctx.lineTo(W, oy); ctx.stroke();
ctx.beginPath(); ctx.moveTo(ox, 0); ctx.lineTo(ox, H); ctx.stroke();
// Axis labels
ctx.fillStyle = 'rgba(255,255,255,0.4)';
ctx.font = '12px sans-serif';
for (var lx = -1; lx <= 4; lx++) {
var ls = toScreen(lx, 0);
ctx.fillText(lx, ls.sx - 4, oy + 16);
}
for (var ly = 2; ly <= 8; ly += 2) {
var ls2 = toScreen(0, ly);
ctx.fillText(ly, ox + 4, ls2.sy + 4);
}
ctx.fillText('x', W - 20, oy - 8);
ctx.fillText('y', ox + 8, 16);
// y=2^x
ctx.strokeStyle = '#4fc3f7';
ctx.lineWidth = 2.5;
ctx.beginPath();
var st = false;
for (var xi = -2; xi <= 5; xi += 0.03) {
var yi = Math.pow(2, xi);
if (yi > 10) { st = false; continue; }
var s = toScreen(xi, yi);
if (!st) { ctx.moveTo(s.sx, s.sy); st = true; } else ctx.lineTo(s.sx, s.sy);
}
ctx.stroke();
ctx.fillStyle = '#4fc3f7';
ctx.font = 'bold 13px sans-serif';
ctx.fillText('y = 2ˣ', toScreen(2.8, 8).sx, toScreen(2.8, 8).sy);
// Horizontal line y=k
var lineY = toScreen(0, k).sy;
ctx.strokeStyle = k > 0.5 ? '#ff8a65' : 'rgba(255,138,101,0.3)';
ctx.lineWidth = 2;
ctx.beginPath(); ctx.moveTo(0, lineY); ctx.lineTo(W, lineY); ctx.stroke();
// Label y=k
ctx.fillStyle = '#ff8a65';
ctx.font = 'bold 13px sans-serif';
ctx.fillText('y = ' + k.toFixed(2), W - 110, lineY - 8);
// Intersection point
if (k > 0) {
var solX = Math.log2(k);
var sPt = toScreen(solX, k);
if (sPt.sx >= 0 && sPt.sx <= W) {
// Vertical drop line
ctx.strokeStyle = 'rgba(255,235,59,0.5)';
ctx.lineWidth = 1;
ctx.setLineDash([4,3]);
ctx.beginPath(); ctx.moveTo(sPt.sx, oy); ctx.lineTo(sPt.sx, sPt.sy); ctx.stroke();
ctx.setLineDash([]);
// Point
ctx.fillStyle = '#ffeb3b';
ctx.beginPath(); ctx.arc(sPt.sx, sPt.sy, 7, 0, Math.PI*2); ctx.fill();
ctx.strokeStyle = '#fff';
ctx.lineWidth = 1.5;
ctx.beginPath(); ctx.arc(sPt.sx, sPt.sy, 7, 0, Math.PI*2); ctx.stroke();
// x label on axis
ctx.fillStyle = '#ffeb3b';
ctx.font = 'bold 13px sans-serif';
ctx.fillText('x = ' + solX.toFixed(3), sPt.sx - 30, oy + 26);
}
}
// Info panel
ctx.fillStyle = 'rgba(0,0,0,0.65)';
ctx.beginPath(); ctx.roundRect(10, 10, 260, 80, 8); ctx.fill();
ctx.fillStyle = '#ff8a65';
ctx.font = 'bold 14px monospace';
ctx.fillText('2ˣ = ' + k.toFixed(2), 18, 32);
if (k > 0) {
var solX2 = Math.log2(k);
ctx.fillStyle = '#ffeb3b';
ctx.fillText('x = log₂(' + k.toFixed(2) + ')', 18, 54);
ctx.fillStyle = 'rgba(255,255,255,0.7)';
ctx.font = '12px sans-serif';
ctx.fillText('x ≈ ' + solX2.toFixed(4), 18, 74);
}
requestAnimationFrame(loop);
}
loop(); 対数の不等式
「底の大きさによって不等号の向きが変わる」——これが対数不等式の最重要ポイントです。
対数関数は なら単調増加、 なら単調減少です。減少関数では「大きい方を入れると小さく出る」ので不等号が逆転します。
例
を解け。
なので:(かつ真数条件 )
解:
指数不等式
指数関数でも「底によって不等号の向きが変わる」——同じ原理です。
例
を解け。
()
底 なので不等号が逆転:
練習問題
- を解け。
- を解け(真数条件に注意)。
- を解け。
- を解け。
解答
- → →
- → (真数条件 → 。 は満たす)
- → → → 。 より
- →
まとめ
| 方程式の型 | 解法 |
|---|---|
| 底をそろえて | |
| (真数条件確認) | |
| 不等式 | 底が か で不等号の向きが変わる |
「真数条件の確認を忘れずに」——これが対数方程式・不等式を解くときの最重要ルールです。
次回は関数の合成と逆関数を学びます。「2つの関数を組み合わせて新しい関数を作る」という概念で、プログラムの関数と同じ考え方です。