consider the following situation but in 3D space.
In 3D the situation above would be two triangles "folded". The question I have is what's the length of the shortest curve joining $v$ and $w$, I've tried to formalize the problem as follow
$$ l(\alpha) = \lVert x + \alpha(y - x) - v \rVert + \lVert x + \alpha(y - x) - w \rVert $$
and I try minimizing the above by varying $0 \leq \alpha \leq 1$.
Differentiating and setting the result equal to $0$ yields
$$ \frac{dl}{d\alpha} = \left(\frac{x + \alpha(y - x) - v}{\lVert x + \alpha(y - x) - v \rVert} + \frac{x + \alpha(y - x) - w}{\lVert x + \alpha(y - x) - w \rVert}\right)^T(y-x) = 0 $$
and I later solve for $\alpha$. The thing about the equation above is that I can't find a simple way to isolate $\alpha$, is there a simple way to define the problem? or maybe an easy way to solve what I've already set up in closed form? (I think what I want is the length of the geodesic joining $v$ and $w$).


If you are asking about the shortest curve which lies on the surface of the triangles, then you should just unfold them on the plane, draw the straight line from $v$ to $w$ and then fold back again.