Find y' for y = sqrt(1+ sin 2x) - sqrt(1- sin 2x). Does
Find $y'$ for $y = \sqrt{1+\sin 2x} - \sqrt{1-\sin 2x}$. Does $y'\!\left(\dfrac{\pi}{4}\right)$ exist? Find $\displaystyle\lim_{x\to\frac{\pi}{4}^{-}}y'$ and $\displaystyle\lim_{x\to\frac{\pi}{4}^{+}}y'$.
Explanation of Method
Absolute values hidden inside radicals, and the corner they produce.
Step 1: Recognise the perfect squares
Since $\sin 2x = 2\sin x\cos x$ and $\sin^{2}x+\cos^{2}x = 1$: $1+\sin 2x = (\sin x+\cos x)^{2}, \qquad 1-\sin 2x = (\sin x-\cos x)^{2}$.
Taking square roots produces absolute values, not the brackets themselves: $y = \bigl|\sin x+\cos x\bigr| - \bigl|\sin x-\cos x\bigr|$.
Step 2: Resolve the signs on $\left(0,\tfrac{\pi}{2}\right)$
On this interval $\sin x+\cos x \gt 0$ throughout, so the first absolute value is harmless. The second changes character at $x = \tfrac{\pi}{4}$, where $\sin x = \cos x$.
For $0 \lt x \lt \tfrac{\pi}{4}$ we have $\sin x \lt \cos x$, so $\bigl|\sin x-\cos x\bigr| = \cos x-\sin x$ and
\[ y = (\sin x+\cos x) - (\cos x-\sin x) = 2\sin x. \]
For $\tfrac{\pi}{4} \lt x \lt \tfrac{\pi}{2}$ we have $\sin x \gt \cos x$, so $\bigl|\sin x-\cos x\bigr| = \sin x-\cos x$ and
\[ y = (\sin x+\cos x) - (\sin x-\cos x) = 2\cos x. \]
Step 3: Differentiate on each piece
\[ y' = 2\cos x \ \ \text{on}\ \left(0,\tfrac{\pi}{4}\right), \qquad y' = -2\sin x \ \ \text{on}\ \left(\tfrac{\pi}{4},\tfrac{\pi}{2}\right). \]
Step 4: The one-sided limits at $x = \tfrac{\pi}{4}$
\[ \lim_{x\to\frac{\pi}{4}^{-}} y' = 2\cos\frac{\pi}{4} = 2\cdot\frac{\sqrt2}{2} = \sqrt2, \qquad \lim_{x\to\frac{\pi}{4}^{+}} y' = -2\sin\frac{\pi}{4} = -\sqrt2. \]
Step 5: Does $y'\!\left(\tfrac{\pi}{4}\right)$ exist?
The two one-sided derivatives are finite but unequal: $\sqrt2 \neq -\sqrt2$.
so the two-sided derivative does not exist. The graph has a corner at $x = \tfrac{\pi}{4}$, exactly as $|x|$ does at the origin (Problem 20).
Step 6: Verification
\[x = \frac{\pi}{4}:\quad 2\sin\frac{\pi}{4} = \sqrt2 \quad\text{and}\quad 2\cos\frac{\pi}{4} = \sqrt2\]
\[\text{Direct:}\quad y\!\left(\tfrac{\pi}{4}\right) = \sqrt{1+1} - \sqrt{1-1} = \sqrt2 - 0 = \sqrt2 \;\;\checkmark\]
The two branches agree in value at $\tfrac{\pi}{4}$, so $y$ is continuous there even though the derivative fails to exist — another instance of continuity without differentiability.
Result
Final answer:
\[\boxed{\,\begin{aligned} & y' = \begin{cases} 2\cos x, & 0 < x < \tfrac{\pi}{4}, \\[4pt] -2\sin x, & \tfrac{\pi}{4} < x < \tfrac{\pi}{2}, \end{cases} \\[8pt] & \lim_{x\to\frac{\pi}{4}^{-}} y' = \sqrt2, \qquad \lim_{x\to\frac{\pi}{4}^{+}} y' = -\sqrt2, \qquad y'\!\left(\tfrac{\pi}{4}\right)\ \text{does not exist.} \end{aligned}\,}\]
Remark
Remark. The trap is writing $\sqrt{(\sin x-\cos x)^{2}} = \sin x - \cos x$. That identity holds only where the bracket is non-negative; dropping the absolute value would give the single formula $y = 2\cos x$ everywhere and hide the corner entirely. On the whole real line $y = 2\min(\sin x,\cos x)\cdot$ sign considerations repeat with period $2\pi$, producing a corner at every point where $\sin x = \cos x$.