y=sinx+cosxy = \sin x + \cos x

Graph of the Function y=sinx+cosxy = \sin x + \cos x

y=sinx+cosxy = \sin x + \cos x simply adds a sine to a cosine. Two waves are superposed and yet the result is again a single sine wave. It is the simplest and prettiest instance of what is called combining trigonometric functions1.

Combining the two

Running the addition formula backwards collapses the sum.

sinx+cosx=2sin(x+π4)\sin x + \cos x = \sqrt{2}\,\sin\left(x + \frac{\pi}{4}\right)

Expanding the right-hand side returns the original.

2sin(x+π4)=2(sinxcosπ4+cosxsinπ4)=2(22sinx+22cosx)=sinx+cosx\begin{align*} \sqrt{2}\,\sin\left(x+\frac{\pi}{4}\right) &= \sqrt{2}\left(\sin x\cos\frac{\pi}{4} + \cos x\sin\frac{\pi}{4}\right) \\ &= \sqrt{2}\left(\frac{\sqrt{2}}{2}\sin x + \frac{\sqrt{2}}{2}\cos x\right) \\ &= \sin x + \cos x \end{align*}

Both original amplitudes are 11, yet the combined amplitude is 2\sqrt{2}, because the two waves are a quarter period out of step. It is the same arithmetic as adding two perpendicular vectors of length 11 to get one of length 2\sqrt{2}.

Range and period

  • The amplitude is 21.414\sqrt{2} \approx 1.414
  • The period is 2π2\pi
  • The range is 2y2-\sqrt{2} \leq y \leq \sqrt{2}
  • The maximum falls at x=π4+2nπx = \dfrac{\pi}{4} + 2n\pi and the minimum at x=5π4+2nπx = \dfrac{5\pi}{4} + 2n\pi

Zeros and symmetry

The equation sinx+cosx=0\sin x + \cos x = 0 is the same as tanx=1\tan x = -1, so the zeros are at x=3π4+nπx = \dfrac{3\pi}{4} + n\pi. The function is neither even nor odd, but it is symmetric about the vertical line x=π4x = \dfrac{\pi}{4} through its maximum.

The clearest way to read the graph is as sinx\sin x shifted left by π4\dfrac{\pi}{4} and stretched vertically by 2\sqrt{2}.

xxyy
0011
π4\dfrac{\pi}{4}2\sqrt{2}
3π4\dfrac{3\pi}{4}00
5π4\dfrac{5\pi}{4}2-\sqrt{2}
7π4\dfrac{7\pi}{4}00

Monotonicity and concavity

The derivative is y=cosxsinx=2cos(x+π4)y' = \cos x - \sin x = \sqrt{2}\cos\left( x+\dfrac{\pi}{4} \right). The second derivative satisfies the equation of simple harmonic motion exactly.

y=sinxcosx=yy'' = -\sin x - \cos x = -y

The inflection points therefore coincide with the zeros, at x=3π4+nπx = \dfrac{3\pi}{4} + n\pi.

The general case

The same computation gives the general form.

asinx+bcosx=a2+b2sin(x+α)a\sin x + b\cos x = \sqrt{a^2+b^2}\,\sin(x+\alpha)

Here α\alpha is fixed by cosα=aa2+b2\cos\alpha = \dfrac{a}{\sqrt{a^2+b^2}} and sinα=ba2+b2\sin\alpha = \dfrac{b}{\sqrt{a^2+b^2}}. The amplitude a2+b2\sqrt{a^2+b^2} is the Pythagorean theorem in disguise, making plain that the two terms are being added as vectors.

Applications

In an alternating-current circuit the current through a resistor and that through a capacitor or an inductor are a quarter period out of phase, so finding the total current is precisely this combination. That the amplitude is not the plain sum but the square root of a sum of squares is the basis of impedance calculations. The same structure governs the interference of waves and the phasor representation of a signal by an amplitude and a phase2.

  1. List of trigonometric identities, Wikipedia
  2. Phasor, Wikipedia