3
$\begingroup$

I recently asked this question about using Solve with cross product. Solve not working when doing cross-product When I use the units in the definition of the variables, I am not able to get an answer.

x = Quantity[{1, 0, 0}, "Meters"];
z = Quantity[{0, 0, 1}, "Newtons"*"Meters"]; 
Solve[z == Cross[x, y], y \[Element] FullRegion[3]]

The output is just: enter image description here

Thanks for your help!

$\endgroup$
1
  • $\begingroup$ Using :x = QuantityArray[{1, 0, 0}, "Meters"]; z = QuantityArray[{0, 0, 1}, "Newtons"*"Meters"]; Solve[z == Cross[x, y], y \[Element] FullRegion[3]] give no solution, looks like a bug ! $\endgroup$ Mar 2, 2023 at 10:07

1 Answer 1

1
$\begingroup$

I thought of a very crude solution to the original question:

xv = {1, 0, 0}; zv = {0, 0, 1};
Solve[zv == Cross[xv, {y1, y2, y3}], {y1, y2, y3} ]

Obviously, it is much less elegant than the accepted solution, and it shouldn't be posted there, but since no elegant solution has appeared yet here, I'll mention it:

x = Quantity[{1, 0, 0}, "Meters"];
z = Quantity[{0, 0, 1}, "Newtons"*"Meters"]; 
Solve[z == Cross[x, {y1, y2, y3}], {y1, y2, y3} ]

I think that to the original problem, Mathematica's trouble was that it didn't know (?) that it had to find three numbers. Here, the issue is the same, but there are no longer three numbers, but three quantities, which is why I think y \[Element] FullRegion[3] failed.

I suppose an elegant solution could be found if one could make a Region of Quantitys, but I haven't been able to make the two work together, neither to specify an abstract Quantity, that is, one with an unknown unit.

$\endgroup$
1
  • $\begingroup$ Thanks for this solution. It makes a lot of sense for both this problem and the previous one! $\endgroup$
    – user90441
    Mar 2, 2023 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.