# Obtain the values of a function which are greater than 1

I have the following inequality

$F(\theta)=2e^{-\theta}[\cos\theta + \phi\sin\theta] - e^{-2\theta}[\cos2\theta + \phi \sin2\theta]>1$.

Herre $\theta\ge0$ is real variable and $\phi$ is a real constant, say 100. How should I proceed to find all the points such that $F(\theta)$ is greater than 1? How to find the maximum values of $F(\theta)$ as a function of $\theta$?

F[x_]=2Exp[-x](Cos[100*x] + Sin[100*x]/100) - Exp[-2x](Cos[2*100*x] + Sin[2*100*x]/100)

• Reduce[F[x] > 1, x]? Or Reduce[F[x] > 1, x, Reals]? – Michael E2 Jan 10 '18 at 5:10
• Plotting the function shows that it is highly oscillatory with large amplitude for negative x. – bbgodfrey Jan 10 '18 at 5:12
• The solution is unbounded as x approaches -Infinity. – bbgodfrey Jan 10 '18 at 5:20
• Sorry, forgot to mention that x is greater than or equal to zero. – H. Kenan Jan 10 '18 at 5:32

This is basically a duplicate of 5663. Here I apply a variant of the NDSolve answer to your question:

{max, one} = {"Maximum", "One"} /. Last @ Reap[
NDSolveValue[
{
v'[x]==F'[x],
v[0]==F[0],
WhenEvent[v'[x]<0,Sow[x, "Maximum"]],
WhenEvent[v[x]==1, Sow[x,"One"]]
},
v,
{x, 0, 1}
],
_,
Rule
];


Here is a plot showing the maximum, and the points where F[x] is 1:

Plot[
F[x],
{x, 0, 1},
Epilog -> {
}
]


• Thank you very much. Can I find the numerical values of those red dots (maxima )? If not all, at least some of them? – H. Kenan Jan 10 '18 at 6:03
• @user149973 If you run my code, than the numerical values of the x coordinates are contained in the max variable. – Carl Woll Jan 10 '18 at 6:05
• Thanks a lot! I tried to hit the upvote. But my score is not enough to do it. – H. Kenan Jan 10 '18 at 6:07
• thanks for the help. Little more help. If I change cos(x) and sin(x) to hyperbolic cosh(x) and sinh(x) and run the code, I find an error: "....should be a pair of numbers, or a Scaled or Offset form". Could you please help to sort it out? – H. Kenan Jan 11 '18 at 20:30
• @user149973 - look at the derivative of the modified function F2[x], Assuming[x > 0, Reduce[F2'[x] < 0, x, Reals] // Simplify] evaluates to True so the function is monotonically decreasing for x > 0Then the maximum occurs at x == 0 F2[0] is 1 – Bob Hanlon Apr 9 '18 at 3:08

A cheat using MeshShading for F(x)>1:

p = Plot[F[x], {x, 0, 1}, GridLines -> {None, {1}},
MeshFunctions -> (#2 &), Mesh -> {{1}},
pts = p[[1, 1, 1]];
lns = Cases[p[[1]], {Black, Line[x__]} :> x, Infinity];
gl = MinMax[#[[All, 1]]] & /@ (pts[[#]] & /@ lns)
Plot[F[x], {x, 0, 1}, MeshFunctions -> (#2 &), Mesh -> {{1}},
MeshShading -> {Red, Black}, GridLines -> {Flatten[gl], {1}},
GridLinesStyle -> Blue]


Approximate end-points:

{{2.04082*10^-8, 0.0156412}, {0.0477311, 0.0621775}, {0.0635002,
0.0778018}, {0.111333, 0.124225}, {0.127114, 0.139847}, {0.17508,
0.186129}, {0.190876, 0.201735}, {0.239076, 0.247788}, {0.254898,
0.263366}, {0.303622, 0.308897}, {0.319546, 0.324378}}