令 \(x=3\cos\theta,\forall 0\le\theta\le\pi\),則
\[f(x)=3\sin\theta + 4\cos\theta=
5\left(\frac{3}{5}\sin\theta+\frac{4}{5}\cos\theta\right)=5\sin\left(\theta+\phi\right).\]
其中,\(\phi\) 為銳角,且滿足 \(\displaystyle\cos\phi=\frac{3}{5},\;\sin\phi=\frac{4}{5}.\)
因為 \(0\le\theta\le\pi\),所以 \(\phi\le\theta+\phi\le\pi+\phi\)
如上圖,即為 \(\theta+\phi\) 角度之範圍。
當\(\theta+\phi=\frac{\pi}{2}\) 時,\(\displaystyle\sin\left(\theta+\phi\right)=1\), 此時 \(f(x)\) 有最大值 \(\displaystyle M=5\),且
\[\theta=\frac{\pi}{2}-\phi \Rightarrow x=3\cos\theta=3\cos\left(\frac{\pi}{2}-\phi\right)=3\sin\phi=\frac{12}{5}.\]
亦即,題意之 \(\displaystyle\left(\alpha,M\right)=\left(\frac{12}{5},5\right).\)
當 \(\theta+\phi=\pi+\phi\) 時,\(\sin\left(\theta+\phi\right)=-\sin\phi=-\frac{4}{5}\),此時 \(f(x)\) 有最小值 \(\displaystyle m=-4\),且
\[\theta=\pi\Rightarrow x=3\cos\theta=3\cdot\left(-1\right)=-3.\]
亦即,題意之 \(\left(\beta,m\right)=\left(-3,-4\right).\)