3

So the other night I was randomly python scripting. I plotted $\sin(t) + \cos(t)$ vs $t$ for $t$ ranging between $0$ to $100$ with spacings of Δt = 0.1. (It is a pretty basic code...) Anyhow, the below plot is the result. enter image description here

Why does it look like this? I cannot figure out why, surely it has something to do with some periodicity going on in $\sin(t) + \cos(t)$?

2 Answers2

6

Recall that by sum/difference identities

$$\cos (\alpha-\beta) =\cos \alpha\cos \beta + \sin \alpha\sin \beta$$

and by $\cos \beta=\sin \beta=\frac{\sqrt 2}2$ we have

$$\cos \alpha + \sin \alpha=\sqrt 2 \cos (\alpha-\beta)$$

with $\beta=\frac{\pi}4+2k\pi$.

user
  • 154,566
3

The angle addition formulas are useful, but you don't need them to show that $f(t) = \sin t + \cos t$ is periodic. Since sin and cos are both periodic with a period of $2 \pi$, their sum must be periodic as well, or more formally:

$$f(t - 2 \pi) = \sin(t - 2\pi) + \cos(t - 2 \pi) = \sin t + \cos t = f(t)$$

Toby Mak
  • 16,827
  • Interesting answer. I chose the other answer as the correct one (sorry!) but on another day I might have chose this one. – innating Aug 23 '21 at 23:42