# How can conditional expressions be used in calculations?

I have a fairly simple system whose solution involves conditional expressions. The system is

A = {{3, 1}, {2, 3}, {1, 5}};
qVec = Array[q, 3];
needs = (qVec^2).A;
k = {2, 3};
Solve[Flatten[{needs == k, Thread[qVec >= 0]}], qVec]


and I get the following output

{{q[2] -> ConditionalExpression[Sqrt[1 - 2 q[1]^2], 0 < q[1] < 1/Sqrt[2]],
q[3] -> ConditionalExpression[Sqrt[3 - q[1]^2 - 3 (1 - 2 q[1]^2)]/
Sqrt[5], 0 < q[1] < 1/Sqrt[2]]}, {q[1] -> 0, q[2] -> 1,
q[3] -> 0}, {q[1] -> 1/Sqrt[2], q[2] -> 0, q[3] -> 1/Sqrt[2]}}


I have two questions:

• Why do I get three solutions when inequality signs in the first would include the last two?
• How can I use the ConditionalExpression to obtain a Table of the points solving these equations? I want to do this automatically as A or k change.
• Reduce[{needs == k, qVec >= 0}, qVec] – cvgmt Oct 28 at 9:43

ContourPlot3D shows one solution (intersection of the two surfaces)
ContourPlot3D[Evaluate[needs - k]  ,  {q[1], 0, 2}, {q[2], 0, 1}, {q[3], 0, 2},AxesLabel -> Automatic]

cond = Reduce[Flatten[{needs - k == 0, Thread[qVec >= 0]}] , { q[3]}]