in a specified interval, for example Interval[{0,10}].
This code doesn’t work:
NMaximize[{Sqrt[Abs[x]]*BesselJ[1, x], x \[Element] Interval[{0, 10}]}, x]
It returns the peculiar error that “the objective function … should be scalar-valued.”
What is the correct way to go about this, and why does what I tried not work?
Incidentally, does Mathematica compute maxima rigorously to however many significant figures? Such that if mathematica says the maximum of a function is 1.57, you can say with certainty that it is less that 1.6?