0

The following two gives completely different output from Mathematica. The online document does not seem to require a pair of curly braces. https://reference.wolfram.com/language/ref/MaxValue.html

Tau = 10;
Diff = 1/3;
phi[tau_] := 0.5 Sin[Pi tau/(Tau + 2 Diff)] + 0.5 Sin[Pi (tau + 2 Diff)/(Tau + 2 Diff)];
In[1]=MaxValue[phi[tau], {tau} \[Element] Interval[{0.0, 10.0}]]
In[2]=MaxValue[phi[tau], tau \[Element] Interval[{0.0, 10.0}]]

Output:

Output[1]=0.995185

MaxValue::objfs: The objective function {0.5 Sin[(3 \[Pi] Subscript[tau, 1])/32]+0.5 Sin[3/32 \[Pi] (2/3+Subscript[tau, <<1>>])]} should be scalar-valued. >>

Out[2]=MaxValue[0.5 Sin[(3 \[Pi] tau)/32] + 0.5 Sin[3/32 \[Pi] (2/3 + tau)], tau \[Element] Interval[{-2.22507*10^-308, 10.}]]
user2008151314
  • 680
  • 6
  • 10

1 Answers1

1

The documentation does specify that you need curly braces when using the region specification method to define the constrains. In the Details and Options section fourth method of defining constraints with a region specification shows that the curly brackets are necessary.

Hope this helps.

Edmund
  • 488
  • 4
  • 21