for h=0.2
I'm trying to find the maximum value of
(-h^2/3)*(-1/x^2)
subject to
8.1 < x < 8.5
I've tried pretty much every combination of:
Functions:
FindMaximum[]
, MaxValue[]
Region (reg):
x \ [Element] Interval[{8.1,8.5}]
x \ [Element] Interval[8.1,8.5]
{x,8.1,8.5}
x, Interval[{8.1,8.5}]
x, Interval[8.1,8.5]
x \ [Element] Interval[{8.1,8.5}], x
x \ [Element] Interval[8.1,8.5], x
I even tried using 81/10 and 85/10 but that didn't work either..
Expression:
(-h^2/3)*(-1/x^2)
{(-h^2/3)*(-1/x^2) , reg}
Assuming[reg , -h^2/(3*x^2)
I'm getting errors like:
The variable
x\[Element]Interval[{81/10,17/2}]
cannot be localized so that it can be assigned to numerical values.The variable
x\[Element]Interval[{8.099999999,8.500000001}]
cannot be localized so that it can be assigned to numerical values.Constraints in
{x\[Element]Interval[{8.099999999,8.500000001}]}
are not all equality or inequality constraints. With the exception of integer domain constraints for linear programming, domain constraints or constraints withUnequal
(!=
) are not supported.
One time it told me the max value of this function was -7.34642395*10^-35
.
Honestly I know I'm doing something really stupid but I can't figure out what.
With[{h = 0.2}, FindMaximum[{(-h^2/3)*(-1/x^2), 8.1 <= x <= 8.5}, {x, 8.3}]]
? $\endgroup$With[{h = 0.2}, FindMaximum[{Abs[(h^2/3)*(-1/x^2)], 8.3 <= x <= 8.7}, x]]
={0.000193497, {x -> 8.30103}}
...............But...............Abs[(-0.2^2/(3*8.3^2))]
=0.0001935452654
$\endgroup$