I'm trying to find the maximum value of
d[x_]:=4-(1/5)x^2-3*Cos[Pi*x/6]
For -5 < x < 5. Aside from x=0 which is a local minimum, when I use Solve, I can only get the numerical values of x, or an answer with a bunch of #'s that I don't understand, like so:
In[61]:= Solve[d'[x] == 0 && -5 <= x <= 5]
Out[61]= {{x -> 0}, {x -> Root[{5 \[Pi] Sin[(\[Pi] #1)/6] -
4 #1 &, -3.6804064036641044765}]}, {x -> Root[{5 \[Pi] Sin[(\[Pi] #1)/6] - 4 #1 &, 3.6804064036641044765}]}}
Should I just be trying to use different syntax? Instead, which one?
Nto get rid of those funny looking characters.SetSystemOptions[ "TypesetOptions" -> "NumericalApproximationForms" -> False]; Solve[d'[x] == 0 && -5 <= x <= 5, x] // Ngives{{x -> 0.}, {x -> -3.68041}, {x -> 3.68041}}Mathematica can not find exact answer so used Root object. – Nasser Aug 04 '19 at 11:41NMaximize[{4 - (1/5)*x^2 - 3*Cos[Pi*x/6], -5 <= x <= 5}, x]– Mariusz Iwaniuk Aug 04 '19 at 11:42d''[x] < 0. That will eliminate the minimum atx == 0– Bob Hanlon Aug 04 '19 at 17:40