三角関数の最大最小問題の中には、$\sin\theta$ と $\cos\theta$ が複雑に混ざり合い、合成だけでは解けないものがあります。
そんなとき、$\sin\theta + \cos\theta = t$ という置換を使えば、問題は見慣れた2次関数の最大最小に帰着します。
「なぜこの置換がうまくいくのか」を理解すれば、丸暗記なしで自在に使いこなせるようになります。
三角関数の最大最小問題には、大きく分けて2つのタイプがあります。
1つ目は、$y = a\sin\theta + b\cos\theta$ のように $\sin\theta$ と $\cos\theta$ の1次式の場合です。これは三角関数の合成を使えば $y = \sqrt{a^2 + b^2}\sin(\theta + \alpha)$ の形にまとまり、$-1 \leq \sin(\theta + \alpha) \leq 1$ から最大最小がすぐに求まります。
しかし、次のような問題はどうでしょう。
$$y = \sin 2\theta + 2(\sin\theta + \cos\theta) - 1$$
この式には $\sin 2\theta$(2倍角)と $\sin\theta + \cos\theta$(1倍角)が混在しています。角の大きさが異なるため、そのままでは合成できません。
三角関数の合成 $a\sin\alpha + b\cos\alpha = \sqrt{a^2+b^2}\sin(\alpha+\varphi)$ が使えるのは、$\sin$ と $\cos$ の角が同じときだけです。
$\sin\theta$ と $\sin 2\theta$ のように角が異なる三角関数が混ざっている場合は、別のアプローチが必要になります。それが置換です。
置換とは、複雑な式の中に共通する部分を見つけ出し、それを1つの文字(例えば $t$)でおき換えることで、式を単純にする手法です。
三角関数の最大最小問題では、$\sin\theta + \cos\theta = t$ とおくと、$\sin\theta\cos\theta$ も $t$ で表せるため、元の問題が$t$ の2次関数の最大最小問題に帰着します。
「三角関数の問題が、なぜ2次関数の問題になるのか?」── その仕組みを次のセクションで明らかにしましょう。
$\sin\theta$ と $\cos\theta$ の2つの変数を含む式を扱うとき、「基本対称式」の考え方が鍵になります。
高校数学では、2つの変数 $x, y$ に対して、$x + y$(和)と $xy$(積)を基本対称式と呼びます。そして、$x, y$ の対称式はすべて $x + y$ と $xy$ で表せるのでした。
同じ考え方が $\sin\theta$ と $\cos\theta$ にも使えます。
ここが決定的に重要なポイントです。和を $t = \sin\theta + \cos\theta$ とおくと、積 $\sin\theta\cos\theta$ は $t$ だけで表せます。
$t = \sin\theta + \cos\theta$ の両辺を2乗してみましょう。
$$t^2 = (\sin\theta + \cos\theta)^2$$
$$= \sin^2\theta + 2\sin\theta\cos\theta + \cos^2\theta$$
$\sin^2\theta + \cos^2\theta = 1$ を使うと、
$$t^2 = 1 + 2\sin\theta\cos\theta$$
$$\therefore \quad \sin\theta\cos\theta = \frac{t^2 - 1}{2}$$
$t = \sin\theta + \cos\theta$ とおくと、
$$\sin\theta\cos\theta = \frac{t^2 - 1}{2}$$
$$\sin 2\theta = 2\sin\theta\cos\theta = t^2 - 1$$
この2つの式により、$\sin\theta\cos\theta$ や $\sin 2\theta$ を含む式を $t$ の式に変換できます。
$\sin\theta$ と $\cos\theta$ の対称式($\sin\theta$ と $\cos\theta$ を入れ替えても変わらない式)は、基本対称式である「和」$\sin\theta + \cos\theta$ と「積」$\sin\theta\cos\theta$ で表せます。
そして、「積」は「和」の2乗で表せる($\sin\theta\cos\theta = \frac{t^2-1}{2}$)ので、結局すべてが $t$ の式になるのです。
これは数学I で学んだ「2数の対称式は基本対称式で表せる」という定理の、三角関数への応用にほかなりません。
置換をしたら、新しい変数 $t$ のとりうる値の範囲を必ず調べなければなりません。これを怠ると、正しい最大最小が得られません。
$t = \sin\theta + \cos\theta$ は三角関数の合成を使って、
$$t = \sqrt{2}\sin\left(\theta + \frac{\pi}{4}\right)$$
と変形できます。$-1 \leq \sin\left(\theta + \frac{\pi}{4}\right) \leq 1$ ですから、$\theta$ に制限がないとき、
$$-\sqrt{2} \leq t \leq \sqrt{2}$$
$\theta$ の範囲が制限されているときは、$\theta + \frac{\pi}{4}$ の範囲を求めてから $t$ の範囲を決定します。
置換型の最大最小問題で最も多いミスは、$t$ の範囲を求めずに2次関数の最大最小を答えてしまうことです。
✗ 誤:$y = t^2 + 2t - 2$ だから、$t$ は任意の実数として頂点の値が最小値
○ 正:$-\sqrt{2} \leq t \leq \sqrt{2}$ の範囲で2次関数の最大最小を調べる
$t$ は $\sin\theta + \cos\theta$ から来ているので、$t$ が自由にどんな値でも取れるわけではありません。
大学の代数学では、「$n$ 変数の対称式は基本対称式の多項式として表せる」という対称式の基本定理(ニュートンの定理)を学びます。
2変数の場合、$x + y = s$, $xy = p$ とおくと、$x^2 + y^2 = s^2 - 2p$、$x^3 + y^3 = s^3 - 3sp$ のように、任意の対称式が $s$ と $p$ で表せます。三角関数の置換は、この定理を $\sin\theta, \cos\theta$ に適用したものです。
次の問題を通じて、置換型の解法手順を身につけましょう。
問題:$0 \leq \theta < 2\pi$ のとき、関数 $y = \sin 2\theta + 2(\sin\theta + \cos\theta) - 1$ の最大値と最小値を求めよ。
$t = \sin\theta + \cos\theta$ とおきます。すると、
$$\sin 2\theta = t^2 - 1$$
なので、
$$y = (t^2 - 1) + 2t - 1 = t^2 + 2t - 2$$
$t = \sqrt{2}\sin\left(\theta + \frac{\pi}{4}\right)$ であり、$0 \leq \theta < 2\pi$ のとき $\frac{\pi}{4} \leq \theta + \frac{\pi}{4} < \frac{9\pi}{4}$ です。
$\sin$ は $\left[\frac{\pi}{4}, \frac{9\pi}{4}\right)$ の範囲ですべての値 $[-1, 1]$ をとるので、
$$-\sqrt{2} \leq t \leq \sqrt{2}$$
$y = t^2 + 2t - 2 = (t + 1)^2 - 3$ は下に凸の放物線です。
軸は $t = -1$ で、$-\sqrt{2} \leq t \leq \sqrt{2}$ の範囲に含まれます。
最後に、$\theta$ の値を求めます。$t = -1$ のとき $\sqrt{2}\sin\left(\theta + \frac{\pi}{4}\right) = -1$ より $\sin\left(\theta + \frac{\pi}{4}\right) = -\frac{\sqrt{2}}{2}$。$0 \leq \theta < 2\pi$ の範囲で $\theta = \pi$ です。
$t = \sqrt{2}$ のとき $\sin\left(\theta + \frac{\pi}{4}\right) = 1$ より $\theta + \frac{\pi}{4} = \frac{\pi}{2}$、すなわち $\theta = \frac{\pi}{4}$ です。
Step 1:$t = \sin\theta + \cos\theta$ とおき、$\sin 2\theta = t^2 - 1$ を使って $y$ を $t$ の式に変換する
Step 2:$t = \sqrt{2}\sin(\theta + \frac{\pi}{4})$ を合成し、$\theta$ の範囲から $t$ の範囲を求める
Step 3:求めた $t$ の範囲で、$t$ の2次関数の最大最小を求める
最後に $t$ の値から $\theta$ の値を逆算することを忘れずに。
ステップ3で、2次関数の最大最小を求める際に定義域の端点と軸の位置の関係を確認しましょう。
軸が定義域の外にある場合は、端点でのみ最大最小が決まります。軸が定義域の中にある場合は、頂点の値と端点の値を比較する必要があります。
数学I の「2次関数の定義域つき最大最小」の知識がここで生きます。
$t$ の値から $\theta$ を求めるとき、$\theta$ の範囲内に解が複数ある場合があります。すべての解を漏れなく求めましょう。
例えば $t = -1$ のとき $\sin\left(\theta + \frac{\pi}{4}\right) = -\frac{\sqrt{2}}{2}$ を解くと、$\theta = \pi$ と $\theta = \frac{3\pi}{2} - \frac{\pi}{4} = \frac{5\pi}{4}$ の2つが見つかりますが、$\theta = \frac{5\pi}{4}$ では $\sin\theta + \cos\theta = -\frac{\sqrt{2}}{2} - \frac{\sqrt{2}}{2} = -\sqrt{2} \neq -1$ なので不適です。実際に $t$ の値を代入して確認しましょう。
三角関数の最大最小で置換が有効なパターンは、大きく3つに分類できます。問題を見たとき、どのパターンに該当するかを判断することが解法の第一歩です。
| パターン | 式の特徴 | 置換の方法 |
|---|---|---|
| 1. $\sin\theta + \cos\theta$ 型 | $\sin\theta\cos\theta$ や $\sin 2\theta$ と $\sin\theta + \cos\theta$ が混在 | $t = \sin\theta + \cos\theta$ とおく |
| 2. $\sin\theta - \cos\theta$ 型 | $\sin\theta\cos\theta$ と $\sin\theta - \cos\theta$ が混在 | $t = \sin\theta - \cos\theta$ とおく |
| 3. 1つの三角関数への統一型 | $\sin\theta$ のみ、または $\cos\theta$ のみに統一可能 | $t = \sin\theta$ または $t = \cos\theta$ とおく |
前のセクションで詳しく見た通りです。式に $\sin\theta + \cos\theta$ と $\sin\theta\cos\theta$(または $\sin 2\theta$)が含まれている場合に使います。
$\sin\theta, \cos\theta$ の対称式($\sin\theta$ と $\cos\theta$ を入れ替えても変わらない式)が典型です。
$t = \sin\theta - \cos\theta$ とおくと、全く同様の計算により、
$$t^2 = \sin^2\theta - 2\sin\theta\cos\theta + \cos^2\theta = 1 - 2\sin\theta\cos\theta$$
$$\therefore \quad \sin\theta\cos\theta = \frac{1 - t^2}{2}$$
また、$t = \sqrt{2}\sin\left(\theta - \frac{\pi}{4}\right)$ なので、$t$ の範囲は $-\sqrt{2} \leq t \leq \sqrt{2}$ です($\theta$ に制限がない場合)。
式に $\sin\theta - \cos\theta$ と $\sin\theta\cos\theta$ が含まれている場合や、$\sin\theta$ と $\cos\theta$ を入れ替えると符号が変わる交代式の場合に使います。
$t = \sin\theta - \cos\theta$ とおくと、
$$\sin\theta\cos\theta = \frac{1 - t^2}{2}$$
$$\sin 2\theta = 2\sin\theta\cos\theta = 1 - t^2$$
$\sin\theta + \cos\theta$ の場合と符号が異なることに注意。$t^2 - 1$ ではなく $1 - t^2$ です。
$y = 2\cos^2\theta + \cos\theta - 1$ のように、$\cos\theta$ だけで書ける式の場合は $t = \cos\theta$($-1 \leq t \leq 1$)とおけば、$t$ の2次関数になります。
同様に、$y = -3\sin^2\theta - 3\sin\theta + 2$ なら $\sin^2\theta + \cos^2\theta = 1$ を使って $\cos^2\theta$ を消去し、$t = \sin\theta$ とおきます。
2倍角の公式 $\cos 2\theta = 1 - 2\sin^2\theta = 2\cos^2\theta - 1$ を使って角を統一する場合もこのパターンに含まれます。
問題を見たら、次の手順で判断しましょう。
(1) まず、式の中の三角関数の「角」を確認する。$\theta$ と $2\theta$ が混在していれば、2倍角の公式で $\theta$ に統一する。
(2) 統一後、$\sin\theta$ のみ(or $\cos\theta$ のみ)で書けるなら → パターン3
(3) $\sin\theta + \cos\theta$ と $\sin\theta\cos\theta$ が見えるなら → パターン1
(4) $\sin\theta - \cos\theta$ と $\sin\theta\cos\theta$ が見えるなら → パターン2
$t = \sin\theta + \cos\theta$ のとき $\sin\theta\cos\theta = \frac{t^2 - 1}{2}$ ですが、$t = \sin\theta - \cos\theta$ のとき $\sin\theta\cos\theta = \frac{1 - t^2}{2}$ です。
✗ 誤:$t = \sin\theta - \cos\theta$ のとき $\sin\theta\cos\theta = \frac{t^2 - 1}{2}$
○ 正:$t = \sin\theta - \cos\theta$ のとき $\sin\theta\cos\theta = \frac{1 - t^2}{2}$
「$+$ 型なら $t^2 - 1$」「$-$ 型なら $1 - t^2$」と符号が逆になります。2乗の展開式に含まれる $2\sin\theta\cos\theta$ の符号が $+$ か $-$ かで決まるのです。
置換の計算で繰り返し使う $\sin^2\theta + \cos^2\theta = 1$ は、単位円 $x^2 + y^2 = 1$ 上の点の座標が $(\cos\theta, \sin\theta)$ であることから来ています。これはピタゴラスの定理の三角関数版です。
大学数学では、この関係式は「$\sin\theta$ と $\cos\theta$ が独立ではなく、1つのパラメータ $\theta$ で決まる」ことを意味します。だからこそ、和(または差)さえわかれば積も決まるのです。
$\sin\theta + \cos\theta = t$ の置換とは異なるアプローチとして、$\sin^2\theta$、$\sin\theta\cos\theta$、$\cos^2\theta$ の組み合わせで書かれた式(2次同次式)の最大最小問題があります。
例えば次のような問題です。
$$y = \sqrt{3}\sin\theta\cos\theta + \cos^2\theta$$
この式は $\sin\theta$ と $\cos\theta$ の「2次の項」だけで構成されています。このような式には、倍角の公式と半角の公式を使って次数を下げ、$2\theta$ の三角関数に統一する手法が有効です。
次の3つの公式を使います(いずれも2倍角・半角の公式から導けます)。
$$\sin^2\theta = \frac{1 - \cos 2\theta}{2}$$
$$\cos^2\theta = \frac{1 + \cos 2\theta}{2}$$
$$\sin\theta\cos\theta = \frac{\sin 2\theta}{2}$$
これらを使うと、$\sin\theta, \cos\theta$ の2次式は $\sin 2\theta, \cos 2\theta$ の1次式に変換できます。
$0 \leq \theta \leq \frac{\pi}{3}$ のとき、$y = \sqrt{3}\sin\theta\cos\theta + \cos^2\theta$ の最大最小を求めてみましょう。
次数を下げる公式を適用します。
$$y = \sqrt{3} \cdot \frac{\sin 2\theta}{2} + \frac{1 + \cos 2\theta}{2}$$
$$= \frac{\sqrt{3}}{2}\sin 2\theta + \frac{1}{2}\cos 2\theta + \frac{1}{2}$$
$\sin 2\theta$ と $\cos 2\theta$ の角が同じ $2\theta$ なので、三角関数の合成が使えます。
$$= \sin\left(2\theta + \frac{\pi}{6}\right) + \frac{1}{2}$$
$0 \leq \theta \leq \frac{\pi}{3}$ より $\frac{\pi}{6} \leq 2\theta + \frac{\pi}{6} \leq \frac{5\pi}{6}$ です。この範囲で $\sin$ の最大値は $1$($2\theta + \frac{\pi}{6} = \frac{\pi}{2}$ のとき、$\theta = \frac{\pi}{6}$)、最小値は $\frac{1}{2}$($2\theta + \frac{\pi}{6} = \frac{5\pi}{6}$ のとき、$\theta = \frac{\pi}{3}$)です。
よって、$\theta = \frac{\pi}{6}$ のとき最大値 $\frac{3}{2}$、$\theta = \frac{\pi}{3}$ のとき最小値 $1$ です。
$\sin\theta, \cos\theta$ の2次の同次式(すべての項の次数が2の式)は、倍角・半角の公式により必ず $\sin 2\theta$ と $\cos 2\theta$ の1次式に変換できます。
1次式になれば合成が使えるので、この型の問題は「次数を下げる → 合成 → 最大最小」という一直線の流れで解けます。
| タイプ | 式の特徴 | 解法 |
|---|---|---|
| $t$ 置換型 | $\sin\theta + \cos\theta$ と $\sin\theta\cos\theta$ が混在(1次と2次が混ざる) | $t = \sin\theta + \cos\theta$ とおき、$t$ の2次関数にする |
| 2次同次式型 | $\sin^2\theta$, $\sin\theta\cos\theta$, $\cos^2\theta$ のみ(2次の項だけ) | 倍角・半角で $2\theta$ に統一し、合成する |
$y = \cos^2\theta - 2\sin\theta\cos\theta + 3\sin^2\theta$ のように見えて、展開すると定数項が出てくる場合があります。
$\sin^2\theta + \cos^2\theta = 1$ を使って $\sin^2\theta = 1 - \cos^2\theta$ のように代入し、$\sin 2\theta$ と $\cos 2\theta$ の式に整理する手順は同じです。定数項はそのまま残しておけばよいだけです。
$\cos n\theta$ は $\cos\theta$ の $n$ 次多項式で表せます(チェビシェフの多項式)。例えば $\cos 2\theta = 2\cos^2\theta - 1$、$\cos 3\theta = 4\cos^3\theta - 3\cos\theta$ です。
逆に、$\cos^n\theta$ は $\cos k\theta$($k = 0, 1, \ldots, n$)の1次結合で表せます。これが「次数を下げる」操作の一般化であり、フーリエ解析の基礎につながる考え方です。
Q1. $t = \sin\theta + \cos\theta$ とおくとき、$\sin\theta\cos\theta$ を $t$ を用いて表せ。
Q2. $t = \sin\theta - \cos\theta$ とおくとき、$\sin 2\theta$ を $t$ を用いて表せ。
Q3. $\theta$ が任意の実数のとき、$t = \sin\theta + \cos\theta$ のとりうる値の範囲を求めよ。
Q4. $\sin\theta\cos\theta = \dfrac{\sin 2\theta}{2}$ であることを示せ。
Q5. $y = 2\cos^2\theta + 3\cos\theta - 1$ の最大最小を求めるとき、どのような置換が適切か。また、置換後の変数のとりうる値の範囲を答えよ。
$0 \leq \theta < 2\pi$ のとき、次の関数の最大値と最小値を求めよ。また、そのときの $\theta$ の値を求めよ。
$$y = -2\sin^2\theta - \sin\theta + 1$$
$\cos^2\theta$ が含まれないので、$t = \sin\theta$($-1 \leq t \leq 1$)とおく。$y$ は $t$ の2次関数になるので、定義域つきの最大最小を求める。
$t = \sin\theta$($-1 \leq t \leq 1$)とおくと、
$$y = -2t^2 - t + 1 = -2\left(t + \frac{1}{4}\right)^2 + \frac{9}{8}$$
上に凸の放物線で、軸は $t = -\frac{1}{4}$(定義域 $[-1, 1]$ 内)。
最大値:$t = -\frac{1}{4}$ のとき $y = \frac{9}{8}$
$\sin\theta = -\frac{1}{4}$ より、$\theta = \pi + \arcsin\frac{1}{4}$, $\theta = 2\pi - \arcsin\frac{1}{4}$
最小値:軸から遠い端点 $t = 1$ のとき $y = -2 - 1 + 1 = -2$
$\sin\theta = 1$ より $\theta = \frac{\pi}{2}$
$0 \leq \theta < 2\pi$ のとき、関数 $f(\theta) = \sin 2\theta + 2(\sin\theta + \cos\theta) - 1$ について、次の問いに答えよ。
(1) $t = \sin\theta + \cos\theta$ とおくとき、$f(\theta)$ を $t$ の式で表せ。
(2) $t$ のとりうる値の範囲を求めよ。
(3) $f(\theta)$ の最大値と最小値を求めよ。また、そのときの $\theta$ の値を求めよ。
$t = \sin\theta + \cos\theta$ の両辺を2乗して $\sin 2\theta = t^2 - 1$ を導き、$f(\theta)$ を $t$ の2次関数に変換する。$t$ の範囲は合成から求める。
(1) $t = \sin\theta + \cos\theta$ の両辺を2乗すると、$t^2 = 1 + \sin 2\theta$ より $\sin 2\theta = t^2 - 1$。
$$f(\theta) = (t^2 - 1) + 2t - 1 = t^2 + 2t - 2 = (t + 1)^2 - 3$$
(2) $t = \sqrt{2}\sin\left(\theta + \frac{\pi}{4}\right)$ より、$0 \leq \theta < 2\pi$ のとき $\sin\left(\theta + \frac{\pi}{4}\right)$ は $-1$ から $1$ までの値をとるので、$-\sqrt{2} \leq t \leq \sqrt{2}$。
(3) $y = (t + 1)^2 - 3$($-\sqrt{2} \leq t \leq \sqrt{2}$)は下に凸で軸 $t = -1$ は定義域内。
最小値:$t = -1$ のとき $y = -3$
$\sqrt{2}\sin\left(\theta + \frac{\pi}{4}\right) = -1$ より $\sin\left(\theta + \frac{\pi}{4}\right) = -\frac{\sqrt{2}}{2}$
$\theta + \frac{\pi}{4} = \frac{5\pi}{4}$ より $\theta = \pi$
最大値:$t = \sqrt{2}$ のとき $y = (\sqrt{2}+1)^2 - 3 = 3 + 2\sqrt{2} - 3 = 2\sqrt{2}$
$\sin\left(\theta + \frac{\pi}{4}\right) = 1$ より $\theta + \frac{\pi}{4} = \frac{\pi}{2}$、$\theta = \frac{\pi}{4}$
よって、$\theta = \frac{\pi}{4}$ のとき最大値 $2\sqrt{2}$、$\theta = \pi$ のとき最小値 $-3$
$0 \leq \theta \leq \frac{\pi}{3}$ のとき、関数 $y = \sqrt{3}\sin\theta\cos\theta + \cos^2\theta$ の最大値と最小値を求めよ。また、そのときの $\theta$ の値を求めよ。
$\sin\theta\cos\theta = \frac{\sin 2\theta}{2}$、$\cos^2\theta = \frac{1 + \cos 2\theta}{2}$ を使って次数を下げ、$2\theta$ の三角関数の式にしてから合成する。
$$y = \sqrt{3} \cdot \frac{\sin 2\theta}{2} + \frac{1 + \cos 2\theta}{2} = \frac{\sqrt{3}}{2}\sin 2\theta + \frac{1}{2}\cos 2\theta + \frac{1}{2}$$
三角関数の合成により、
$$y = \sin\left(2\theta + \frac{\pi}{6}\right) + \frac{1}{2}$$
$0 \leq \theta \leq \frac{\pi}{3}$ より $\frac{\pi}{6} \leq 2\theta + \frac{\pi}{6} \leq \frac{5\pi}{6}$
この範囲で $\sin\left(2\theta + \frac{\pi}{6}\right)$ の最大値は $1$($2\theta + \frac{\pi}{6} = \frac{\pi}{2}$ のとき)、最小値は $\frac{1}{2}$($2\theta + \frac{\pi}{6} = \frac{5\pi}{6}$ のとき)。
最大値:$\theta = \frac{\pi}{6}$ のとき $y = 1 + \frac{1}{2} = \frac{3}{2}$
最小値:$\theta = \frac{\pi}{3}$ のとき $y = \frac{1}{2} + \frac{1}{2} = 1$
$0 \leq \theta \leq \pi$ のとき、関数 $y = \cos\theta - \sin 2\theta - \sin\theta + 1$ の最大値と最小値を求めよ。また、そのときの $\theta$ の値を求めよ。
$y = (\cos\theta - \sin\theta) - 2\sin\theta\cos\theta + 1$ と変形できるので、$t = \sin\theta - \cos\theta$ とおく($\cos\theta - \sin\theta = -t$ となる)。$\sin\theta\cos\theta = \frac{1-t^2}{2}$ を利用して $t$ の関数にする。
$y = (\cos\theta - \sin\theta) - 2\sin\theta\cos\theta + 1$ と変形する。
$t = \sin\theta - \cos\theta$ とおくと、$\cos\theta - \sin\theta = -t$、$\sin\theta\cos\theta = \frac{1 - t^2}{2}$ より、
$$y = -t - 2 \cdot \frac{1 - t^2}{2} + 1 = -t - (1 - t^2) + 1 = t^2 - t$$
$$= \left(t - \frac{1}{2}\right)^2 - \frac{1}{4}$$
$t$ の範囲を求める。$t = \sqrt{2}\sin\left(\theta - \frac{\pi}{4}\right)$ であり、$0 \leq \theta \leq \pi$ のとき $-\frac{\pi}{4} \leq \theta - \frac{\pi}{4} \leq \frac{3\pi}{4}$。
この範囲で $\sin\left(\theta - \frac{\pi}{4}\right)$ は $-\frac{\sqrt{2}}{2}$ から $1$ までの値をとるので、$-1 \leq t \leq \sqrt{2}$。
$y = \left(t - \frac{1}{2}\right)^2 - \frac{1}{4}$($-1 \leq t \leq \sqrt{2}$)は下に凸で軸 $t = \frac{1}{2}$ は定義域内。
最小値:$t = \frac{1}{2}$ のとき $y = -\frac{1}{4}$
$\sqrt{2}\sin\left(\theta - \frac{\pi}{4}\right) = \frac{1}{2}$ より $\sin\left(\theta - \frac{\pi}{4}\right) = \frac{1}{2\sqrt{2}} = \frac{\sqrt{2}}{4}$
$\theta = \frac{\pi}{4} + \arcsin\frac{\sqrt{2}}{4}$
最大値:端点での値を比較する。
$t = -1$ のとき $y = 1 + 1 = 2$、$t = \sqrt{2}$ のとき $y = 2 - \sqrt{2}$
$2 > 2 - \sqrt{2}$ なので、$t = -1$ のとき最大値 $2$。
$\sqrt{2}\sin\left(\theta - \frac{\pi}{4}\right) = -1$ より $\sin\left(\theta - \frac{\pi}{4}\right) = -\frac{\sqrt{2}}{2}$。$\theta - \frac{\pi}{4} = -\frac{\pi}{4}$ より $\theta = 0$。
よって、$\theta = 0$ のとき最大値 $2$、$\theta = \frac{\pi}{4} + \arcsin\frac{\sqrt{2}}{4}$ のとき最小値 $-\frac{1}{4}$