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$$- \frac{\pi \sin{\left(\pi x \right)}}{x - 2} - \frac{\cos{\left(\pi x \right)}}{\left(x - 2\right)^{2}} = 0$$
Solve this equationThe roots of this equation
$$x_{1} = -33.9971853759713$$
$$x_{2} = -65.9985099608267$$
$$x_{3} = 43.9975874984823$$
$$x_{4} = 57.9981906541763$$
$$x_{5} = -57.9983112819197$$
$$x_{6} = 77.9986668109399$$
$$x_{7} = 37.9971853759713$$
$$x_{8} = 89.99884861287$$
$$x_{9} = 17.9936657542665$$
$$x_{10} = -13.9936657542665$$
$$x_{11} = 39.9973335283242$$
$$x_{12} = 79.9987009960438$$
$$x_{13} = 61.9983112819197$$
$$x_{14} = -63.9984648067446$$
$$x_{15} = 67.9984648067446$$
$$x_{16} = -23.9961026419285$$
$$x_{17} = -49.9980514670226$$
$$x_{18} = -11.9927602767546$$
$$x_{19} = -91.9989221068275$$
$$x_{20} = 75.9986307779258$$
$$x_{21} = 15.9927602767546$$
$$x_{22} = -77.998733471837$$
$$x_{23} = 3.9484545394208$$
$$x_{24} = -67.9985525345655$$
$$x_{25} = -17.9949330850375$$
$$x_{26} = 91.9988741996823$$
$$x_{27} = -39.9975874984823$$
$$x_{28} = -99.999006648613$$
$$x_{29} = -71.9986307779258$$
$$x_{30} = 71.9985525345655$$
$$x_{31} = -87.9988741996823$$
$$x_{32} = -61.998416830397$$
$$x_{33} = -95.9989661030993$$
$$x_{34} = 29.9963810744755$$
$$x_{35} = 21.9949330850375$$
$$x_{36} = 7.98308133447286$$
$$x_{37} = -93.998944563268$$
$$x_{38} = 87.9988218359416$$
$$x_{39} = 35.9970197910376$$
$$x_{40} = -37.9974668634628$$
$$x_{41} = -83.9988218359416$$
$$x_{42} = -97.9989867813195$$
$$x_{43} = -21.9957777888215$$
$$x_{44} = -73.9986668109399$$
$$x_{45} = -1.97456187738277$$
$$x_{46} = -47.9979735215724$$
$$x_{47} = -27.9966223736938$$
$$x_{48} = 73.9985927430015$$
$$x_{49} = 5.97456187738277$$
$$x_{50} = 53.9980514670226$$
$$x_{51} = 11.9898610286182$$
$$x_{52} = -35.9973335283242$$
$$x_{53} = -69.9985927430015$$
$$x_{54} = -3.98308133447286$$
$$x_{55} = 27.9961026419285$$
$$x_{56} = 47.9977972952556$$
$$x_{57} = -29.9968335041224$$
$$x_{58} = 81.998733471837$$
$$x_{59} = 31.9966223736938$$
$$x_{60} = -81.9987937838856$$
$$x_{61} = -9.99155260376159$$
$$x_{62} = -5.98732145729946$$
$$x_{63} = -85.99884861287$$
$$x_{64} = -55.998253047962$$
$$x_{65} = -53.9981906541763$$
$$x_{66} = 9.98732145729946$$
$$x_{67} = 25.9957777888215$$
$$x_{68} = 49.9978890801189$$
$$x_{69} = -51.9981236383186$$
$$x_{70} = -45.9978890801189$$
$$x_{71} = 41.9974668634628$$
$$x_{72} = 93.9988986739972$$
$$x_{73} = 0.0515454605792004$$
$$x_{74} = -31.9970197910376$$
$$x_{75} = 45.9976971654773$$
$$x_{76} = 97.998944563268$$
$$x_{77} = 69.9985099608267$$
$$x_{78} = 95.9989221068275$$
$$x_{79} = 63.9983657586429$$
$$x_{80} = -15.9943698713525$$
$$x_{81} = -89.9988986739972$$
$$x_{82} = 23.9953938487289$$
$$x_{83} = 83.9987643633963$$
$$x_{84} = 19.9943698713525$$
$$x_{85} = 85.9987937838856$$
$$x_{86} = 65.998416830397$$
$$x_{87} = -75.9987009960438$$
$$x_{88} = -19.9953938487289$$
$$x_{89} = -79.9987643633963$$
$$x_{90} = -43.9977972952556$$
$$x_{91} = 51.9979735215724$$
$$x_{92} = 13.9915526037616$$
$$x_{93} = 59.998253047962$$
$$x_{94} = -25.9963810744755$$
$$x_{95} = -59.9983657586429$$
$$x_{96} = 55.9981236383186$$
$$x_{97} = -7.98986102861818$$
$$x_{98} = 33.9968335041224$$
$$x_{99} = 99.9989661030993$$
$$x_{100} = -41.9976971654773$$
The values of the extrema at the points:
(-33.99718537597127, -0.0277799497253893*cos(1.99718537597127*pi))
(-65.99850996082668, -0.014706204600308*cos(1.99850996082668*pi))
(43.99758749848229, 0.0238108915193316*cos(1.99758749848229*pi))
(57.998190654176284, 0.0178577198355501*cos(1.99819065417628*pi))
(-57.99831128191967, -0.0166671357682253*cos(1.99831128191967*pi))
(77.99866681093987, 0.0131581255561716*cos(1.99866681093987*pi))
(37.99718537597127, 0.0277799497253893*cos(1.99718537597127*pi))
(89.99884861287003, 0.011363785046771*cos(1.99884861287003*pi))
(17.993665754266548, 0.0625247529468493*cos(1.99366575426655*pi))
(-13.993665754266546, -0.0625247529468493*cos(1.99366575426655*pi))
(39.99733352832425, 0.026317636190302*cos(1.99733352832425*pi))
(79.99870099604381, 0.0128207263355671*cos(1.99870099604381*pi))
(61.99831128191967, 0.0166671357682253*cos(1.99831128191967*pi))
(-63.99846480674464, -0.0151518675915899*cos(1.99846480674464*pi))
(67.99846480674465, 0.0151518675915899*cos(1.99846480674465*pi))
(-23.996102641928523, -0.0384673046484715*cos(1.99610264192852*pi))
(-49.99805146702257, -0.0192314898690811*cos(1.99805146702257*pi))
(-11.99276027675465, -0.0714655279031144*cos(1.99276027675465*pi))
(-91.99892210682754, -0.0106384198625546*cos(1.99892210682754*pi))
(75.99863077792584, 0.0135137635586942*cos(1.99863077792584*pi))
(15.99276027675465, 0.0714655279031144*cos(1.99276027675465*pi))
(-77.99873347183703, -0.0125001978981585*cos(1.99873347183703*pi))
(3.9484545394207995, 0.513227267954253*cos(1.9484545394208*pi))
(-67.99855253456555, -0.0142860096929318*cos(1.99855253456555*pi))
(-17.994933085037538, -0.0500126704974228*cos(1.99493308503754*pi))
(91.9988741996823, 0.0111112501005433*cos(1.99887419968231*pi))
(-39.99758749848229, -0.0238108915193316*cos(1.99758749848229*pi))
(-99.999006648613, -0.00980401704739149*cos(1.999006648613*pi))
(-71.99863077792584, -0.0135137635586942*cos(1.99863077792584*pi))
(71.99855253456555, 0.0142860096929318*cos(1.99855253456555*pi))
(-87.9988741996823, -0.0111112501005433*cos(1.99887419968231*pi))
(-61.998416830397005, -0.0156253865255779*cos(1.99841683039701*pi))
(-95.99896610309928, -0.0102041892865273*cos(1.99896610309928*pi))
(29.9963810744755, 0.0357189022873998*cos(1.9963810744755*pi))
(21.994933085037538, 0.0500126704974228*cos(1.99493308503754*pi))
(7.983081334472861, 0.167137958536227*cos(1.98308133447286*pi))
(-93.99894456326798, -0.0104167811901406*cos(1.99894456326798*pi))
(87.9988218359416, 0.0116280662763925*cos(1.9988218359416*pi))
(35.99701979103759, 0.0294143429673098*cos(1.99701979103759*pi))
(-37.99746686346282, -0.0250015833106043*cos(1.99746686346282*pi))
(-83.9988218359416, -0.0116280662763925*cos(1.9988218359416*pi))
(-97.9989867813195, -0.0100001013228947*cos(1.9989867813195*pi))
(-21.995777788821496, -0.0416739981842078*cos(1.9957777888215*pi))
(-73.99866681093987, -0.0131581255561716*cos(1.99866681093987*pi))
(-1.9745618773827747, -0.251600058283278*cos(1.97456187738277*pi))
(-47.99797352157236, -0.0200008106242253*cos(1.99797352157236*pi))
(-27.996622373693775, -0.0333370866740308*cos(1.99662237369377*pi))
(73.99859274300154, 0.0138891603558071*cos(1.99859274300154*pi))
(5.974561877382775, 0.251600058283278*cos(1.97456187738277*pi))
(53.99805146702257, 0.0192314898690811*cos(1.99805146702257*pi))
(11.989861028618183, 0.100101492616892*cos(1.98986102861818*pi))
(-35.99733352832425, -0.026317636190302*cos(1.99733352832425*pi))
(-69.99859274300154, -0.0138891603558071*cos(1.99859274300154*pi))
(-3.9830813344728613, -0.167137958536227*cos(1.98308133447286*pi))
(27.996102641928523, 0.0384673046484715*cos(1.99610264192852*pi))
(47.997797295255594, 0.0217401714604091*cos(1.99779729525559*pi))
(-29.996833504122364, -0.0312530925871513*cos(1.99683350412236*pi))
(81.99873347183703, 0.0125001978981585*cos(1.99873347183703*pi))
(31.996622373693775, 0.0333370866740308*cos(1.99662237369377*pi))
(-81.99879378388556, -0.0119049328562125*cos(1.99879378388556*pi))
(-9.991552603761589, -0.0833920371317317*cos(1.99155260376159*pi))
(-5.9873214572994575, -0.125198416683996*cos(1.98732145729946*pi))
(-85.99884861287003, -0.011363785046771*cos(1.99884861287003*pi))
(-55.998253047962045, -0.0172418986339648*cos(1.99825304796205*pi))
(-53.998190654176284, -0.0178577198355501*cos(1.99819065417628*pi))
(9.987321457299458, 0.125198416683996*cos(1.98732145729946*pi))
(25.995777788821496, 0.0416739981842078*cos(1.9957777888215*pi))
(49.997889080118895, 0.0208342495714923*cos(1.9978890801189*pi))
(-51.99812363831861, -0.0185191620119624*cos(1.99812363831861*pi))
(-45.997889080118895, -0.0208342495714923*cos(1.9978890801189*pi))
(41.99746686346282, 0.0250015833106043*cos(1.99746686346282*pi))
(93.99889867399723, 0.0108696953378056*cos(1.99889867399723*pi))
(0.05154546057920037, -0.513227267954253*cos(0.0515454605792004*pi))
(-31.997019791037587, -0.0294143429673098*cos(1.99701979103759*pi))
(45.997697165477256, 0.0227284622701719*cos(1.99769716547726*pi))
(97.99894456326798, 0.0104167811901406*cos(1.99894456326798*pi))
(69.99850996082668, 0.014706204600308*cos(1.99850996082668*pi))
(95.99892210682754, 0.0106384198625546*cos(1.99892210682754*pi))
(63.99836575864295, 0.0161294574101027*cos(1.99836575864295*pi))
(-15.994369871352536, -0.0555729379327711*cos(1.99436987135254*pi))
(-89.99889867399723, -0.0108696953378056*cos(1.99889867399723*pi))
(23.99539384872894, 0.0454640642889778*cos(1.99539384872894*pi))
(83.99876436339626, 0.0121953057190993*cos(1.99876436339626*pi))
(19.994369871352536, 0.0555729379327711*cos(1.99436987135254*pi))
(85.99879378388556, 0.0119049328562125*cos(1.99879378388556*pi))
(65.998416830397, 0.0156253865255779*cos(1.99841683039701*pi))
(-75.99870099604381, -0.0128207263355671*cos(1.99870099604381*pi))
(-19.99539384872894, -0.0454640642889778*cos(1.99539384872894*pi))
(-79.99876436339626, -0.0121953057190993*cos(1.99876436339626*pi))
(-43.997797295255594, -0.0217401714604091*cos(1.99779729525559*pi))
(51.99797352157236, 0.0200008106242253*cos(1.99797352157236*pi))
(13.991552603761589, 0.0833920371317317*cos(1.99155260376159*pi))
(59.998253047962045, 0.0172418986339648*cos(1.99825304796205*pi))
(-25.9963810744755, -0.0357189022873998*cos(1.9963810744755*pi))
(-59.99836575864295, -0.0161294574101027*cos(1.99836575864295*pi))
(55.99812363831861, 0.0185191620119624*cos(1.99812363831861*pi))
(-7.989861028618183, -0.100101492616892*cos(1.98986102861818*pi))
(33.996833504122364, 0.0312530925871513*cos(1.99683350412236*pi))
(99.99896610309928, 0.0102041892865273*cos(1.99896610309928*pi))
(-41.997697165477256, -0.0227284622701719*cos(1.99769716547726*pi))
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} = -33.9971853759713$$
$$x_{2} = -65.9985099608267$$
$$x_{3} = -57.9983112819197$$
$$x_{4} = -13.9936657542665$$
$$x_{5} = -63.9984648067446$$
$$x_{6} = -23.9961026419285$$
$$x_{7} = -49.9980514670226$$
$$x_{8} = -11.9927602767546$$
$$x_{9} = -91.9989221068275$$
$$x_{10} = -77.998733471837$$
$$x_{11} = -67.9985525345655$$
$$x_{12} = -17.9949330850375$$
$$x_{13} = -39.9975874984823$$
$$x_{14} = -99.999006648613$$
$$x_{15} = -71.9986307779258$$
$$x_{16} = -87.9988741996823$$
$$x_{17} = -61.998416830397$$
$$x_{18} = -95.9989661030993$$
$$x_{19} = -93.998944563268$$
$$x_{20} = -37.9974668634628$$
$$x_{21} = -83.9988218359416$$
$$x_{22} = -97.9989867813195$$
$$x_{23} = -21.9957777888215$$
$$x_{24} = -73.9986668109399$$
$$x_{25} = -1.97456187738277$$
$$x_{26} = -47.9979735215724$$
$$x_{27} = -27.9966223736938$$
$$x_{28} = -35.9973335283242$$
$$x_{29} = -69.9985927430015$$
$$x_{30} = -3.98308133447286$$
$$x_{31} = -29.9968335041224$$
$$x_{32} = -81.9987937838856$$
$$x_{33} = -9.99155260376159$$
$$x_{34} = -5.98732145729946$$
$$x_{35} = -85.99884861287$$
$$x_{36} = -55.998253047962$$
$$x_{37} = -53.9981906541763$$
$$x_{38} = -51.9981236383186$$
$$x_{39} = -45.9978890801189$$
$$x_{40} = 0.0515454605792004$$
$$x_{41} = -31.9970197910376$$
$$x_{42} = -15.9943698713525$$
$$x_{43} = -89.9988986739972$$
$$x_{44} = -75.9987009960438$$
$$x_{45} = -19.9953938487289$$
$$x_{46} = -79.9987643633963$$
$$x_{47} = -43.9977972952556$$
$$x_{48} = -25.9963810744755$$
$$x_{49} = -59.9983657586429$$
$$x_{50} = -7.98986102861818$$
$$x_{51} = -41.9976971654773$$
Maxima of the function at points:
$$x_{51} = 43.9975874984823$$
$$x_{51} = 57.9981906541763$$
$$x_{51} = 77.9986668109399$$
$$x_{51} = 37.9971853759713$$
$$x_{51} = 89.99884861287$$
$$x_{51} = 17.9936657542665$$
$$x_{51} = 39.9973335283242$$
$$x_{51} = 79.9987009960438$$
$$x_{51} = 61.9983112819197$$
$$x_{51} = 67.9984648067446$$
$$x_{51} = 75.9986307779258$$
$$x_{51} = 15.9927602767546$$
$$x_{51} = 3.9484545394208$$
$$x_{51} = 91.9988741996823$$
$$x_{51} = 71.9985525345655$$
$$x_{51} = 29.9963810744755$$
$$x_{51} = 21.9949330850375$$
$$x_{51} = 7.98308133447286$$
$$x_{51} = 87.9988218359416$$
$$x_{51} = 35.9970197910376$$
$$x_{51} = 73.9985927430015$$
$$x_{51} = 5.97456187738277$$
$$x_{51} = 53.9980514670226$$
$$x_{51} = 11.9898610286182$$
$$x_{51} = 27.9961026419285$$
$$x_{51} = 47.9977972952556$$
$$x_{51} = 81.998733471837$$
$$x_{51} = 31.9966223736938$$
$$x_{51} = 9.98732145729946$$
$$x_{51} = 25.9957777888215$$
$$x_{51} = 49.9978890801189$$
$$x_{51} = 41.9974668634628$$
$$x_{51} = 93.9988986739972$$
$$x_{51} = 45.9976971654773$$
$$x_{51} = 97.998944563268$$
$$x_{51} = 69.9985099608267$$
$$x_{51} = 95.9989221068275$$
$$x_{51} = 63.9983657586429$$
$$x_{51} = 23.9953938487289$$
$$x_{51} = 83.9987643633963$$
$$x_{51} = 19.9943698713525$$
$$x_{51} = 85.9987937838856$$
$$x_{51} = 65.998416830397$$
$$x_{51} = 51.9979735215724$$
$$x_{51} = 13.9915526037616$$
$$x_{51} = 59.998253047962$$
$$x_{51} = 55.9981236383186$$
$$x_{51} = 33.9968335041224$$
$$x_{51} = 99.9989661030993$$
Decreasing at intervals
$$\left[0.0515454605792004, 3.9484545394208\right]$$
Increasing at intervals
$$\left(-\infty, -99.999006648613\right]$$