Pipe-fitting problem 3D I have a 3D pipe-fitting problem for which I was able to write the following equations:

$$
y = \tan (a)\sqrt{x^2 + z^2}\\
z = \tan (b)\sqrt{x^2 + y^2}\\
y = \sin (a)\sqrt{x^2 + y^2 + z^2}\\
z = \sin (b)\sqrt{x^2 + y^2 + z^2}
$$

$x &gt; 0$ and known; $y$ and $z \ge 0$; $0 &lt; a$, $b &lt; 90º$


what choices for $a$ and $b$ will minimize $y + z$?
if $a$ and $b$ are constrained to $45º$, $22.5º$ or $11.25º$, what choices minimize $y + z$?


I tried rearranging and combining these equations, and I got:
$$
y = \frac{x \sin(a)}{\sqrt{cos^2(a) - sin^2(b)}}\\
z = \frac{x \sin(b)}{\sqrt{cos^2(b) - sin^2(a)}}
$$

But these equations behave strangely: as $a$ and $b$ go to $0$, $y$ and $z$ go to $0$; and in my problem, that means the pipes never meet.  

Here is the physical problem: I have a vertical pipe, and a pipe aligned on the $z$-axis, separated by a fixed horizontal distance $x$.  The length of the pipes can be varied. I need to connect the ends with one pipe and $2$ fittings from $0º$ to $90º$. 

There is an easy solution with one $45º$ fitting, and one $90º$ fitting, but I am trying to avoid it.

So, did I model the problem correctly?  Were my reduced equations correct?  I am also having trouble seeing which variables are independent.  Any help would be appreciated.
Please look at my blog at forexsg.wordpress.com/2014/06/19/solution-for-3d-pipe-fitting-connection-vertical-wye-tee-and-elbow-or-another-wye-tee/

I descirbed my solution there. /_a and /_b cannot go to zero at the same time. When a is increasing b is decreasing. They are inverse of each other. There are more variables than the equations can define. Two equations cannot define 5 variables. Even with two know angles you need to define at least one other distance x,y or z . So you have to fix two angles and one of the distances x y or z .
Please look at my blog at forexsg.wordpress.com/2014/06/19/solution-for-3d-pipe-fitting-connection-vertical-wye-tee-and-elbow-or-another-wye-tee/

I descirbed my solution there. /_a and /_b cannot go to zero at the same time. When a is increasing b is decreasing. They are inverse of each other. There are more variables than the equations can define. Two equations cannot define 5 variables. Even with two know angles you need to define at least one other distance x,y or z . So you have to fix two angles and one of the distances x y or z .