0
$\begingroup$

Let us consider a function f[x_,a_]:=Exp[x]*Sin[a*x/5].The question is: how to find the minimum value of a parameter a > 0 s.t. f[x,a] has at least 43 maxima in the range x >= -9*Pi/4 && x <= 15*Pi/4? Here is my unexpectedly complicated answer done in 14.0 on Windows 10. We begin from the finding all the maxima by

Reduce[D[Exp[x]*Sin[a*x/5], x] == 0 && 
D[Exp[x]*Sin[a*x/5], {x, 2}] < 0 && a > 0, x, Reals]

C[1] \[Element] Integers && a > 0 && x == (10 ArcTan[(5 + a Sqrt[(25 + a^2)/a^2])/a] + 10 \[Pi] C[1])/a

Then we solve a system of inequalities to find the values of C[1] for all the maxima in the given range

Reduce[(-9*Pi)/4 <= (10*ArcTan[(5 - a*Sqrt[(25 + a^2)/a^2])/a] + 10*Pi*C[1])/a && 
(10*ArcTan[(5-a*Sqrt[(25 + a^2)/a^2])/a] + 10*Pi*C[1])/a <= (15*Pi)/4 &&  a > 0,C[1],Integers]

a | C[1]) \[Element] Integers && a >= 1 && (-9 a \[Pi] - 40 ArcTan[(5 + Sqrt[25 + a^2])/a])/ ( 40 \[Pi]) <= C[1] <= (3 a \[Pi] - 8 ArcTan[(5 + Sqrt[25 + a^2])/a])/(8 \[Pi])

The above range should includes at least 43 values of integer C[1], Hence, its length should be equal to 43 if the ends are not integer and 42 otherwise. We come to

Reduce[(3 a \[Pi] - 8 ArcTan[(5 + Sqrt[25 + a^2])/a])/
(8 \[Pi]) - (-9 a \[Pi] - 40 ArcTan[(5 + Sqrt[25 + a^2])/a])/
(40 \[Pi]) >= 43 && a >= 1 && (3  a  \[Pi] - 
8  ArcTan[(5 + Sqrt[25 + a^2])/a])/(8  \[Pi]) \[NotElement]Integers && 
(-9 a \[Pi] - 40 ArcTan[(5 + Sqrt[25 + a^2])/a])/
(40 \[Pi]) \[NotElement] Integers, a, Reals]

(-9 a \[Pi] - 40 ArcTan[(5 + Sqrt[25 + a^2])/a])/( 40 \[Pi]) \[NotElement] Integers && ( 3 a \[Pi] - 8 ArcTan[(5 + Sqrt[25 + a^2])/a])/( 8 \[Pi]) \[NotElement] Integers && a >= 215/3

Its verification

% /. a -> 215/3

True

Let us turn to the second possibility

Reduce[(3  a  \[Pi] -  8  ArcTan[(5 + Sqrt[25 + a^2])/ a])/(8  \[Pi])- 
(-9  a  \[Pi] -  40  ArcTan[(5 + Sqrt[25 + a^2])/a])/(40  \[Pi]) >= 42 && 
a >= 1 && (3  a  \[Pi] - 8  ArcTan[(5 + Sqrt[25 + a^2])/a])/(8  \[Pi]) \[Element] 
Integers && (-9  a  \[Pi] -  40  ArcTan[(5 + Sqrt[25 + a^2])/a])/(40  \[Pi]) \[Element] Integers, a, Reals]

((3 a \[Pi] - 8 ArcTan[(5 + Sqrt[25 + a^2])/a])/( 8 \[Pi]) | (-9 a \[Pi] - 40 ArcTan[(5 + Sqrt[25 + a^2])/a])/( 40 \[Pi])) \[Element] Integers && a >= 70

The above result is not costructive in view of

%/.a->70

False

The question is: how to obtain a constructive answer for the second case?

$\endgroup$

2 Answers 2

1
$\begingroup$
$Version

(* "14.0.0 for Mac OS X ARM (64-bit) (December 13, 2023)" *)

f[x_, a_] := Exp[x]*Sin[a*x/5]

maxi = Assuming[a > 0,
  SolveValues[D[f[x, a], x] == 0 &&
      D[f[x, a], {x, 2}] < 0 && a > 0, x, Reals,
     Method -> Reduce][[1]] // Simplify]

enter image description here

If you specify the domain as Integers then a must also be an integer. Instead just include C[1] ∈ Integers as a constraint.

cons = Reduce[-9*Pi/4 <= Normal[maxi] <= 15*Pi/4 &&
   a > 0 && C[1] ∈ Integers, C[1]]

(* C[1] ∈ Integers && 
 a > 0 && (-9 a π - 40 ArcTan[(5 + Sqrt[25 + a^2])/a])/(40 π) <= C[
  1] <= (3 a π - 8 ArcTan[(5 + Sqrt[25 + a^2])/a])/(8 π) *)

mina = MinValue[{a, cons[[-1, -1]] - cons[[-1, 1]] >= 43}, a]

(* 215/3 *)

(maximums = SolveValues[D[f[x, mina], x] == 0 &&
     D[f[x, mina], {x, 2}] < 0 &&
     -9*Pi/4 <= x <= 15*Pi/4, x, Reals,
    Method -> Reduce])[[1 ;; 3]]

(* {6/43 ArcTan[1/43 (3 + Sqrt[1858])], 
 1/43 (-96 π + 6 ArcTan[1/43 (3 + Sqrt[1858])]), 
 1/43 (-90 π + 6 ArcTan[1/43 (3 + Sqrt[1858])])} *)

Length@maximums

(* 43 *)
$\endgroup$
0
$\begingroup$

To solve the given system of equations exactly and explicitly in the Wolfram Language, you can use the Reduce function. Here's how you can do it:

Reduce[{D[Exp[x]*Sin[a*x/5], x] == 0, D[Exp[x]*Sin[a*x/5], {x, 2}] < 0, a > 0}, x, Reals]

Explanation:

  1. D[Exp[x]*Sin[a*x/5], x] == 0 - This represents the first derivative of the function Exp[x]*Sin[a*x/5] being equal to zero.
  2. D[Exp[x]*Sin[a*x/5], {x, 2}] < 0 - This represents the second derivative of the function Exp[x]*Sin[a*x/5] being less than zero.
  3. a > 0 - This places a constraint on the parameter a, ensuring it is greater than zero.
  4. x - This is the variable we want to solve for.
  5. Reals - This specifies that we are interested in real solutions for x.

By using Reduce, you're asking the Wolfram Language to find all possible real solutions that satisfy these conditions.

After executing this code, the Wolfram Language will provide the exact and explicit solution(s) for x that satisfy the given conditions.

$\endgroup$
1
  • $\begingroup$ Did you use an AI to generate the last five of your questions? Please note that this is not allowed on this site. $\endgroup$
    – Domen
    Commented Apr 2 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.