I'm trying to solve the following problem:
The graphs for $y = \sin x$ and $y = \cos x$ has two points of intersection in the interval $[-\pi, \pi]$. Determine the equation for the line that passes through these two points.
What I've done (and failed):
A point of intersection is when $\sin x = \cos x$. By drawing the unit circle, I can easily see that the two points when the x-value (cos) is the same as the y-value (sin) is at $x = \frac{\pi}{4}$ and $x = \frac{-3\pi}{4}$. Those points are $\left(\frac{\sqrt 2}{2}, \frac{\sqrt 2}{2}\right)$ and $\left(-\frac{\sqrt 2}{2}, -\frac{\sqrt 2}{2}\right)$.
After that, I tried calculating the slope of the line (y1-y2 / x1-x2) and then plug in the x/y value of a point and solve for b. In the end, I ended up with $y = 1 \cdot x + 0$ or $y = x$ which is... wrong.
I don't know what to do.