Step 1: Understanding the Concept
We need to find two points on line $L$: the foot of the perpendicular $N$ and the intersection point $Q$. The angle $\alpha$ is the angle at vertex $P$ in the triangle $PNQ$. Since $PN \perp L$, $\triangle PNQ$ is a right-angled triangle at $N$.
Step 2: Finding Point N and Point Q
1. Any point on $L$ is $(r, 0, -r)$.
2. For $N$: Vector $\vec{PN} = (r-1, -2, -r+1)$. Since $\vec{PN} \perp (1, 0, -1)$:
$(r-1)(1) + (-2)(0) + (-r+1)(-1) = 0 \implies r-1 + r-1 = 0 \implies r=1$.
So, $N = (1, 0, -1)$ and $\vec{PN} = (0, -2, 0)$. Length $PN = 2$.
3. For $Q$: $Q$ lies on $L$, so $Q = (k, 0, -k)$. $\vec{PQ} = (k-1, -2, -k+1)$.
Since $PQ$ is parallel to the plane $x+y+2z=0$, $\vec{PQ}$ is perpendicular to the normal $(1, 1, 2)$:
$(k-1)(1) + (-2)(1) + (-k+1)(2) = 0 \implies k-1 -2 -2k + 2 = 0 \implies -k - 1 = 0 \implies k = -1$.
So, $Q = (-1, 0, 1)$ and $\vec{PQ} = (-2, -2, 2)$.
Step 3: Calculating \(\cos \alpha\)
In right-angled $\triangle PNQ$ (right-angled at $N$):
$\cos \alpha = \frac{\text{Adjacent}}{\text{Hypotenuse}} = \frac{PN}{PQ}$
1. $PN = 2$
2. $PQ = \sqrt{(-2)^2 + (-2)^2 + 2^2} = \sqrt{4+4+4} = \sqrt{12} = 2\sqrt{3}$
3. $\cos \alpha = \frac{2}{2\sqrt{3}} = \frac{1}{\sqrt{3}}$
Step 4: Final Answer
The value of \( \cos \alpha \) is \( \frac{1}{\sqrt{3}} \).