#08 ふれてみよう高校数学 解析(微分・積分・極限)
増減表と極値
増減表とは
「この道はどこが一番高い?どこが一番低い?」——山道のような曲線でも、微分を使えば傾きがプラスかマイナスかを調べるだけで「山頂(極大)」と「谷底(極小)」を見つけられます。
微分の最も重要な応用の一つが、関数の増減(increasing/decreasing)と極値(extrema)の分析です。
ならば はその区間で増加、 ならば減少。 となる点が極値の候補です——「傾きがゼロ = 水平 = 山頂か谷底」。
例:
となる点:、——「傾きがゼロになる点が極値の候補」
| 区間 | の符号 | の変化 |
|---|---|---|
| 増加 | ||
| 極大 | ||
| 減少 | ||
| 極小 | ||
| 増加 |
「 で山頂(高さ 2)、 で谷底(高さ )」——これが増減表から読み取れることです。
デモ: と
(青)と (緑)を同時に表示。 の色付き領域(緑=正、赤=負)が の増減と対応しています。マウスで接点を動かすと詳細値が表示されます。
f(x)=x³−3x(青)と f'(x)=3x²−3(緑)。緑領域=増加、赤領域=減少。
function loop() {
ctx.clearRect(0, 0, W, H);
var scale=60;
var ox=W/2, oy=H/2;
function toSx(x){return ox+x*scale;}
function toSy(y){return oy-y*scale;}
function drawAxes(){
ctx.strokeStyle='rgba(255,255,255,0.13)';
ctx.lineWidth=1;
ctx.beginPath();ctx.moveTo(0,oy);ctx.lineTo(W,oy);ctx.stroke();
ctx.beginPath();ctx.moveTo(ox,0);ctx.lineTo(ox,H);ctx.stroke();
ctx.fillStyle='rgba(255,255,255,0.25)';
ctx.font='10px monospace';
ctx.textAlign='center';
for(var i=-4;i<=4;i++){
if(i===0)continue;
ctx.fillText(i,toSx(i),oy+14);
}
ctx.textAlign='right';
for(var j=-3;j<=3;j++){
if(j===0)continue;
ctx.fillText(j,ox-6,toSy(j)+4);
}
}
function plotCurve(fn,color,lw){
ctx.strokeStyle=color;ctx.lineWidth=lw||2;
ctx.beginPath();
var first=true;
for(var xi=-W/2;xi<=W/2;xi+=1){
var x=xi/scale;
var y=fn(x);
if(!isFinite(y)||Math.abs(y)>H/scale+0.5){first=true;continue;}
if(first){ctx.moveTo(toSx(x),toSy(y));first=false;}
else ctx.lineTo(toSx(x),toSy(y));
}
ctx.stroke();
}
var f=function(x){return x*x*x-3*x;};
var fd=function(x){return 3*x*x-3;};
ctx.fillStyle='#0d1117';
ctx.fillRect(0,0,W,H);
// Shade regions based on sign of f'
// Decreasing region: -1 < x < 1, shade below x-axis area
ctx.fillStyle='rgba(239,83,80,0.08)';
ctx.fillRect(toSx(-1),0,toSx(1)-toSx(-1),H);
ctx.fillStyle='rgba(129,199,132,0.06)';
ctx.fillRect(0,0,toSx(-1),H);
ctx.fillRect(toSx(1),0,W-toSx(1),H);
drawAxes();
// Mark x=-1 and x=1 with vertical lines
ctx.setLineDash([4,4]);
ctx.strokeStyle='rgba(255,255,255,0.2)';
ctx.lineWidth=1;
ctx.beginPath();ctx.moveTo(toSx(-1),0);ctx.lineTo(toSx(-1),H);ctx.stroke();
ctx.beginPath();ctx.moveTo(toSx(1),0);ctx.lineTo(toSx(1),H);ctx.stroke();
ctx.setLineDash([]);
plotCurve(f,'#4fc3f7',2.5);
plotCurve(fd,'#81c784',2);
// Extrema markers
// Local max at (-1, 2)
ctx.beginPath();ctx.arc(toSx(-1),toSy(2),7,0,Math.PI*2);
ctx.strokeStyle='#ffca28';ctx.lineWidth=2;ctx.stroke();
ctx.fillStyle='rgba(255,202,40,0.2)';ctx.fill();
// Local min at (1, -2)
ctx.beginPath();ctx.arc(toSx(1),toSy(-2),7,0,Math.PI*2);
ctx.strokeStyle='#ff7043';ctx.lineWidth=2;ctx.stroke();
ctx.fillStyle='rgba(255,112,67,0.2)';ctx.fill();
// Labels for extrema
ctx.fillStyle='#ffca28';ctx.font='12px monospace';ctx.textAlign='left';
ctx.fillText('極大 (-1, 2)',toSx(-1)+10,toSy(2)-10);
ctx.fillStyle='#ff7043';
ctx.fillText('極小 (1, -2)',toSx(1)+10,toSy(-2)+18);
// Mouse interaction
var x0=(mx-ox)/scale;
x0=Math.max(-3.5,Math.min(3.5,x0));
var y0=f(x0);
var slope=fd(x0);
if(Math.abs(y0)<=H/scale){
// Tangent
var ext=1.2;
ctx.strokeStyle='rgba(255,255,255,0.5)';
ctx.lineWidth=1;
ctx.setLineDash([4,4]);
ctx.beginPath();
ctx.moveTo(toSx(x0-ext),toSy(y0+slope*(-ext)));
ctx.lineTo(toSx(x0+ext),toSy(y0+slope*ext));
ctx.stroke();
ctx.setLineDash([]);
ctx.beginPath();ctx.arc(toSx(x0),toSy(y0),5,0,Math.PI*2);
ctx.fillStyle='#fff';ctx.fill();
// Sign indicator
var signColor=slope>0?'#81c784':(slope<0?'#ef5350':'#ffca28');
var signText=slope>0?'f'> 0: 増加↗':(slope<0?'f'< 0: 減少↘':'f'= 0: 極値');
ctx.fillStyle='rgba(0,0,0,0.65)';
ctx.fillRect(8,8,230,72);
ctx.font='13px monospace';ctx.textAlign='left';
ctx.fillStyle='#4fc3f7';
ctx.fillText('x = '+x0.toFixed(3),14,28);
ctx.fillText('f(x) = '+y0.toFixed(3),14,46);
ctx.fillStyle=signColor;
ctx.fillText(signText,14,64);
}
// Legend
ctx.font='12px sans-serif';ctx.textAlign='right';
ctx.fillStyle='#4fc3f7';ctx.fillText('── f(x)=x³−3x',W-10,H-28);
ctx.fillStyle='#81c784';ctx.fillText("── f'(x)=3x²−3",W-10,H-10);
requestAnimationFrame(loop);
}
loop(); 2 階導関数と凹凸
「坂道の傾き方が急になっているのか、緩やかになっているのか」—— の符号でグラフの凹凸を判定できます。下に開いたお椀か、上に開いたお椀かの違いです:
| 区間 | 凹凸 | |
|---|---|---|
| 上に凸()——「お椀が上向き」 | ||
| 変曲点——「曲がり方が切り替わる場所」 | ||
| 下に凸()——「お椀が下向き」 |
変曲点 で 。この点でグラフの「曲がり方」が反転します。
2 階微分テスト(Second Derivative Test)
「増減表を使わずに極大・極小を判定する簡単な方法」——極値の候補 ()に対して:
- ならば 極小——「下に凸 = 谷底」
- ならば 極大——「上に凸 = 山頂」
- ならば判定不能(増減表に戻る)
今回の例: → 極大、 → 極小 ✓
増減表の書き方
「横一行に増減の情報を整理する」——数学の問題で頻出の表現方法です:
まとめ
- を解く → 極値の候補——「まず傾きがゼロになる点を探す」
- 各区間で の符号を調べる——「プラスかマイナスかを確認する」
- 符号が : 極大、 : 極小——「上り坂から下り坂 = 山頂、下り坂から上り坂 = 谷底」
- の符号で凹凸、 で変曲点——「2 階微分で曲がり方を判定」
次回は最大値・最小値の求め方——閉区間上での最適化と実際の応用問題を扱います。