I have to find the positive range for the derivatives of a lot of functions. I have a very inefficient solution.
At the moment I am using a For loop to find the times where the function is positive and use Split as used in #23608 to find the intervals.
Full code:
f[t_] := Sqrt[0.9604 + 0.0099 (Cos[1. t] + Cos[3.14159 t])^2]
ptimes = {};
inc = 0.01;
For[pt = 0, pt <= 10, pt = pt + inc,
If[(D[f[z],z]/.{z -> pt}) >= 0, AppendTo[ptimes, pt] && Continue[], Continue[]]
]
int = {Min[#], Max[#]} & /@ Split[ptimes, #2 - #1 <= inc &]
({{0, 0}, {0.76, 1.09}, {1.47, 1.9}, {2.28, 3.01}, {3.8, 4.}, {4.01,
4.08}, {4.41, 4.89}, {5.31, 6.02}, {6.83, 7.07}, {7.34,
7.89}, {8.35, 9.03}, {9.87, 10.}})
Although this works, but I am sure there are efficient ways to do this. Appreciate your thoughts.
Note: Using Reduce or Solve barely works for me when some of the arguments inside are irrational.