I am trying to find the greatest value of the function $\sin^{2024}x + \cos^{2025}x$. I tried
Maximize[Sin[x]^2024 + Cos[x]^2025, x] NMaximize[Sin[x]^2024 + Cos[x]^2025, x] For a long time, I have not yet the result. How can I get the result?
You can put $t = \sin x$, $-1 \leqslant t \leqslant 1$. Then $\cos x = \sqrt{1-t^2}$ or $\cos x = -\sqrt{1-t^2}$
NMaximize[{t^2024 + Sqrt[1 - t^2]^2025, -1 <= t <= 1}, t] {1., {t -> 7.707*10^-321}}
NMaximize[{t^2024 - Sqrt[1 - t^2]^2025, -1 <= t <= 1}, t] {1., {t -> -1.}}
The standard Calc I way, with exact answers:
cps = Solve[#[[1]] == 0, x, Reals, Method -> Reduce] & /@ FactorList@D[Sin[x]^2024 + Cos[x]^2025, x]; (* < 1 sec. *) vals = Sin[x]^2024 + Cos[x]^2025 /. Join @@ cps; vals /. ConditionalExpression[v_, c_] :> (* C[1] in Z *) Quiet@Simplify[v, c, TimeConstraint -> 0.1] // MinMax (* < 1 sec. *) (* {-1, 1} *) Math ans.: In magnitude $\sin ^{2024}(x)+\cos ^{2025}(x)$ is less than or equal to $\sin ^{2} x+\cos ^{2}x = 1$. And it's easy to see that is attained when $\cos x = \pm 1$, at which points the function value is also $\pm1$ respectively. (The max. is also attained when $\sin x = \pm 1$, but the max. value is still the same, obviously.)
Solve[Sin[x]^2024 + Cos[x]^2025 == 1, x, Reals] and Solve[Sin[x]^2024 + Cos[x]^2025 == -1, x, Reals, Method -> Reduce]. $\endgroup$