# What is the first slot value in this expression?

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]

• I think there is not such an x in this case. In fact, one can directly copy, paste and execute this command d1 = 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] obtaining h1 < 1/3 (84 - 28 Sqrt) – FRANCESCO Dec 29 '19 at 18:28
• Both h1, d1, d2 are real positive constants – FRANCESCO Dec 29 '19 at 18:36
• @FRANCESCO - you must have also given 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 to 1/3 (84 - 28 Sqrt) – Bob Hanlon Dec 29 '19 at 18:51
• I forgot about c. c is a real positive constant too – FRANCESCO Dec 29 '19 at 19:01
• This answer will explain root objects to you. – m_goldberg Dec 30 '19 at 4:10

The 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)

Since the 2nd argument is 1, this must be the smallest real root.

• The fact is that in my case i cannot figure where the function or the block is. The complete command is this: $\text{Reduce}\left[-\frac{h_1 \left(c-h_1\right) \left(d_1^2 \left(c-h_3\right) \left(2 c-h_1-h_3\right)+d_2 d_1 \left(h_1+h_3\right) \left(2 c-h_1-h_3\right)+d_2^2 h_3 \left(h_1+h_3\right)\right)}{\left(h_1+h_3\right) \left(-2 c+h_1+h_3\right) \left(d_1 \left(c-h_3\right)+d_2 h_1\right) \left(d_1 \left(c-h_1\right)+d_2 h_3\right)}=\frac{1}{2}\land c>0\land h_1>0\land h_3>0\land h_1<c\land h_3<c\land d_1>0\land d_2>0,\left\{h_1,h_3\right\},\mathbb{R}\right]$ . – FRANCESCO Dec 30 '19 at 10:51
• The output result starts with $d_1>0 \\ \&\&\left(\left(0<d_2\leq 2 d_1-\sqrt{3} \sqrt{d_1^2}\&\&c>0 \\ \&\&\left(\left(0<h_1<\text{Root}\left[\text{$\#$1}^3 \left(d_1^2-4 d_2 d_1+d_2^2\right)+\text{$\#$1}^2 \left(6 c d_1 d_2-3 c d_1^2\right)+\text{$\#$1} \cdot \\ \cdot \left(3 c^2 d_1^2-2 c^2 d_1 d_2\right)-c^3 d_1^2\&,1\right]\&\&\right.\right.\right.\right. \dots$ – FRANCESCO Dec 30 '19 at 10:51
• @FRANCESCO. It looks to me that the content of the two above comments should be an edit to your question. They are certainly not appropriate comments to this answer. – m_goldberg Dec 30 '19 at 16:00