Maths WorkshopMaths problems with full solutions
Exercise 159Calculus › Single-variable calculus › Differentiation › Optimisation and curve sketchingL1Added 4 Nov 2026

The maximum of 3 sin x + 4 cos x

#extrema#trigonometry#amplitude

Statement

Find the maximum and minimum of f(x)=3sin⁡x+4cos⁡xf(x)=3\sin x+4\cos x with calculus, then check with the phase-shift method.

Hint

f′(x)=3cos⁡x−4sin⁡xf'(x)=3\cos x-4\sin x. At a critical point, tan⁡x=34\tan x=\frac34.

Show solutionHide solution

Solution

Critical points. f′(x)=0  ⟺  tan⁡x=34f'(x)=0\iff\tan x=\frac34. The solutions in [0,2π)[0,2\pi) are x0=arctan⁡34x_0=\arctan\frac34 (first quadrant) and x0+πx_0+\pi (third quadrant).

Values. At x0x_0, sin⁡x0=35\sin x_0=\frac35, cos⁡x0=45\cos x_0=\frac45 (a 33-44-55 triangle), so f(x0)=95+165=5f(x_0)=\frac95+\frac{16}5=5. At x0+πx_0+\pi both sin⁡\sin and cos⁡\cos change sign: f=−5f=-5.

Conclusion. ff is continuous and 2π2\pi-periodic, so it attains its extreme values on [0,2π][0,2\pi], and since it is differentiable everywhere these are attained at critical points: maximum 55, minimum −5-5.

Phase shift. 3sin⁡x+4cos⁡x=5sin⁡(x+φ)3\sin x+4\cos x=5\sin(x+\varphi) with cos⁡φ=35\cos\varphi=\frac35, sin⁡φ=45\sin\varphi=\frac45: values in [−5,5][-5,5], in agreement.

Remark. In general, asin⁡x+bcos⁡xa\sin x+b\cos x has maximum a2+b2\sqrt{a^2+b^2}. This is also the Cauchy–Schwarz inequality acos⁡t+bsin⁡t≤a2+b2a\cos t+b\sin t\le\sqrt{a^2+b^2}.