4

I'm an adult, independent student working through calculus, trying my hand at trigonometric integrals, digressing with a bit of trigonometry practice, and so playing with the equation $\cos(x) + \sin(x) = 1$. I feel like the following transformations of said equation are all valid, but the result is incorrect. Can someone identify the invalid inference for me?

\begin{align} \cos(x) + \sin(x) &= 1 \\ (\cos(x) + \sin(x))^2 &= 1^2 \\ \cos^2(x) + 2\sin(x)\cos(x)+ \sin^2(x) &= 1 \\ 2\sin(x)\cos(x) + (\sin^2(x) + \cos^2(x)) &= 1 \\ 2\sin(x)\cos(x) + 1 &= 1 \\ 2\sin(x)\cos(x) + 1 -1 &= 1 -1 \\ 2\sin(x)\cos(x) &= 0 \\ \frac{2\sin(x)\cos(x)}{2} &= \frac{0}{2} \\ \sin(x)\cos(x) &= 0 \end{align}

Therefore, $x = \frac{\pi}{2}n$ because at each $\frac{\pi}{2}$ either $\sin(x) \lor \cos(x) = 0$

That said, the graph of $\cos(x) + \sin(x) - 1$ clearly doesn't agree with this outcome; so, I must have made some invalid inference in my trigonometric transformations.

Please forgive the distraction from what is obviously a more serious mathematics discussion than is suggested by this problem, but you know, a fellow seeks help where he can.

Thanks very much in advance, P

Pierre
  • 65
  • 6
  • 2
    Note that $x = \frac{\pi}{2}n$ is a necessary, but not sufficient, condition. – John Omielan May 09 '24 at 19:11
  • If $\cos(x)+\sin(x)=1$, then $2\sin(x)\cos(x)=0$. Then either $x=m\pi$ or $x=\pi/2+n\pi$. Checking, we find extraneous roots at odd multiples of $m$ and even multiples of $n$ – Mark Viola May 09 '24 at 19:30
  • 2
    When you squared the expression, you introduced extraneous roots corresponding to $ \cos x + \sin x = - 1$. If you look at their graphs, you'd see how the roots overlap. – Calvin Lin May 09 '24 at 19:37
  • Thanks @CalvinLin, you're comment is helpful in that it points to one of my inferences that introduced the problem that other commentators clearly understand better than I. But, why would a valid algebraic transformation have introduced this error? – Pierre May 09 '24 at 19:54
  • Perhaps the point would be clearer if you considered the equation $\sin x= 1$; if this is true, then it is also true that $(\sin x)^2=1$, and hence further true that $\sin x = \pm 1$. The process of applying valid transformations to an equation leads you to a condition that must hold at each solution, not necessarily to a condition that only holds at a solution. In this case $\sin x = \pm 1$ does hold at every solution of $\sin x = 1$, but not every value of $x$ with $\sin x = \pm 1$ satisfies $\sin x = 1$. – mcd May 09 '24 at 20:48
  • 1
    @Pierre Depends on what you mean by "valid algebraic transformation"? Who defined the "valid"? See this post for more details. – Calvin Lin May 09 '24 at 21:02
  • 1
    Thank you all for the comments and the reference. I'll think this through. While I'm very clear on the difference between necessary and sufficient conditions, I'm quite amateurish in its expression in mathematical terms, so I suspect I just need a bit time with paper and pencil. Thank you again. – Pierre May 09 '24 at 21:25

1 Answers1

-2

Suppose $x=1$. Squaring it produces $x^2 = 1$, which has solutions $x = ±1$. Therefore squaring will often produce invalid solutions.

In fact, if you do anything whatsoever to both sides of an equation, you give the chance to introduce new solutions. So every single step in your deduction may introduce new solutions! A special class of operations is guaranteed to not introduce new solutions, and this class is called injective. Adding is injective, multiplying (by non-zero numbers) is injective, but squaring is not, as we've seen.

Trebor
  • 5,501