#08 ふれてみよう高校数学 関数

三角関数の合成

三角関数の合成とは

音楽のスピーカーから複数の楽器の音が同時に鳴るとき、空気の振動はすべての音が「足し合わさった」波になっています。「sin⁡\sin の波」と「cos⁡\cos の波」が混ざり合うとき、それは一つの「ずれたsin波」として表せます——これが三角関数の合成(または波の合成)です。

asin⁡θ+bcos⁡θa\sin\theta + b\cos\theta のような「sin⁡\sin と cos⁡\cos の和」は、1つの sin⁡\sin 関数にまとめることができます。

asin⁡θ+bcos⁡θ=Rsin⁡(θ+φ)\boxed{a\sin\theta + b\cos\theta = R\sin(\theta + \varphi)}

ここで

R=a2+b2,tan⁡φ=baR = \sqrt{a^2 + b^2}, \qquad \tan\varphi = \frac{b}{a}

(a>0a > 0 のとき φ∈(−π2,π2)\varphi \in \left(-\dfrac{\pi}{2}, \dfrac{\pi}{2}\right))

「振幅 RR と位相ずれ φ\varphi の一つのsin波になる」——2つの違う波が、一つの「きれいな波」にまとまります。


合成の導出

「なぜこんな形になるの?」——加法定理を逆に使うだけです。

加法定理の展開:

Rsin⁡(θ+φ)=Rcos⁡φsin⁡θ+Rsin⁡φcos⁡θR\sin(\theta + \varphi) = R\cos\varphi\sin\theta + R\sin\varphi\cos\theta

これを asin⁡θ+bcos⁡θa\sin\theta + b\cos\theta と比較すると、sin⁡θ\sin\theta の係数同士、cos⁡θ\cos\theta の係数同士を対応させます:

Rcos⁡φ=a,Rsin⁡φ=bR\cos\varphi = a, \quad R\sin\varphi = b

両辺を2乗して加えると R2(cos⁡2φ+sin⁡2φ)=a2+b2R^2(\cos^2\varphi + \sin^2\varphi) = a^2 + b^2——sin⁡2+cos⁡2=1\sin^2 + \cos^2 = 1 を使うと:

R=a2+b2R = \sqrt{a^2 + b^2}

tan⁡φ=Rsin⁡φRcos⁡φ=ba\tan\varphi = \dfrac{R\sin\varphi}{R\cos\varphi} = \dfrac{b}{a}

「直角三角形の斜辺が RR、横が aa、縦が bb」——まるでピタゴラスの定理そのままです。


インタラクティブデモ:2つの波の合成

マウスを左右に動かすと a:ba : b の比率が変わります。 薄い青が asin⁡θa\sin\theta、薄い緑が bcos⁡θb\cos\theta、明るい黄色が合成波 Rsin⁡(θ+φ)R\sin(\theta+\varphi) です。黄色の波の振幅(点線で表示)が R=a2+b2R = \sqrt{a^2 + b^2} に等しくなっていることを確認してください。

マウスを左右に動かすと a:b の比が変わります
function loop() {
ctx.clearRect(0, 0, W, H);

var ox = W / 2, oy = H / 2 + 10;
var scaleX = 50, scaleY = 65;
var ratio = mx / W;
var a = 2 * Math.cos(ratio * Math.PI);
var b = 2 * Math.sin(ratio * Math.PI);
var R = Math.sqrt(a * a + b * b);
var phi = Math.atan2(b, a);

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 gi = -4; gi <= 4; gi++) {
  var gs = toScreen(gi * Math.PI, 0);
  ctx.beginPath(); ctx.moveTo(gs.sx, 0); ctx.lineTo(gs.sx, H); ctx.stroke();
}
for (var gy2 = -2; gy2 <= 2; gy2++) {
  var gs2 = toScreen(0, gy2);
  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();

// Pi labels
ctx.fillStyle = 'rgba(255,255,255,0.4)';
ctx.font = '12px sans-serif';
var plbls = [[-2,'-2π'],[-1,'-π'],[1,'π'],[2,'2π']];
for (var li = 0; li < plbls.length; li++) {
  var ls = toScreen(plbls[li][0] * Math.PI, 0);
  ctx.fillText(plbls[li][1], ls.sx - 8, oy + 16);
}

var range = W / (2 * scaleX);

// a*sin(x) - dim blue
ctx.strokeStyle = 'rgba(79,195,247,0.4)';
ctx.lineWidth = 1.5;
ctx.beginPath();
for (var xi = -range; xi <= range; xi += 0.03) {
  var s = toScreen(xi, a * Math.sin(xi));
  if (xi === -range) ctx.moveTo(s.sx, s.sy); else ctx.lineTo(s.sx, s.sy);
}
ctx.stroke();

// b*cos(x) - dim green
ctx.strokeStyle = 'rgba(102,187,106,0.4)';
ctx.lineWidth = 1.5;
ctx.beginPath();
for (var xi3 = -range; xi3 <= range; xi3 += 0.03) {
  var s3 = toScreen(xi3, b * Math.cos(xi3));
  if (xi3 === -range) ctx.moveTo(s3.sx, s3.sy); else ctx.lineTo(s3.sx, s3.sy);
}
ctx.stroke();

// Combined R*sin(x+phi) - bright yellow
ctx.strokeStyle = '#ffeb3b';
ctx.lineWidth = 3;
ctx.beginPath();
for (var xi4 = -range; xi4 <= range; xi4 += 0.03) {
  var s4 = toScreen(xi4, R * Math.sin(xi4 + phi));
  if (xi4 === -range) ctx.moveTo(s4.sx, s4.sy); else ctx.lineTo(s4.sx, s4.sy);
}
ctx.stroke();

// Amplitude R dotted lines
ctx.strokeStyle = 'rgba(255,235,59,0.25)';
ctx.lineWidth = 1;
ctx.setLineDash([4,4]);
ctx.beginPath(); ctx.moveTo(0, toScreen(0,R).sy); ctx.lineTo(W, toScreen(0,R).sy); ctx.stroke();
ctx.beginPath(); ctx.moveTo(0, toScreen(0,-R).sy); ctx.lineTo(W, toScreen(0,-R).sy); ctx.stroke();
ctx.setLineDash([]);
ctx.fillStyle = 'rgba(255,235,59,0.6)';
ctx.font = '12px sans-serif';
ctx.fillText('R=' + R.toFixed(2), ox + 4, toScreen(0,R).sy - 4);

// Info panel
ctx.fillStyle = 'rgba(0,0,0,0.65)';
ctx.beginPath(); ctx.roundRect(10, 10, 270, 95, 8); ctx.fill();
ctx.fillStyle = '#4fc3f7';
ctx.font = '12px monospace';
ctx.fillText('a·sinθ: a = ' + a.toFixed(2), 18, 32);
ctx.fillStyle = '#66bb6a';
ctx.fillText('b·cosθ: b = ' + b.toFixed(2), 18, 50);
ctx.fillStyle = '#ffeb3b';
ctx.font = 'bold 13px monospace';
ctx.fillText('R = √(a²+b²) = ' + R.toFixed(3), 18, 70);
var phiDeg = (phi * 180 / Math.PI).toFixed(1);
ctx.fillStyle = 'rgba(255,255,255,0.7)';
ctx.font = '12px monospace';
ctx.fillText('φ = ' + phiDeg + '°, R·sin(θ+φ)', 18, 90);

// Legend
ctx.fillStyle = 'rgba(0,0,0,0.5)';
ctx.beginPath(); ctx.roundRect(W - 195, H - 60, 183, 48, 6); ctx.fill();
ctx.fillStyle = '#4fc3f7'; ctx.font = '12px sans-serif';
ctx.fillText('— a·sinθ', W - 185, H - 40);
ctx.fillStyle = '#66bb6a';
ctx.fillText('— b·cosθ', W - 185, H - 24);
ctx.fillStyle = '#ffeb3b';
ctx.fillText('— R·sin(θ+φ)  [合成波]', W - 185, H - 8);

requestAnimationFrame(loop);
}
loop();

手順のまとめ

3sin⁡θ+4cos⁡θ3\sin\theta + 4\cos\theta を合成する

「横3、縦4の直角三角形の斜辺を計算する」——ピタゴラスの定理で RR が出てきます。

手順① RR を計算:R=32+42=9+16=5R = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = 5

手順② φ\varphi を計算:tan⁡φ=43\tan\varphi = \dfrac{4}{3} → φ=arctan⁡43≈53.1°\varphi = \arctan\dfrac{4}{3} \approx 53.1°

手順③ 合成:3sin⁡θ+4cos⁡θ=5sin⁡(θ+φ)3\sin\theta + 4\cos\theta = 5\sin(\theta + \varphi)

「3と4から5が出てくる」——有名な「3-4-5の直角三角形」と同じです。


合成の応用:最大・最小

合成形 Rsin⁡(θ+φ)R\sin(\theta + \varphi) の形にすると、最大値・最小値が一目でわかります。sinの値域は −1≤sin⁡(⋅)≤1-1 \leq \sin(\cdot) \leq 1 なので:

−R≤Rsin⁡(θ+φ)≤R-R \leq R\sin(\theta + \varphi) \leq R

なので asin⁡θ+bcos⁡θa\sin\theta + b\cos\theta の:

  • 最大値:R=a2+b2R = \sqrt{a^2 + b^2}
  • 最小値:−R=−a2+b2-R = -\sqrt{a^2 + b^2}

「どんなにsinとcosが混ざっていても、最大値はかならず a2+b2\sqrt{a^2+b^2}」——これが合成の最大の便利さです。

例

2sin⁡θ−3cos⁡θ2\sin\theta - 3\cos\theta の最大値・最小値を求めよ。

R=4+9=13R = \sqrt{4 + 9} = \sqrt{13}

最大値 13\sqrt{13}、最小値 −13-\sqrt{13}。


練習問題

  1. sin⁡θ+cos⁡θ\sin\theta + \cos\theta を Rsin⁡(θ+φ)R\sin(\theta + \varphi) の形に合成せよ。
  2. 3sin⁡θ−cos⁡θ\sqrt{3}\sin\theta - \cos\theta の最大値と、そのときの θ\theta(0≤θ<2π0 \leq \theta < 2\pi)を求めよ。
  3. sin⁡θ+3cos⁡θ=1\sin\theta + \sqrt{3}\cos\theta = 1 を解け(0≤θ<2π0 \leq \theta < 2\pi)。

解答

  1. R=2R = \sqrt{2}、tan⁡φ=1\tan\varphi = 1 → φ=π4\varphi = \dfrac{\pi}{4}。合成:2sin⁡ ⁣(θ+π4)\sqrt{2}\sin\!\left(\theta + \dfrac{\pi}{4}\right)
  2. R=2R = 2、φ=−π6\varphi = -\dfrac{\pi}{6}。最大値 22(θ+φ=π2\theta + \varphi = \dfrac{\pi}{2} → θ=2π3\theta = \dfrac{2\pi}{3})
  3. 2sin⁡ ⁣(θ+π3)=12\sin\!\left(\theta + \dfrac{\pi}{3}\right) = 1 → sin⁡ ⁣(θ+π3)=12\sin\!\left(\theta + \dfrac{\pi}{3}\right) = \dfrac{1}{2} → θ=0,2π3\theta = 0, \dfrac{2\pi}{3}

まとめ

asin⁡θ+bcos⁡θ=a2+b2 sin⁡(θ+φ)wheretan⁡φ=baa\sin\theta + b\cos\theta = \sqrt{a^2+b^2}\,\sin(\theta + \varphi) \quad \text{where} \quad \tan\varphi = \frac{b}{a}
  • R=a2+b2R = \sqrt{a^2 + b^2} は合成波の振幅——「ピタゴラスの定理で計算する」
  • 最大値 RR、最小値 −R-R——「合成すれば一目でわかる」
  • 合成すると最大・最小や方程式の解が求めやすくなる

次回は指数関数を学びます。「2x2^x」という式が表す爆発的な増加と、自然界の成長・減衰を記述する不思議な数 ee の話です。