0
$\begingroup$

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]

$\endgroup$
5
  • $\begingroup$ 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[21]) $\endgroup$
    – FRANCESCO
    Dec 29, 2019 at 18:28
  • $\begingroup$ Both h1, d1, d2 are real positive constants $\endgroup$
    – FRANCESCO
    Dec 29, 2019 at 18:36
  • $\begingroup$ @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[21]) $\endgroup$
    – Bob Hanlon
    Dec 29, 2019 at 18:51
  • $\begingroup$ I forgot about c. c is a real positive constant too $\endgroup$
    – FRANCESCO
    Dec 29, 2019 at 19:01
  • $\begingroup$ This answer will explain root objects to you. $\endgroup$
    – m_goldberg
    Dec 30, 2019 at 4:10

1 Answer 1

1
$\begingroup$

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[5])

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

$\endgroup$
3
  • $\begingroup$ 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]$ . $\endgroup$
    – FRANCESCO
    Dec 30, 2019 at 10:51
  • $\begingroup$ 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 $ $\endgroup$
    – FRANCESCO
    Dec 30, 2019 at 10:51
  • $\begingroup$ @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. $\endgroup$
    – m_goldberg
    Dec 30, 2019 at 16:00

Your Answer

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

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