#06 ふれてみよう高校数学 解析(微分・積分・極限)
三角関数の微分
三角関数の微分公式
「波がもっとも急に上昇しているのはどこか」—— のグラフで一番急に上がっている部分は の付近で、そこでの傾きは 。これが「 の微分が 」という事実の直感的な意味です。
の微分の証明
「定義に戻って、加法定理と極限の組み合わせで証明する」——差分商の定義から出発します:
加法定理 を使うと——「 を展開して整理する」:
ここで二つの重要な極限——「 が小さいとき 、」という近似が背景にあります:
を使うと:
デモ: の接線傾きが に等しい
マウスを左右に動かすと、 上の接点が移動します。接線の傾き(数値)が の値と一致することをリアルタイムで確認できます。
y=sin x(青)の接線傾き = cos x(緑)の値。マウスで接点を移動。
function loop() {
ctx.clearRect(0, 0, W, H);
var scale=55;
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.12)';
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();
// π markers
ctx.fillStyle='rgba(255,255,255,0.25)';
ctx.font='10px monospace';
ctx.textAlign='center';
var piVals=[-2,-1,0,1,2];
var piLabels=['-2π','-π','0','π','2π'];
for(var i=0;i<piVals.length;i++){
var xp=piVals[i]*Math.PI;
ctx.fillText(piLabels[i],toSx(xp),oy+15);
}
ctx.textAlign='right';
ctx.fillText('1',ox-6,toSy(1)+4);
ctx.fillText('-1',ox-6,toSy(-1)+4);
}
function plotCurve(fn,color,lw,dash){
ctx.strokeStyle=color;ctx.lineWidth=lw||2;
if(dash)ctx.setLineDash(dash);else ctx.setLineDash([]);
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)>3){first=true;continue;}
if(first){ctx.moveTo(toSx(x),toSy(y));first=false;}
else ctx.lineTo(toSx(x),toSy(y));
}
ctx.stroke();
ctx.setLineDash([]);
}
ctx.fillStyle='#0d1117';
ctx.fillRect(0,0,W,H);
drawAxes();
plotCurve(function(x){return Math.sin(x);},'#4fc3f7',2.5);
plotCurve(function(x){return Math.cos(x);},'#81c784',2);
// Mouse x position
var x0=(mx-ox)/scale;
x0=Math.max(-5,Math.min(5,x0));
var y0=Math.sin(x0);
var slope=Math.cos(x0); // f'(x) = cos(x)
// Tangent line
var ext=2;
ctx.strokeStyle='rgba(255,202,40,0.9)';
ctx.lineWidth=1.5;
ctx.beginPath();
ctx.moveTo(toSx(x0-ext),toSy(y0+slope*(-ext)));
ctx.lineTo(toSx(x0+ext),toSy(y0+slope*ext));
ctx.stroke();
// Dashed vertical from sin point to x-axis
ctx.setLineDash([3,3]);
ctx.strokeStyle='rgba(79,195,247,0.3)';
ctx.lineWidth=1;
ctx.beginPath();ctx.moveTo(toSx(x0),toSy(y0));ctx.lineTo(toSx(x0),oy);ctx.stroke();
// Dashed horizontal from cos value to y-axis
var cosVal=Math.cos(x0);
ctx.strokeStyle='rgba(129,199,132,0.3)';
ctx.beginPath();ctx.moveTo(toSx(x0),toSy(cosVal));ctx.lineTo(ox,toSy(cosVal));ctx.stroke();
ctx.setLineDash([]);
// Dot on sin
ctx.beginPath();ctx.arc(toSx(x0),toSy(y0),6,0,Math.PI*2);
ctx.fillStyle='#ffca28';ctx.fill();
// Dot on cos at same x
ctx.beginPath();ctx.arc(toSx(x0),toSy(cosVal),5,0,Math.PI*2);
ctx.fillStyle='#a5d6a7';ctx.fill();
// Indicator on y-axis for slope value
ctx.beginPath();ctx.arc(ox,toSy(slope),4,0,Math.PI*2);
ctx.fillStyle='#ffca28';ctx.fill();
// Info box
ctx.fillStyle='rgba(0,0,0,0.65)';
ctx.fillRect(8,8,250,80);
ctx.font='13px monospace';ctx.textAlign='left';
ctx.fillStyle='#4fc3f7';
ctx.fillText('x = '+x0.toFixed(3),14,28);
ctx.fillText('sin x = '+y0.toFixed(3),14,46);
ctx.fillStyle='#81c784';
ctx.fillText('cos x = '+cosVal.toFixed(3),14,64);
ctx.fillStyle='#ffca28';
ctx.fillText('接線傾き = '+slope.toFixed(3),14,82);
// Legend
ctx.font='12px sans-serif';ctx.textAlign='right';
ctx.fillStyle='#4fc3f7';ctx.fillText('── sin x',W-10,H-28);
ctx.fillStyle='#81c784';ctx.fillText('── cos x',W-10,H-10);
requestAnimationFrame(loop);
}
loop(); と の微分
の微分
「 の微分が なら、 の微分は?」—— を利用するか、加法定理から直接導けます:
よって と 4 周期で回ります——「4 回微分すると元に戻る」という美しい循環構造です。
の微分
「 なので商の微分法則を使う」—— を使ってシンプルにまとめます:
連鎖律と組み合わせる
「三角関数の中に複雑な式があっても、連鎖律で対応できる」:
重要な極限:
「 が小さくなるにつれて、 と がほぼ同じ値になる」——これが三角関数の微分の基礎となります。単位円(半径 )の扇形と三角形の面積を比較すると:
各辺を で割り、はさみうちの原理を適用すると が得られます——「三角形の面積と扇形の面積の比が 1 に近づく」という幾何的な直感と一致します。
まとめ
- と は互いに「1 ステップ違い」の微分関係——「 を微分すると に、 を微分すると になる」
- 連鎖律と組み合わせることで複雑な三角関数も微分可能——「外と内の微分を順番に」
- が三角関数の微分を支える基礎
次回は指数関数・対数関数の微分—— の「自分自身が微分になる」という驚くべき性質を探ります。