10

How do I solve the following equation?

$$\cos(x) - \sin(x) = 0$$

I need to find the minimum and maximum of this function:

$$f(x) = \frac{\tan(x)}{(1+\tan(x)^2}$$

I differentiated it, and in order to find the stationary points I need to put the numerator equal to zero. But I can't find a way to solve this trigonometric equation.

Asaf Karagila
  • 393,674
NPLS
  • 445
  • 4
    For the first : Solve $tan(x)=1$ , Solution $(k+\frac{1}{4})\pi$ – Peter Aug 27 '16 at 21:32
  • 1
    For the second, substitute $t=\tan(x)$ to get $g(t)=\frac{t}{(1+t)^2}$. You should have no problem to find the extrema of $g(t)$. Since the range of $\tan(x)$ is $\mathbb R$, the extrema of $g(t)$ are also the extrema of $f(x)$. – Peter Aug 27 '16 at 21:41

8 Answers8

29

Here's an alternative hint with a more geometrical flavour: what are the angles in an isosceles right-angled triangle?

Rob Arthan
  • 48,577
22

Hint: Take the equation $$ \sin(x) = \cos(x) $$ and divide both sides by $\cos(x)$ to get $$ \tan(x) = 1 $$


Alternatively, using a sum-to-product formula, we can observe that $$ \sin(x) - \cos(x) = \sqrt{2}\sin(x - 45^\circ) $$

Ben Grossmann
  • 225,327
  • 4
    ... or more precisely, you get two classes of solutions: solutions to $\tan(x)=1$ and simultaneous solutions to {$\cos(x)=0$ and $\sin(x)=\cos(x)$}. –  Aug 28 '16 at 00:43
  • 7
    I don't understand how this kind of question and answer get so many upvotes, a more difficult problem is to understand why would someone even ask "what is the solution of $\sin(x) = \cos(x)$ " in a mathematic community this is hard to believe – Anonymous Aug 28 '16 at 05:25
  • @Hurkyl: Of course the second class of solutions is exceptionally small … – celtschk Aug 28 '16 at 05:27
  • 3
    @Anonymous it's about which questions get seen, in the end of the day. A simple question is more likely to be understandable and therefore interesting to the passer-by. Once the question becomes "hot", it gets even more attention. – Ben Grossmann Aug 28 '16 at 05:30
  • 2
    As Hurkyl said: Be aware that plainly dividing by $\cos(x)$ assumes that your solutions lie where $\cos(x)\not=0$. Adding that second equation ($\cos(x)=0 \land \sin(x)=\cos(x)$) makes your answer a lot more rigorous (even if it isn't going to give solutions). – tomsmeding Aug 28 '16 at 05:45
  • 13
    @Anonymous: You might be confusing this site with Math overflow. The people who ask questions here on math.se are not (necessarily) mathematicians, they are people who need help with mathematics. Some need help with advanced stuff, some need help with things as elementary as this question. If you were looking for a community of mathematicians, give http://mathoverflow.net/ a look. Or you can stay here and acknowledge that people vary in their proficiency in math, and not everyone has to cater to your specific preferred level of sophistication. – Meni Rosenfeld Aug 28 '16 at 08:55
  • 1
    @Anonymous the same effect can be seen all over the place. People tend to upvote things they undetstand. A complex question gets less votes simply because there is less people who could vote. So sometimes the answer that is worth its weight in gold and has no other competitors on the internet gets just a few votes if even that – joojaa Aug 28 '16 at 15:08
10

A direct approach: use the unit-circle definition of sine and cosine.

Consider a unit circle around the origin of a Cartesian plane. Since in this problem $x$ is already in use as an angle, we cannot label the two axes $x$ and $y$ as usual, so let's label them $u$ (on the horizontal axis) and $v$ (on the vertical axis) instead. Then the unit-circle definition says that if we take a point at an angle $x$ radians counterclockwise around the unit circle, the coordinates at that point will be \begin{align} u &= \cos x, \\ v &= \sin x. \end{align}

The equation $\cos x = \sin x$ then tells us that $u = v$, which is the equation of a line at $\frac\pi4$ radians ($45$ degrees) through the origin. But we got these coordinates in the first place as coordinates of a point on the unit circle, so the solution must be at a point where the line $u = v$ intersects the unit circle. Draw a graph, as in the figure below: there are two such points.

enter image description here

The coordinates of these points happen to be $\left(\frac{\sqrt2}{2},\frac{\sqrt2}{2}\right)$ and $\left(-\frac{\sqrt2}{2},-\frac{\sqrt2}{2}\right)$, but even without figuring that out, since you know the angle of the line $u=v$ you can easily see the two possible values of $x$ within the range $0$ to $2\pi$ radians ($0$ to $360$ degrees).

David K
  • 98,388
6

1) $\cos^2 x + \sin^2 x = 1$

So $2 \cos^2 x = 1$

So $\cos x = \sin x = \pm \sqrt{\frac 12}$

2) $\sin x$ is the adjacent side of a right triangle. $\cos x $ is the opposite side. $\sin x = \cos x$ means the triangle is isoceles. So the base angles are congruent. So $x + x + 90 = 180$.

3) $\sin x = \cos (\frac {\pi}2 -x)$

so $\cos x = \sin x = \cos (\frac {\pi}2-x)$

Can you figure it out now?

There are some quadrant issues to figure out but they aren't hard.

fleablood
  • 124,253
3

If you have an equation of the form $$ \cos f(x)=\sin g(x) $$ you can rewrite it as $$ \cos f(x)=\cos\left(\frac{\pi}{2}-g(x)\right) $$ and so $$ f(x)=\frac{\pi}{2}-g(x)+2k\pi \qquad\text{or}\qquad f(x)=-\frac{\pi}{2}+g(x)+2k\pi $$

In your particular case, $f(x)=g(x)=x$, so you have $$ x=\frac{\pi}{2}-x+2k\pi \qquad\text{or}\qquad x=-\frac{\pi}{2}+x+2k\pi $$ Of course, the second possibility gives no solution; the first case gives $$ x=\frac{\pi}{4}+k\pi $$


If your function is $$ f(x)=\frac{\tan x}{(1+\tan x)^2} $$ the derivative is \begin{align} f'(x) &=\frac{(1+\tan^2x)(1+\tan x)^2-2(1+\tan x)(1+\tan^2x)\tan x} {(1+\tan x)^4} \\[6px] &=\frac{(1+\tan^2x)(1-\tan x)}{(1+\tan x)^3} \end{align} so it vanishes for $\tan x=1$.

egreg
  • 238,574
2

For posterity, here's a unit circle interpretation of the equation $\cos\theta = \sin\theta$, viewing the circle as parametrized by $$ x = \cos\theta,\qquad y = \sin\theta. $$

Solutions of cosine equals sine

2

Approach $1$ (Squaring):

$$(\sin x-\cos x)^2=0$$ $$(\sin^2x+\cos^2x)-2\sin x\cos x=0$$ $$1-\sin2x=0$$ $$\sin2x=1$$ $$2x=\frac{\pi}2+2n\pi,n\in\Bbb{N}$$ $$x=\frac{\pi}4+n\pi,n\in\Bbb{N}$$


Approach $2$ (By definition of $\sin x$ and $\cos x$): $$\cos t=\frac{e^{it}+e^{-it}}2=\frac{e^{it}-e^{-it}}{2i}=\sin t$$ $$(1+i)e^{-it}=(1-i)e^{it}$$ $$e^{2it}=\frac{1+i}{1-i}=i$$ $$\cos2t+i\sin2t=i$$ $$\implies\cos 2t=0 \text{ }\cap \sin2t=1$$ $$x=\frac{\pi}4+n\pi,n\in\Bbb{N}$$

Mythomorphic
  • 6,008
1

$cos(x)=sin(x) \implies x = \pi n-\frac{3\pi}{4}$ where n is an integer.

H G Sur
  • 597