In order to find the extrema, we need to solve the equation
$$\frac{d}{d x} f{\left(x \right)} = 0$$
(the derivative equals zero),
and the roots of this equation are the extrema of this function:
$$\frac{d}{d x} f{\left(x \right)} = $$
the first derivative$$- \cos{\left(x \right)} + \frac{\tan^{2}{\left(x \right)}}{x} - \frac{- x + \tan{\left(x \right)}}{x^{2}} = 0$$
Solve this equationThe roots of this equation
$$x_{1} = 13.7103766513378$$
$$x_{2} = 45.2692689800094$$
$$x_{3} = 99.1780792159165$$
$$x_{4} = 83.0211302986392$$
$$x_{5} = 20.0456166959086$$
$$x_{6} = 76.731703756933$$
$$x_{7} = -48.4172721563853$$
$$x_{8} = 32.6695676392345$$
$$x_{9} = 51.5647356400495$$
$$x_{10} = 80.3447087346139$$
$$x_{11} = -92.4541638982143$$
$$x_{12} = -10.5283877748772$$
$$x_{13} = -14.5629043518023$$
$$x_{14} = 17.675544751362$$
$$x_{15} = 61.5175136492539$$
$$x_{16} = 1493.91489693543$$
$$x_{17} = -70.930100123665$$
$$x_{18} = 23.9180746722454$$
$$x_{19} = -83.483265017145$$
$$x_{20} = -96.038880810861$$
$$x_{21} = -86.16560960098$$
$$x_{22} = -67.2961450984475$$
$$x_{23} = 48.9720455511274$$
$$x_{24} = -98.7422477693976$$
$$x_{25} = 64.1504954681049$$
$$x_{26} = 11.4608266550795$$
$$x_{27} = -79.8764998162761$$
$$x_{28} = -27.04454788015$$
$$x_{29} = 38.971246687766$$
$$x_{30} = -54.7117340971332$$
$$x_{31} = -29.516806008253$$
$$x_{32} = 89.3099503974961$$
$$x_{33} = 74.0681086793484$$
$$x_{34} = -20.7946535700566$$
$$x_{35} = -33.3037402798478$$
$$x_{36} = -35.8209580945664$$
$$x_{37} = -52.1077748967443$$
$$x_{38} = 70.4415467276822$$
$$x_{39} = -8.37839374690101$$
$$x_{40} = 30.1732794211017$$
$$x_{41} = -89.7608179516488$$
$$x_{42} = 92.8997907669398$$
$$x_{43} = -2.47351749621617$$
$$x_{44} = -39.568478688083$$
$$x_{45} = -64.6547752099016$$
$$x_{46} = -58.3805640516404$$
$$x_{47} = 55.2439678724582$$
$$x_{48} = -61.0045681868314$$
$$x_{49} = -4.06796070202516$$
$$x_{50} = 67.7923138841664$$
$$x_{51} = -45.8368540585271$$
$$x_{52} = -77.2063178228991$$
$$x_{53} = -42.1206330735756$$
$$x_{54} = 26.3622989497276$$
$$x_{55} = 42.7022928266836$$
The values of the extrema at the points:
(13.710376651337784, -1.74990601464325)
(45.26926898000935, -1.88426276933223)
(99.1780792159165, -0.0691846821658562)
(83.02113029863915, -1.92222537226944)
(20.0456166959086, -1.80377116506546)
(76.73170375693304, -1.9180913909594)
(-48.4172721563853, -1.8892355015881)
(32.669567639234465, -1.85687158585879)
(51.56473564004946, -1.89370407662581)
(80.34470873461386, -0.0794685884508887)
(-92.45416389821432, -1.92754199787997)
(-10.528387774877206, -1.70454518326009)
(-14.562904351802331, -0.240691971476041)
(17.675544751361993, -0.212713684311768)
(61.517513649253935, -0.0946945315073272)
(1493.9148969354255, -0.011456219865184)
(-70.93010012366503, -0.0862497416241246)
(23.918074672245385, -0.17514043834615)
(-83.483265017145, -0.0774912179827233)
(-96.03888081086099, -0.0706658235072578)
(-86.16560960097998, -1.92410408680473)
(-67.29614509844748, -1.91072074380383)
(48.97204555112736, -0.109942751950698)
(-98.74224776939764, -1.93061433472546)
(64.15049546810489, -1.90787234572801)
(11.460826655079458, -0.280101245395084)
(-79.87649981627605, -1.92022548530831)
(-27.044547880150045, -0.161777548023469)
(38.97124668776598, -1.87238457707619)
(-54.71173409713315, -1.89774577888521)
(-29.51680600825305, -1.84713107877411)
(89.30995039749605, -1.92587298238211)
(74.06810867934836, -0.0838321279683099)
(-20.79465357005665, -0.191657401395929)
(-33.303740279847794, -0.141352241571297)
(-35.82095809456636, -1.86518682472331)
(-52.10777489674433, -0.105569960666872)
(70.44154672768221, -1.91335796606589)
(-8.378393746901006, -0.340722060743889)
(30.173279421101697, -0.150704537140616)
(-89.76081795164879, -0.0738817739672398)
(92.89979076693976, -0.072229011694115)
(-2.47351749621617, -0.699553755196199)
(-39.56847868808304, -0.126357219324199)
(-64.6547752099016, -0.0916557142382977)
(-58.38056405164039, -0.0979989547585743)
(55.24396787245825, -0.101608210744567)
(-61.00456818683137, -1.90478427696177)
(-4.0679607020251645, -1.47231112804526)
(67.7923138841664, -0.0888498984460918)
(-45.836854058527116, -0.114799392692209)
(-77.20631782289905, -0.0815773704077247)
(-42.120633073575554, -1.87868789765566)
(26.36229894972762, -1.83552691884256)
(42.70229282668361, -0.120231686165023)
Intervals of increase and decrease of the function:Let's find intervals where the function increases and decreases, as well as minima and maxima of the function, for this let's look how the function behaves itself in the extremas and at the slightest deviation from:
Minima of the function at points:
$$x_{1} = 13.7103766513378$$
$$x_{2} = 45.2692689800094$$
$$x_{3} = 83.0211302986392$$
$$x_{4} = 20.0456166959086$$
$$x_{5} = 76.731703756933$$
$$x_{6} = -48.4172721563853$$
$$x_{7} = 32.6695676392345$$
$$x_{8} = 51.5647356400495$$
$$x_{9} = -92.4541638982143$$
$$x_{10} = -10.5283877748772$$
$$x_{11} = -86.16560960098$$
$$x_{12} = -67.2961450984475$$
$$x_{13} = -98.7422477693976$$
$$x_{14} = 64.1504954681049$$
$$x_{15} = -79.8764998162761$$
$$x_{16} = 38.971246687766$$
$$x_{17} = -54.7117340971332$$
$$x_{18} = -29.516806008253$$
$$x_{19} = 89.3099503974961$$
$$x_{20} = -35.8209580945664$$
$$x_{21} = 70.4415467276822$$
$$x_{22} = -61.0045681868314$$
$$x_{23} = -4.06796070202516$$
$$x_{24} = -42.1206330735756$$
$$x_{25} = 26.3622989497276$$
Maxima of the function at points:
$$x_{25} = 99.1780792159165$$
$$x_{25} = 80.3447087346139$$
$$x_{25} = -14.5629043518023$$
$$x_{25} = 17.675544751362$$
$$x_{25} = 61.5175136492539$$
$$x_{25} = 1493.91489693543$$
$$x_{25} = -70.930100123665$$
$$x_{25} = 23.9180746722454$$
$$x_{25} = -83.483265017145$$
$$x_{25} = -96.038880810861$$
$$x_{25} = 48.9720455511274$$
$$x_{25} = 11.4608266550795$$
$$x_{25} = -27.04454788015$$
$$x_{25} = 74.0681086793484$$
$$x_{25} = -20.7946535700566$$
$$x_{25} = -33.3037402798478$$
$$x_{25} = -52.1077748967443$$
$$x_{25} = -8.37839374690101$$
$$x_{25} = 30.1732794211017$$
$$x_{25} = -89.7608179516488$$
$$x_{25} = 92.8997907669398$$
$$x_{25} = -2.47351749621617$$
$$x_{25} = -39.568478688083$$
$$x_{25} = -64.6547752099016$$
$$x_{25} = -58.3805640516404$$
$$x_{25} = 55.2439678724582$$
$$x_{25} = 67.7923138841664$$
$$x_{25} = -45.8368540585271$$
$$x_{25} = -77.2063178228991$$
$$x_{25} = 42.7022928266836$$
Decreasing at intervals
$$\left[89.3099503974961, \infty\right)$$
Increasing at intervals
$$\left(-\infty, -98.7422477693976\right]$$