Why squaring the trigonometric equation changes the solution? I have a trigonometric equation that is defined as:
$\sin(\alpha) - \cos(\alpha) = \frac{1}{2}$
Solving this equation by mathematica will yield $\alpha = 65.70 $ and $\alpha = -155.705 $
But As I solve it analytically, I will obtain different results:
First I exponentiate both sides to the power of two:
$(\sin(\alpha) - \cos(\alpha))^2 = \frac{1}{2}^2$
Now I expand the expressions:
$\sin(\alpha)^2 - 2 \sin(\alpha) \cos(\alpha) + \cos(\alpha)^2 = \frac{1}{4}$
As  $\sin(\alpha)^2 + \cos(\alpha)^2 = 1$, I will have:
$1 - 2 \sin(\alpha) \cos(\alpha) = \frac{1}{4}$
Again if I put $2 \sin(\alpha) \cos(\alpha) = \sin(2\alpha)$ I will be left with:
$\sin(2 \alpha) = \frac{3}{4}$
Which will readily give $\alpha = 24.3$ 
So, why I am having different results? I don't understand.
 A: Squaring is often a useful (sometimes unavoidable) way to solve an equation, but it always introduces new solutions which may not fit the original problem. When you square both sides of an equation, you should always check your solutions to make sure they are applicable.
If you can avoid squaring, you might try doing so so as not to be confused with extra solutions. For this particular problem, you can solve it without squaring as follows:
$\dfrac12\ =\ \sin\alpha-\cos\alpha\ =\ \sqrt2\,(\cos45^\circ\sin\alpha - \sin45^\circ\cos\alpha)\ =\ \sqrt2\sin(\alpha-45^\circ)$
which gives $\sin(\alpha-45^\circ)=\frac1{2\sqrt2}$ which you can solve to give you the values obtained from Mathematica.
A: Every solution to $\sin(\alpha) - \cos(\alpha) = \frac{1}{2}$ is, indeed, a solution to $\sin(2 \alpha) = \frac{3}{4}$. That work you have done correctly.
Your error is either in misunderstanding what you have done, or what to do with that information.
Generally, the next step is:


*

*Find the set $S$ of all solutions to $\sin(2 \alpha) = \frac{3}{4}$


Note that it really is important to find the entire set of solutions. Don't be sloppy and just take one solution.
Once you've determined the set $S$, you know it contains every solution to the original equation $\sin(\alpha) - \cos(\alpha) = \frac{1}{2}$; however, it can (and does!) contain other things too! The next step is


*

*Identify which of the solutions in $S$ are or are not solutions to $\sin(\alpha) - \cos(\alpha) = \frac{1}{2}$


Once you've picked out which of the solutions in $S$ also satisfy $\sin(\alpha) - \cos(\alpha) = \frac{1}{2}$, you now have its complete solution set.
A: If you square, you also get the solutions of
$$
\sin\alpha-\cos\alpha=-\frac{1}{2}
$$
In general, if you have an equation of the form $f(x)=g(x)$ and square both sides, you get, after rearranging,
$$
f(x)^2-g(x)^2=0 \tag{*}
$$
that can be rewritten
$$
(f(x)-g(x))(f(x)+g(x))=0
$$
so the solutions of (*) are the solutions of $f(x)-g(x)=0$ (the original equation) together with the solutions of $f(x)+g(x)=0$.

A safer way to solve your equation is to set $t=\tan(\alpha/2)$, so the equation becomes
$$
\frac{2t}{1+t^2}-\frac{1-t^2}{1+t^2}=\frac{1}{2}
$$
that reduces to
$$
t^2+4t-3=0
$$
with solutions
$$
-2+\sqrt{7}\qquad\text{or}\qquad -2-\sqrt{7}
$$
The first solutions corresponds to
$$
\alpha=2\arctan(\sqrt{7}-2)\approx 65.7^\circ
$$
and the second one to
$$
\alpha=-2\arctan(\sqrt{7}+2)\approx-155.7^\circ
$$
or $\approx204.3^\circ$ if you want a value between $0$ and $360$.
A: By squaring one unwittingly asks for two solutions of 
$$\sin(\alpha) - cos(\alpha) = \frac{1}{2} ,\quad\sin(\alpha) - cos(\alpha) = \frac{-1}{2}$$
At the end we should retain only the solutions of interest.
A: You actually nailed it, you just didn’t know it.
Algebra’s fundamental theorem states: Any $\rm n^{th}$ order polynomial has $\rm n$ roots.
Then, if one increase the order of a polynomial by $\rm m$ (let’s say $\rm 1^{st}$ to $\rm 2^{nd}$) the number of roots will increase from $\rm n$ to $\rm n+m$, Therefore raising the power makes things different.
But raising to the same power both sides of an equation makes the solution set of the $\rm (n+m)^{th}$ order polynomial to contain the solutions set of the $\rm n^{th}$ polynomial. Meaning, it shouldn’t be a problem in your case, your solutions set should be in the square problem.
Start to get the solutions of $\sin(2α)=\frac{1}{2}$. If $0 ≤α ≤360º$, then your solution set will be $\{24.3º, 65.70º, 204.295º (-155.705º), 245.365º\}$ (check the graph below).

Values in the middle are the ones you are looking for (see graph below).

Has you can see by this graph, the actual set of solutions is much bigger. Let’s find the full solution set to your problem. To do so, select the solutions of the square problem which are also a solution to your initial problem in the range $\rm 0≤α≤360$ i.e., $\rm α_1=65.7º, α_2=204.295º$. Now, let’s see how many times the $\sin$ of $2×65.7º$ or $\sin (131.4º)$ repeats.

If we imagine a circle it becomes clear that after every full turn one gets back to same ($\rm 65.7º$) point, i.e., the first set of solutions satisfy
$$\rm \Bbb α_{1n}=2nπ+α_1 \approx n×360º+65.7º, \forall n \in \Bbb N$$
But, we can check that every $180º-65.7º$ has the same $\sin$ of $65.7º$. Appling previous reasoning, the second set satisfy
 $$\rm \Bbb α’_{1n}=(2n+1)π-α_1 \approx n×360º+180º-65.7º=n×360º+114.3º, \forall n \in \Bbb N$$
We do the same with $\rm α_2$. The result is
$$\rm \Bbb α_{2n}=2nπ+α_2 \approx n×360º+204.295º, \forall n \in \Bbb N$$
$$\rm \Bbb α’_{2n}=(2n+1)π-α_2 \approx n×360º+180º-204.295º=n×360º-24,295º, \forall n \in \Bbb N$$
The total set of solutions is:
$$\rm \Bbb S= α_{1n} \cup α’_{1n} \cup α_{2n} \cup α’_{2n}, \forall n \in \Bbb N$$
A: Notice first of all that besides $24.3°$ you also have the solution $90°-24.3°=65.7°$ (supplementary angles have the same sine). 
Your solution $24.3°$ is to discard, because it is a solution of the equation $\cos\alpha-\sin\alpha=1$ (which of course is the same as the given one when squared).
In summary: when you solve $\sin2\alpha=3/4$ you must consider all solutions, and discard fake ones:
$\alpha=48.6°/2$ (discard)
$\alpha=(48.6°+360°)/2$ (fine, it is the same as $-155.7°$)
$\alpha=(180°-48.6°)/2$ (fine)
$\alpha=(180°-48.6°+360°)/2$ (discard).
