On real part of the complex number $(1+i)z^2$ 
Find the set of points belonging to the coordinate plane $xy$, for which the real part of the complex number $(1+i)z^2$ is positive.


My solution:-
Lets start with letting $z=r\cdot e^{i\theta}$. Then the expression $(1+i)z^2$ becomes $$\large\sqrt2\cdot|z|^2\cdot e^{{i}\left(2\theta+\dfrac{\pi}{4}\right)}$$
Now, as $\sqrt2\cdot|z|^2\gt0$, so $\Re{((1+i)z^2)}\gt 0 \implies\cos{\left(2\theta+\dfrac{\pi}{4}\right)}\gt 0$. So, we get 
$$-\dfrac{\pi}{2}\lt\left(2\theta+\dfrac{\pi}{4}\right)\lt\dfrac{\pi}{2}
\implies-\dfrac{3\pi}{4}\lt2\theta\lt\dfrac{\pi}{4}
\implies-\dfrac{3\pi}{8}\lt\theta\lt\dfrac{\pi}{8}$$
Now, lets find the equation of the lines which would help us show these inequalities in the coordinate plane.
The inequality can be represented by 
$$\begin{equation}
y\lt \tan{\dfrac{\pi}{8}}x\implies y\lt(\sqrt2-1)x \tag{1}
\end{equation}$$
$$\begin{equation}
y\gt \tan{(-\dfrac{3\pi}{8})}x \implies y\gt-(\sqrt2+1)x \tag{2}
\end{equation}$$
So, the inequality can be represented in the coordinate plane as in the following portion of the graph with the cross-hatched part.

My deal with the question:- 
The book I am solving gives the answer as the (cross-hatched part + un-hatched part), so what am I missing in my solution. And, as always more elegant solutions are welcome.


what am I missing in my solution

After having $\cos\left(2\theta+\frac{\pi}{4}\right)\gt 0$, you have

$$-\dfrac{\pi}{2}\lt\left(2\theta+\dfrac{\pi}{4}\right)\lt\dfrac{\pi}{2}$$

which is incorrect.
To make it easy to understand why this is incorrect, let $\alpha:=2\theta+\frac{\pi}{4}$.
Then, we want to solve
$$\cos\alpha\gt 0\quad\text{and}\quad -\pi\le\theta\lt \pi,$$
i.e.
$$\cos\alpha\gt 0\quad\text{and}\quad -\frac{7}{4}\pi\le\alpha\lt \frac{9}{4}\pi$$
which sould be easier to solve, to have
$$-\frac{7}{4}\pi\le \alpha\lt -\frac{3}{2}\pi\quad\text{or}\quad -\frac{\pi}{2}\lt\alpha\lt \frac{\pi}{2}\quad\text{or}\quad \frac 32\pi\lt\alpha\lt\frac{9}{4}\pi,$$
i.e.
$$-\pi\le \theta\lt -\frac78\pi\quad\text{or}\quad -\frac 38\pi\lt \theta\lt\frac{\pi}{8}\quad\text{or}\quad \frac{5}{8}\pi\lt \theta\lt\pi$$


as always more elegant solutions are welcome

(not sure if this is more elegant, but) another solution :
Let $z=x+iy$ where $x,y\in\mathbb R$. Then,
$$\Re((1+i)z^2)=\Re((1+i)(x+iy)^2)=x^2-y^2-2xy\tag1$$
When we solve $y^2+2xy-x^2=0$ for $y$, we get
$$y=-x\pm\sqrt{x^2+x^2}=-x\pm\sqrt 2\ x=(\pm\sqrt 2-1)x$$
so from $(1)$,
$$\begin{align}&\Re((1+i)z^2)\gt 0\\&\iff ((\sqrt 2-1)x-y)((\sqrt 2+1)x+y)\gt 0\\&\iff -(\sqrt 2+1)x\lt y\lt (\sqrt 2-1)x\quad\text{or}\quad (\sqrt 2-1)x\lt y\lt -(\sqrt 2+1)x\end{align}$$
