I would like to know what is the first slot value in the following expression
h1 < Root[-c^3 d1^2 + #1^2 (-3 c d1^2 + 6 c d1 d2) + #1 (3 c^2 d1^2 -2 c^2 d1 d2) + #1^3 (d1^2 - 4 d1 d2 + d1^2) &, 1]
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityThe 1st argument of a root object is a pure function, let us call it pf
, which is why you see the slot object #1
, which represents the unknown. The 1st argument preserves the information needed to solve the equation pf[x] == 0
when all the unevaluated symbols in the root object become known quantities.
The 2nd argument is an ordinal identifying which of possibly many roots of the equation this particular root object represents. The ordering is the by the real part of the root (after evaluation — the evaluator evidently finds all the roots).
So, when you resolve all the unevaluated symbols, evaluating the root object returns the numeric value of the root indicated by the 2nd argument.
In your case, if we give c -> 1, d1 -> 1, d2 -> 1
, then
Block[{c, d1, d2},
Root[
-c^3 d1^2 +
#1^2 (-3 c d1^2 + 6 c d1 d2) +
#1 (3 c^2 d1^2 - 2 c^2 d1 d2) +
#1^3 (d1^2 - 4 d1 d2 + d1^2) &,
1]
/.
{c -> 1, d1 -> 1, d2 -> 1}]
1/2 (1 - Sqrt[5])
Since the 2nd argument is 1, this must be the smallest real root.
x
in this case. In fact, one can directly copy, paste and execute this commandd1 = 1;
d2 = 2;
h1 < Root[-c^3 d1^2 + #1^2 (-3 c d1^2 + 6 c d1 d2) + #1 (3 c^2 d1^2 - 2 c^2 d1 d2) + #1^3 (d1^2 - 4 d1 d2 + d1^2) &, 1]
obtainingh1 < 1/3 (84 - 28 Sqrt[21])
$\endgroup$h1, d1, d2
are real positive constants $\endgroup$c
a value.Root[-c^3 d1^2 + #1^2 (-3 c d1^2 + 6 c d1 d2) + #1 (3 c^2 d1^2 - 2 c^2 d1 d2) + #1^3 (d1^2 - 4 d1 d2 + d1^2) &, 1] /. {d1 -> 1, d2 -> 2, c -> 56}
evaluates to1/3 (84 - 28 Sqrt[21])
$\endgroup$c
.c
is a real positive constant too $\endgroup$