Answer: The shortest distance between two skew lines is the length of the component of one line’s direction perpendicular to the common perpendicular. A convenient formula is
\(p = \dfrac{|(\mathbf{d}_1 \times \mathbf{d}_2) \cdot \mathbf{a}|}{|\mathbf{d}_1 \times \mathbf{d}_2|}\),
where \(\mathbf{d}_1\) and \(\mathbf{d}_2\) are direction vectors of the lines, and \(\mathbf{a}\) is the vector joining a point on one line to a point on the other.
Here, for line \(AB\),
\(\mathbf{d}_1 = \overrightarrow{AB} = (\mathbf{j}+\mathbf{k})-\mathbf{i} = -\mathbf{i}+\mathbf{j}+\mathbf{k}\).
For line \(OC\),
\(\mathbf{d}_2 = \overrightarrow{OC} = \mathbf{i}+\mathbf{j}+\theta\mathbf{k}\).
Also take \(\mathbf{a}=\overrightarrow{OA}=\mathbf{i}\).
Now
\(\mathbf{d}_1\times\mathbf{d}_2 = (-\mathbf{i}+\mathbf{j}+\mathbf{k})\times(\mathbf{i}+\mathbf{j}+\theta\mathbf{k}) = (1-\theta)\mathbf{i}-(1+\theta)\mathbf{j}+2\mathbf{k}\).
So
\(p = \dfrac{|((1-\theta)\mathbf{i}-(1+\theta)\mathbf{j}+2\mathbf{k})\cdot\mathbf{i}|}{\sqrt{(1-\theta)^2+(1+\theta)^2+2^2}} = \dfrac{|1-\theta|}{\sqrt{2\theta^2+6}}\).
Given that the shortest distance is \(\dfrac{1}{\sqrt{2}}\), we have
\(\dfrac{|1-\theta|}{\sqrt{2\theta^2+6}}=\dfrac{1}{\sqrt{2}}\).
Squaring gives
\(2(1-\theta)^2 = 2\theta^2+6\).
So
\(1-2\theta+\theta^2 = \theta^2+3\),
hence
\(-2\theta = 2\)
and therefore
\(\theta = -1\).
Let the direction vectors of the two lines be found first.
For \(AB\),
\(\overrightarrow{AB}=(\mathbf{j}+\mathbf{k})-\mathbf{i}=-\mathbf{i}+\mathbf{j}+\mathbf{k}\).
For \(OC\),
\(\overrightarrow{OC}=\mathbf{i}+\mathbf{j}+\theta\mathbf{k}\).
The shortest distance between skew lines \(AB\) and \(OC\) is
\(p=\dfrac{|(\overrightarrow{AB}\times\overrightarrow{OC})\cdot \overrightarrow{OA}|}{|\overrightarrow{AB}\times\overrightarrow{OC}|}\),
where \(\overrightarrow{OA}=\mathbf{i}\).
Now calculate the cross product:
\(\overrightarrow{AB}\times\overrightarrow{OC}=(-\mathbf{i}+\mathbf{j}+\mathbf{k})\times(\mathbf{i}+\mathbf{j}+\theta\mathbf{k})\)
\(=(1-\theta)\mathbf{i}-(1+\theta)\mathbf{j}+2\mathbf{k}\).
Hence
\(|\overrightarrow{AB}\times\overrightarrow{OC}|=\sqrt{(1-\theta)^2+(1+\theta)^2+2^2}=\sqrt{2\theta^2+6}\).
Also
\((\overrightarrow{AB}\times\overrightarrow{OC})\cdot \overrightarrow{OA}=((1-\theta)\mathbf{i}-(1+\theta)\mathbf{j}+2\mathbf{k})\cdot \mathbf{i}=1-\theta\).
Therefore
\(p=\dfrac{|1-\theta|}{\sqrt{2\theta^2+6}}\).
Given \(p=\dfrac{1}{\sqrt{2}}\),
\(\dfrac{|1-\theta|}{\sqrt{2\theta^2+6}}=\dfrac{1}{\sqrt{2}}\).
Squaring both sides gives
\(2(1-\theta)^2=2\theta^2+6\).
Expanding and simplifying:
\(2(1-2\theta+\theta^2)=2\theta^2+6\)
\(2-4\theta+2\theta^2=2\theta^2+6\)
\(-4\theta=4\)
\(\theta=-1\).