Find the equation of the straight lines through the origin each of which makes an angle of $\alpha$ with $y=x$. 
Find the equation of the straight lines through the origin each of which makes an angle of $\alpha$ with $y=x$.

Below is my attempt
Let the lines be $l_1,l_2$.
Since $l_1$ makes an angle $\alpha$ with $y=x$ so it makes an angle of $(\frac{\pi}{4}+\alpha)$ with $x$-axis
And the line $l_2$ makes an angle $(\frac{\pi}{4}-\alpha)$ with $x-axis$.
So the equations of two lines are $y_1=\tan (\frac{\pi}{4}+\alpha)x,y_2=(\frac{\pi}{4}-\alpha)x$,
But how to find the common equation representing the two lines?
 A: The common equation representing the two lines would be :
$$(y-x\tan(\tfrac{\pi}{4}+\alpha))(y-x\tan(\tfrac{\pi}{4}-\alpha)) = 0$$
You can expand to get an equation of pair of straight lines.
A: The angle made by straight line is
$$ \pi/4 \pm \alpha $$
So we have the tangent of angle above 
$$= \frac { 1+\tan \alpha }{ 1-\tan \alpha },\,  \frac { 1 -\tan \alpha }{ 1+\tan \alpha } $$
and the straight lines required are 
$$\frac{y}{x}= \frac { 1+\tan \alpha }{ 1-\tan \alpha },\, \frac{y}{x}=  \frac { 1 -\tan \alpha }{ 1+\tan \alpha } $$
Common equation is
$${\left({\dfrac{y}{x}} \right) }^{\pm 1}= \frac { 1+\tan \alpha }{ 1-\tan \alpha } $$
In polar coordinates simply
$$ \theta = \pi/4 \pm  \alpha $$
for all $r$.
A: For fun:
In.polar coordinates:
Let $\alpha \not=π/4.$
0) Original line: $\theta_0 = π/4.$
1) Line 1: $\theta_1 = π/4 +\alpha.$
2) Line 2: $\theta_2 = π/4 - \alpha.$
That's it.
Back to Cartesian coordinates:
$x= r\cos(\theta _i);$  $y=r\sin(\theta_i)$, 
$i=0,1,2,$ or by eliminating $r:$
$y=\tan(\theta_i) x $,  $i=0,1,2.$
Common equation:
$(y-\tan(\theta_1) x)(y-\tan(\theta_2) x)=0$.
A: A common equation can be found by writing the two equations in the form $mx-y=0$ and multiplying them together. Any points that satisfy either of the two equations also satisfy their product.  
Just to join in the fun, here’s another way to attack this problem. The equations of the lines that make an angle of $\alpha$ with the $x$-axis are $y\pm x\tan\alpha=0$, so their common equation is $(y+x\tan\alpha)(y-x\tan\alpha)=0$, or $y^2=x^2\tan^2\alpha$. Now rotate this through an angle of $\pi/4$ by making the substitutions† $x\mapsto(y+x)$, $y\mapsto(y-x)$: $$(y-x)^2 = (y+x)^2\tan^2\alpha \\ 
y^2-2xy+x^2 = (y^2+2xy+x^2)\tan^2\alpha \\ 
(x^2+y^2)(1-\tan^2\alpha) = 2xy(1+\tan^2\alpha).$$ This can be further simplified, if desired, by using one of the double-angle cosine formulas: $$(x^2+y^2)(1-\tan^2\alpha) = 2xy(1+\tan^2\alpha) \\
(x^2+y^2){1-\tan^2\alpha \over 1+\tan^2\alpha} = 2xy \\
(x^2+y^2)\cos{2\alpha} = 2xy.$$  

† Strictly speaking, there should be a factor of $\frac1{\sqrt2}$ in this transformation, but this common denominator can be factored out at the end and omitting it reduces clutter in the calculations. Geometrically, a uniform scaling maps lines through the origin onto themselves, so multiplying through by a non-zero constant doesn’t change anything.
