For nonparallel lines, is perpendicular to both direction vectors. Every displacement between the lines differs from by a vector in their span, so its component along is fixed. Varying the two parameters cancels the component in that span. The shortest distance between skew lines is therefore
This also gives zero for intersecting nonparallel lines. For parallel lines the denominator vanishes and the correct separate formula is .
The given lines have vector forms
Here and . Their scalar triple product is , giving
As a constructive check, the closest parameters are and , where the connecting vector is and is perpendicular to both lines.
The real logarithm requires . The identically zero function is a solution and must be retained before dividing by . For a nonzero solution, divide by and make the Bernoulli differential equation substitution . This gives
Integration yields . Consequently
with each nonzero branch restricted to an interval where its denominator is nonzero. The right-hand side of the first-order equation is locally Lipschitz in for , so a nonzero solution cannot cross the zero solution at a finite positive .
For , divide by to obtain the linear ordinary differential equation . An integrating factor is on either interval not containing zero. Thus and
Substituting gives directly. No classical solution can include , since the original equation there would assert ; constants on the two separate intervals need not agree.

There are unlisted articles, also show them or only show them.