2
$\begingroup$

I would like to define a real 3-D vector as, say, v = {x, y, z}, but I want it to have a fixed norm and not necessarily a unit norm. I would like to impose this condition on the vector v before I start using v in a calculation. In particular, I want Mathematica to insert x^2 + y^2 + z^2 = constant during a calculation using Solve or FullSimplify. I have used /. x^2 + y^2 + z^2 -> constant, but this simply evaluates the result for the given constant. Is there way to impose my condition before/during the calculation.

$\endgroup$
1
  • $\begingroup$ Use == instead of = as a condition in Solve or FullSimplify. $\endgroup$
    – whuber
    Mar 23, 2013 at 7:49

1 Answer 1

4
$\begingroup$

You can use the second argument of Simplify/FullSimplify to specify assumptions

v = {x, y, z};
Simplify[v.v, x^2 + y^2 + z^2 == C[0]]

or use Assuming[x^2 + y^2 + z^2 == C[0], ...].

$\endgroup$

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.