#13 ふれてみよう高校数学 関数
分数関数・無理関数
分数関数
「1人で分けるなら全部、2人で分けると半分、3人なら3分の1」—— 人で分けるときの1人分は です。人数が増えると取り分が減る——これが反比例の基本イメージです。
最もシンプルな分数関数は反比例の式:
このグラフを双曲線(hyperbola)といいます。
性質
- 定義域:( は漸近線——「どこまでいっても近づくが決して届かない線」)
- 値域:( も漸近線)
- :第1・3象限に曲線が存在——「 も も同じ符号」
- :第2・4象限に曲線が存在——「 と が逆の符号」
- 漸近線: 軸と 軸
一般形
頂点 を持つ双曲線で、漸近線は と :
「元の を右に 、上に 平行移動した」形です——漸近線の交点が になります。
無理関数
「 の平方根」——「 は何の2乗か」を求める関数です。面積が の正方形の1辺の長さが です。
- 定義域:——「マイナスの平方根は実数では定義できない」
- 値域:
- を通り、右上に延びる半放物線
- ()の逆関数——「2乗と平方根は逆の操作」
一般形 では定義域が変わります——「 を解いて定義域を求める」という手順です。
インタラクティブデモ:双曲線と漸近線
を描画します。マウスを左右に動かすと が変わります(左端で 、右端で )。 と での象限の違いを確認してください—— がマイナスになった瞬間、曲線が第1・3象限から第2・4象限に「飛び移る」様子が見られます。
マウスを左右に動かすと k が変わります
function loop() {
ctx.clearRect(0, 0, W, H);
var ox = W / 2, oy = H / 2;
var scale = 50;
var k = (mx / W) * 8 - 4;
if (Math.abs(k) < 0.2) k = 0.2 * (k < 0 ? -1 : 1);
function toScreen(x, y) {
return { sx: ox + x * scale, sy: oy - y * scale };
}
// Grid
ctx.strokeStyle = 'rgba(255,255,255,0.06)';
ctx.lineWidth = 1;
for (var gx = -6; gx <= 6; gx++) {
var gs = toScreen(gx, 0);
ctx.beginPath(); ctx.moveTo(gs.sx, 0); ctx.lineTo(gs.sx, H); ctx.stroke();
}
for (var gy = -4; gy <= 4; gy++) {
var gs2 = toScreen(0, gy);
ctx.beginPath(); ctx.moveTo(0, gs2.sy); ctx.lineTo(W, gs2.sy); ctx.stroke();
}
// Asymptote lines
ctx.strokeStyle = 'rgba(255, 200, 80, 0.5)';
ctx.lineWidth = 1.5;
ctx.setLineDash([6,4]);
ctx.beginPath(); ctx.moveTo(ox, 0); ctx.lineTo(ox, H); ctx.stroke(); // x=0
ctx.beginPath(); ctx.moveTo(0, oy); ctx.lineTo(W, oy); ctx.stroke(); // y=0
ctx.setLineDash([]);
ctx.fillStyle = 'rgba(255,200,80,0.7)';
ctx.font = '12px sans-serif';
ctx.fillText('漸近線: x=0', ox + 6, 18);
ctx.fillText('漸近線: y=0', W - 90, oy - 8);
// 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 = -5; lx <= 5; lx++) {
if (lx === 0) continue;
var ls = toScreen(lx, 0);
ctx.fillText(lx, ls.sx - 4, oy + 16);
}
for (var ly = -3; ly <= 3; ly++) {
if (ly === 0) continue;
var ls2 = toScreen(0, ly);
ctx.fillText(ly, ox + 6, ls2.sy + 4);
}
// y=k/x curve (positive x)
var curveColor = k > 0 ? '#4fc3f7' : '#ef5350';
ctx.strokeStyle = curveColor;
ctx.lineWidth = 2.5;
// Right branch
ctx.beginPath();
var st1 = false;
for (var xi = 0.08; xi <= 6; xi += 0.02) {
var yi = k / xi;
if (Math.abs(yi) > 5) { st1 = false; continue; }
var s = toScreen(xi, yi);
if (!st1) { ctx.moveTo(s.sx, s.sy); st1 = true; } else ctx.lineTo(s.sx, s.sy);
}
ctx.stroke();
// Left branch
ctx.beginPath();
var st2 = false;
for (var xi2 = -6; xi2 <= -0.08; xi2 += 0.02) {
var yi2 = k / xi2;
if (Math.abs(yi2) > 5) { st2 = false; continue; }
var s2 = toScreen(xi2, yi2);
if (!st2) { ctx.moveTo(s2.sx, s2.sy); st2 = true; } else ctx.lineTo(s2.sx, s2.sy);
}
ctx.stroke();
// Quadrant label
ctx.fillStyle = curveColor;
ctx.font = 'bold 12px sans-serif';
if (k > 0) {
ctx.fillText('第1象限', ox + 20, oy - 120);
ctx.fillText('第3象限', ox - 80, oy + 120);
} else {
ctx.fillText('第2象限', ox - 80, oy - 120);
ctx.fillText('第4象限', ox + 20, oy + 120);
}
// Info panel
ctx.fillStyle = 'rgba(0,0,0,0.65)';
ctx.beginPath(); ctx.roundRect(10, 10, 220, 70, 8); ctx.fill();
ctx.fillStyle = curveColor;
ctx.font = 'bold 14px monospace';
ctx.fillText('y = ' + k.toFixed(2) + ' / x', 18, 34);
ctx.fillStyle = 'rgba(255,255,255,0.7)';
ctx.font = '12px sans-serif';
ctx.fillText('k = ' + k.toFixed(2) + (k > 0 ? ' (第1・3象限)' : ' (第2・4象限)'), 18, 54);
ctx.fillText('定義域: x ≠ 0', 18, 72);
requestAnimationFrame(loop);
}
loop(); 無理関数のグラフ
青: y=√x オレンジ: y=√(x+2) 赤: y=√x + 1
var ox = 60, oy = H - 40;
var scaleX = 55, scaleY = 50;
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 = -1; gx <= 8; 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 <= 4; gy++) {
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 <= 7; lx++) {
var ls = toScreen(lx, 0);
ctx.fillText(lx, ls.sx - 4, oy + 16);
}
for (var ly = 1; ly <= 3; ly++) {
var ls2 = toScreen(0, ly);
ctx.fillText(ly, ox + 6, ls2.sy + 4);
}
// y=sqrt(x) - blue
ctx.strokeStyle = '#4fc3f7';
ctx.lineWidth = 2.5;
ctx.beginPath();
var s0 = toScreen(0, 0);
ctx.moveTo(s0.sx, s0.sy);
for (var xi = 0; xi <= 7.5; xi += 0.05) {
var s = toScreen(xi, Math.sqrt(xi));
ctx.lineTo(s.sx, s.sy);
}
ctx.stroke();
ctx.fillStyle = '#4fc3f7';
ctx.font = 'bold 12px sans-serif';
ctx.fillText('y = √x', toScreen(5.5, 2.6).sx, toScreen(5.5, 2.6).sy);
// y=sqrt(x+2) - orange (shifted left by 2)
ctx.strokeStyle = '#ffb74d';
ctx.lineWidth = 2.5;
ctx.beginPath();
var sOr = toScreen(-2, 0);
ctx.moveTo(sOr.sx, sOr.sy);
for (var xi2 = -2; xi2 <= 7.5; xi2 += 0.05) {
if (xi2 + 2 < 0) continue;
var s2 = toScreen(xi2, Math.sqrt(xi2 + 2));
ctx.lineTo(s2.sx, s2.sy);
}
ctx.stroke();
ctx.fillStyle = '#ffb74d';
ctx.fillText('y = √(x+2)', toScreen(4.5, 3.1).sx, toScreen(4.5, 3.1).sy);
// y=sqrt(x)+1 - red (shifted up by 1)
ctx.strokeStyle = '#ef5350';
ctx.lineWidth = 2.5;
ctx.beginPath();
var sRe = toScreen(0, 1);
ctx.moveTo(sRe.sx, sRe.sy);
for (var xi3 = 0; xi3 <= 7.5; xi3 += 0.05) {
var s3 = toScreen(xi3, Math.sqrt(xi3) + 1);
ctx.lineTo(s3.sx, s3.sy);
}
ctx.stroke();
ctx.fillStyle = '#ef5350';
ctx.fillText('y = √x + 1', toScreen(5.0, 3.4).sx, toScreen(5.0, 3.4).sy);
// Start points
ctx.fillStyle = '#4fc3f7';
ctx.beginPath(); ctx.arc(toScreen(0,0).sx, toScreen(0,0).sy, 5, 0, Math.PI*2); ctx.fill();
ctx.fillStyle = '#ffb74d';
ctx.beginPath(); ctx.arc(toScreen(-2,0).sx, toScreen(-2,0).sy, 5, 0, Math.PI*2); ctx.fill();
ctx.fillStyle = '#ef5350';
ctx.beginPath(); ctx.arc(toScreen(0,1).sx, toScreen(0,1).sy, 5, 0, Math.PI*2); ctx.fill();
グラフ変換の関係
無理関数 を基準に——「元の形をどう動かしたか」を考えると、グラフが頭の中で描けます:
| 関数 | 変換 |
|---|---|
| 左に 平行移動( の場合)——「開始点が左にずれる」 | |
| 上に 平行移動( の場合)——「全体が上にずれる」 | |
| 縦方向の伸縮 | |
| 軸に関して折り返し——「上半分が下半分に鏡映し」 |
分数関数の一般形
これは を だけ平行移動した形です。
漸近線:、
「分子と分母の次数が同じ分数関数は、双曲線を平行移動したもの」——という基本の見方が大切です。
練習問題
- の漸近線を求めよ。
- のグラフは のグラフとどのような関係にあるか。
- の定義域と値域を求めよ。
解答
- 漸近線:、
- 軸または 軸に関して対称(または原点に関して対称)
- → (定義域)、(値域)
まとめ
| 関数 | 特徴 |
|---|---|
| 双曲線、漸近線は 軸・ 軸——「近づくが届かない線が2本」 | |
| 漸近線 、 の双曲線——「漸近線の交点が 」 | |
| 定義域 、 を通る——「2乗の逆関数」 | |
| 始点 からの無理関数——「平行移動で始点が変わる」 |
次回は関数のシリーズ最終回。これまで学んだ多項式・三角・指数・対数・分数・無理関数をまとめ、関数全体の見取り図を描きます。