Господин Экзамен

Другие калькуляторы

cos(x)+cos(2*x)-1 если x=-1/3

Выражение, которое надо упростить:

Решение

Вы ввели [src]
cos(x) + cos(2*x) - 1
$$\cos{\left(x \right)} + \cos{\left(2 x \right)} - 1$$
cos(x) + cos(2*x) - 1*1
Подстановка условия [src]
cos(x) + cos(2*x) - 1*1 при x = -1/3
подставляем
cos(x) + cos(2*x) - 1
$$\cos{\left(x \right)} + \cos{\left(2 x \right)} - 1$$
-1 + cos(x) + cos(2*x)
$$\cos{\left(x \right)} + \cos{\left(2 x \right)} - 1$$
переменные
x = -1/3
$$x = - \frac{1}{3}$$
-1 + cos((-1/3)) + cos(2*(-1/3))
$$\cos{\left((-1/3) \right)} + \cos{\left(2 (-1/3) \right)} - 1$$
-1 + cos(-1/3) + cos(2*-1/3)
$$-1 + \cos{\left(2 \left(- \frac{1}{3}\right) \right)} + \cos{\left(- \frac{1}{3} \right)}$$
-1 + cos(1/3) + cos(2/3)
$$-1 + \cos{\left(\frac{2}{3} \right)} + \cos{\left(\frac{1}{3} \right)}$$
-1 + cos(1/3) + cos(2/3)
Степени [src]
      I*x    -I*x    -2*I*x    2*I*x
     e      e       e         e     
-1 + ---- + ----- + ------- + ------
      2       2        2        2   
$$\frac{e^{2 i x}}{2} + \frac{e^{i x}}{2} - 1 + \frac{e^{- i x}}{2} + \frac{e^{- 2 i x}}{2}$$
-1 + exp(i*x)/2 + exp(-i*x)/2 + exp(-2*i*x)/2 + exp(2*i*x)/2
Раскрыть выражение [src]
          2            
-2 + 2*cos (x) + cos(x)
$$2 \cos^{2}{\left(x \right)} + \cos{\left(x \right)} - 2$$
        2         2            
-1 + cos (x) - sin (x) + cos(x)
$$- \sin^{2}{\left(x \right)} + \cos^{2}{\left(x \right)} + \cos{\left(x \right)} - 1$$
-1 + cos(x)^2 - sin(x)^2 + cos(x)
Тригонометрическая часть [src]
          /x\    /3*x\
-1 + 2*cos|-|*cos|---|
          \2/    \ 2 /
$$2 \cos{\left(\frac{x}{2} \right)} \cos{\left(\frac{3 x}{2} \right)} - 1$$
          2           2/x\
-3 + 2*cos (x) + 2*cos |-|
                       \2/
$$2 \cos^{2}{\left(\frac{x}{2} \right)} + 2 \cos^{2}{\left(x \right)} - 3$$
       1         1    
-1 + ------ + --------
     sec(x)   sec(2*x)
$$-1 + \frac{1}{\sec{\left(2 x \right)}} + \frac{1}{\sec{\left(x \right)}}$$
        /    pi\      /pi      \
-1 + sin|x + --| + sin|-- + 2*x|
        \    2 /      \2       /
$$\sin{\left(x + \frac{\pi}{2} \right)} + \sin{\left(2 x + \frac{\pi}{2} \right)} - 1$$
        2         2            
-1 + cos (x) - sin (x) + cos(x)
$$- \sin^{2}{\left(x \right)} + \cos^{2}{\left(x \right)} + \cos{\left(x \right)} - 1$$
          1              1      
-1 + ----------- + -------------
        /pi    \      /pi      \
     csc|-- - x|   csc|-- - 2*x|
        \2     /      \2       /
$$-1 + \frac{1}{\csc{\left(- x + \frac{\pi}{2} \right)}} + \frac{1}{\csc{\left(- 2 x + \frac{\pi}{2} \right)}}$$
3 - cos(2*x) - 3*cos(x) + cos(3*x)
----------------------------------
         2*(-1 + cos(x))          
$$\frac{- 3 \cos{\left(x \right)} - \cos{\left(2 x \right)} + \cos{\left(3 x \right)} + 3}{2 \left(\cos{\left(x \right)} - 1\right)}$$
                            2/x\
             2      -1 + cot |-|
     -1 + cot (x)            \2/
-1 + ------------ + ------------
            2              2/x\ 
     1 + cot (x)    1 + cot |-| 
                            \2/ 
$$\frac{\cot^{2}{\left(\frac{x}{2} \right)} - 1}{\cot^{2}{\left(\frac{x}{2} \right)} + 1} + \frac{\cot^{2}{\left(x \right)} - 1}{\cot^{2}{\left(x \right)} + 1} - 1$$
                          2/x\
            2      1 - tan |-|
     1 - tan (x)           \2/
-1 + ----------- + -----------
            2             2/x\
     1 + tan (x)   1 + tan |-|
                           \2/
$$\frac{- \tan^{2}{\left(\frac{x}{2} \right)} + 1}{\tan^{2}{\left(\frac{x}{2} \right)} + 1} + \frac{- \tan^{2}{\left(x \right)} + 1}{\tan^{2}{\left(x \right)} + 1} - 1$$
                          1   
            1      1 - -------
     1 - -------          2/x\
            2          cot |-|
         cot (x)           \2/
-1 + ----------- + -----------
            1             1   
     1 + -------   1 + -------
            2             2/x\
         cot (x)       cot |-|
                           \2/
$$\frac{1 - \frac{1}{\cot^{2}{\left(\frac{x}{2} \right)}}}{1 + \frac{1}{\cot^{2}{\left(\frac{x}{2} \right)}}} + \frac{1 - \frac{1}{\cot^{2}{\left(x \right)}}}{1 + \frac{1}{\cot^{2}{\left(x \right)}}} - 1$$
           /    pi\           /x   pi\  
      2*tan|x + --|      2*tan|- + --|  
           \    4 /           \2   4 /  
-1 + ---------------- + ----------------
            2/    pi\          2/x   pi\
     1 + tan |x + --|   1 + tan |- + --|
             \    4 /           \2   4 /
$$-1 + \frac{2 \tan{\left(x + \frac{\pi}{4} \right)}}{\tan^{2}{\left(x + \frac{\pi}{4} \right)} + 1} + \frac{2 \tan{\left(\frac{x}{2} + \frac{\pi}{4} \right)}}{\tan^{2}{\left(\frac{x}{2} + \frac{\pi}{4} \right)} + 1}$$
     //   1      for x mod pi = 0\   //  1     for x mod 2*pi = 0\
-1 + |<                          | + |<                          |
     \\cos(2*x)     otherwise    /   \\cos(x)      otherwise     /
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\cos{\left(2 x \right)} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\cos{\left(x \right)} & \text{otherwise} \end{cases}\right) - 1$$
     //   1      for x mod pi = 0\   //  1     for x mod 2*pi = 0\
     ||                          |   ||                          |
-1 + |<   1                      | + |<  1                       |
     ||--------     otherwise    |   ||------      otherwise     |
     \\sec(2*x)                  /   \\sec(x)                    /
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\frac{1}{\sec{\left(2 x \right)}} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\frac{1}{\sec{\left(x \right)}} & \text{otherwise} \end{cases}\right) - 1$$
     //      1        for x mod pi = 0\   //     1       for x mod 2*pi = 0\
     ||                               |   ||                               |
-1 + |<   /pi      \                  | + |<   /    pi\                    |
     ||sin|-- + 2*x|     otherwise    |   ||sin|x + --|      otherwise     |
     \\   \2       /                  /   \\   \    2 /                    /
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\sin{\left(2 x + \frac{\pi}{2} \right)} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\sin{\left(x + \frac{\pi}{2} \right)} & \text{otherwise} \end{cases}\right) - 1$$
     //      1        for x mod pi = 0\   //     1       for x mod 2*pi = 0\
     ||                               |   ||                               |
     ||      1                        |   ||     1                         |
-1 + |<-------------     otherwise    | + |<-----------      otherwise     |
     ||   /pi      \                  |   ||   /pi    \                    |
     ||csc|-- - 2*x|                  |   ||csc|-- - x|                    |
     \\   \2       /                  /   \\   \2     /                    /
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\frac{1}{\csc{\left(- 2 x + \frac{\pi}{2} \right)}} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\frac{1}{\csc{\left(- x + \frac{\pi}{2} \right)}} & \text{otherwise} \end{cases}\right) - 1$$
              4/x\                
         4*sin |-|            4   
               \2/       4*sin (x)
     1 - ---------   1 - ---------
             2              2     
          sin (x)        sin (2*x)
-1 + ------------- + -------------
              4/x\            4   
         4*sin |-|       4*sin (x)
               \2/   1 + ---------
     1 + ---------          2     
             2           sin (2*x)
          sin (x)                 
$$\frac{- \frac{4 \sin^{4}{\left(\frac{x}{2} \right)}}{\sin^{2}{\left(x \right)}} + 1}{\frac{4 \sin^{4}{\left(\frac{x}{2} \right)}}{\sin^{2}{\left(x \right)}} + 1} + \frac{- \frac{4 \sin^{4}{\left(x \right)}}{\sin^{2}{\left(2 x \right)}} + 1}{\frac{4 \sin^{4}{\left(x \right)}}{\sin^{2}{\left(2 x \right)}} + 1} - 1$$
                                         //     1        for x mod 2*pi = 0\
     //     1        for x mod pi = 0\   ||                                |
     ||                              |   ||        2/x\                    |
     ||        2                     |   ||-1 + cot |-|                    |
-1 + |<-1 + cot (x)                  | + |<         \2/                    |
     ||------------     otherwise    |   ||------------      otherwise     |
     ||       2                      |   ||       2/x\                     |
     \\1 + cot (x)                   /   ||1 + cot |-|                     |
                                         \\        \2/                     /
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\frac{\cot^{2}{\left(x \right)} - 1}{\cot^{2}{\left(x \right)} + 1} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\frac{\cot^{2}{\left(\frac{x}{2} \right)} - 1}{\cot^{2}{\left(\frac{x}{2} \right)} + 1} & \text{otherwise} \end{cases}\right) - 1$$
                                        //     1       for x mod 2*pi = 0\
     //     1       for x mod pi = 0\   ||                               |
     ||                             |   ||       2/x\                    |
     ||       2                     |   ||1 - tan |-|                    |
-1 + |<1 - tan (x)                  | + |<        \2/                    |
     ||-----------     otherwise    |   ||-----------      otherwise     |
     ||       2                     |   ||       2/x\                    |
     \\1 + tan (x)                  /   ||1 + tan |-|                    |
                                        \\        \2/                    /
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\frac{- \tan^{2}{\left(x \right)} + 1}{\tan^{2}{\left(x \right)} + 1} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\frac{- \tan^{2}{\left(\frac{x}{2} \right)} + 1}{\tan^{2}{\left(\frac{x}{2} \right)} + 1} & \text{otherwise} \end{cases}\right) - 1$$
                                     //             1               for x mod 2*pi = 0\
                                     ||                                               |
     //   1      for x mod pi = 0\   ||           2                                   |
-1 + |<                          | + |< -4 + 4*sin (x) + 4*cos(x)                     |
     \\cos(2*x)     otherwise    /   ||---------------------------      otherwise     |
                                     ||              2        2                       |
                                     \\2*(1 - cos(x))  + 2*sin (x)                    /
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\cos{\left(2 x \right)} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\frac{4 \sin^{2}{\left(x \right)} + 4 \cos{\left(x \right)} - 4}{2 \left(- \cos{\left(x \right)} + 1\right)^{2} + 2 \sin^{2}{\left(x \right)}} & \text{otherwise} \end{cases}\right) - 1$$
     //                              /    pi\           \                                         
     ||           0              for |x + --| mod pi = 0|   //              /pi      \           \
     ||                              \    2 /           |   ||   0      for |-- + 2*x| mod pi = 0|
-1 + |<                                                 | + |<              \2       /           |
     ||                /x   pi\                         |   ||                                   |
     ||(1 + sin(x))*cot|- + --|         otherwise       |   \\cos(2*x)          otherwise        /
     \\                \2   4 /                         /                                         
$$\left(\begin{cases} 0 & \text{for}\: \left(x + \frac{\pi}{2}\right) \bmod \pi = 0 \\\left(\sin{\left(x \right)} + 1\right) \cot{\left(\frac{x}{2} + \frac{\pi}{4} \right)} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 0 & \text{for}\: \left(2 x + \frac{\pi}{2}\right) \bmod \pi = 0 \\\cos{\left(2 x \right)} & \text{otherwise} \end{cases}\right) - 1$$
                               2/x   pi\
            2/    pi\       cos |- - --|
         cos |x - --|           \2   2 /
             \    2 /   1 - ------------
     1 - ------------            2/x\   
              2               cos |-|   
           cos (x)                \2/   
-1 + ---------------- + ----------------
            2/    pi\          2/x   pi\
         cos |x - --|       cos |- - --|
             \    2 /           \2   2 /
     1 + ------------   1 + ------------
              2                  2/x\   
           cos (x)            cos |-|   
                                  \2/   
$$\frac{1 - \frac{\cos^{2}{\left(\frac{x}{2} - \frac{\pi}{2} \right)}}{\cos^{2}{\left(\frac{x}{2} \right)}}}{1 + \frac{\cos^{2}{\left(\frac{x}{2} - \frac{\pi}{2} \right)}}{\cos^{2}{\left(\frac{x}{2} \right)}}} + \frac{1 - \frac{\cos^{2}{\left(x - \frac{\pi}{2} \right)}}{\cos^{2}{\left(x \right)}}}{1 + \frac{\cos^{2}{\left(x - \frac{\pi}{2} \right)}}{\cos^{2}{\left(x \right)}}} - 1$$
                                 2/x\   
              2               sec |-|   
           sec (x)                \2/   
     1 - ------------   1 - ------------
            2/    pi\          2/x   pi\
         sec |x - --|       sec |- - --|
             \    2 /           \2   2 /
-1 + ---------------- + ----------------
              2                  2/x\   
           sec (x)            sec |-|   
     1 + ------------             \2/   
            2/    pi\   1 + ------------
         sec |x - --|          2/x   pi\
             \    2 /       sec |- - --|
                                \2   2 /
$$\frac{- \frac{\sec^{2}{\left(\frac{x}{2} \right)}}{\sec^{2}{\left(\frac{x}{2} - \frac{\pi}{2} \right)}} + 1}{\frac{\sec^{2}{\left(\frac{x}{2} \right)}}{\sec^{2}{\left(\frac{x}{2} - \frac{\pi}{2} \right)}} + 1} + \frac{- \frac{\sec^{2}{\left(x \right)}}{\sec^{2}{\left(x - \frac{\pi}{2} \right)}} + 1}{\frac{\sec^{2}{\left(x \right)}}{\sec^{2}{\left(x - \frac{\pi}{2} \right)}} + 1} - 1$$
                               2/pi   x\
            2/pi    \       csc |-- - -|
         csc |-- - x|           \2    2/
             \2     /   1 - ------------
     1 - ------------            2/x\   
              2               csc |-|   
           csc (x)                \2/   
-1 + ---------------- + ----------------
            2/pi    \          2/pi   x\
         csc |-- - x|       csc |-- - -|
             \2     /           \2    2/
     1 + ------------   1 + ------------
              2                  2/x\   
           csc (x)            csc |-|   
                                  \2/   
$$\frac{1 - \frac{\csc^{2}{\left(- \frac{x}{2} + \frac{\pi}{2} \right)}}{\csc^{2}{\left(\frac{x}{2} \right)}}}{1 + \frac{\csc^{2}{\left(- \frac{x}{2} + \frac{\pi}{2} \right)}}{\csc^{2}{\left(\frac{x}{2} \right)}}} + \frac{1 - \frac{\csc^{2}{\left(- x + \frac{\pi}{2} \right)}}{\csc^{2}{\left(x \right)}}}{1 + \frac{\csc^{2}{\left(- x + \frac{\pi}{2} \right)}}{\csc^{2}{\left(x \right)}}} - 1$$
                                         //     1        for x mod 2*pi = 0\
     //     1        for x mod pi = 0\   ||                                |
     ||                              |   ||        1                       |
     ||        1                     |   ||-1 + -------                    |
     ||-1 + -------                  |   ||        2/x\                    |
     ||        2                     |   ||     tan |-|                    |
-1 + |<     tan (x)                  | + |<         \2/                    |
     ||------------     otherwise    |   ||------------      otherwise     |
     ||       1                      |   ||       1                        |
     ||1 + -------                   |   ||1 + -------                     |
     ||       2                      |   ||       2/x\                     |
     \\    tan (x)                   /   ||    tan |-|                     |
                                         \\        \2/                     /
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\frac{-1 + \frac{1}{\tan^{2}{\left(x \right)}}}{1 + \frac{1}{\tan^{2}{\left(x \right)}}} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\frac{-1 + \frac{1}{\tan^{2}{\left(\frac{x}{2} \right)}}}{1 + \frac{1}{\tan^{2}{\left(\frac{x}{2} \right)}}} & \text{otherwise} \end{cases}\right) - 1$$
     //             1               for x mod pi = 0\   //             1               for x mod 2*pi = 0\
     ||                                             |   ||                                               |
-1 + |
            
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\cos{\left(2 x \right)} & \text{otherwise} \end{cases} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\cos{\left(x \right)} & \text{otherwise} \end{cases} & \text{otherwise} \end{cases}\right) - 1$$
     //                      /    pi\           \   //                      /pi      \           \
     ||       0          for |x + --| mod pi = 0|   ||       0          for |-- + 2*x| mod pi = 0|
     ||                      \    2 /           |   ||                      \2       /           |
     ||                                         |   ||                                           |
     ||      /x   pi\                           |   ||      /    pi\                             |
-1 + |< 2*cot|- + --|                           | + |< 2*cot|x + --|                             |
     ||      \2   4 /                           |   ||      \    4 /                             |
     ||----------------         otherwise       |   ||----------------          otherwise        |
     ||       2/x   pi\                         |   ||       2/    pi\                           |
     ||1 + cot |- + --|                         |   ||1 + cot |x + --|                           |
     \\        \2   4 /                         /   \\        \    4 /                           /
$$\left(\begin{cases} 0 & \text{for}\: \left(x + \frac{\pi}{2}\right) \bmod \pi = 0 \\\frac{2 \cot{\left(\frac{x}{2} + \frac{\pi}{4} \right)}}{\cot^{2}{\left(\frac{x}{2} + \frac{\pi}{4} \right)} + 1} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 0 & \text{for}\: \left(2 x + \frac{\pi}{2}\right) \bmod \pi = 0 \\\frac{2 \cot{\left(x + \frac{\pi}{4} \right)}}{\cot^{2}{\left(x + \frac{\pi}{4} \right)} + 1} & \text{otherwise} \end{cases}\right) - 1$$
                                           //      1         for x mod 2*pi = 0\
     //      1         for x mod pi = 0\   ||                                  |
     ||                                |   ||         2                        |
     ||        2                       |   ||      sin (x)                     |
     ||     sin (2*x)                  |   ||-1 + ---------                    |
     ||-1 + ---------                  |   ||          4/x\                    |
     ||          4                     |   ||     4*sin |-|                    |
-1 + |<     4*sin (x)                  | + |<           \2/                    |
     ||--------------     otherwise    |   ||--------------      otherwise     |
     ||       2                        |   ||        2                         |
     ||    sin (2*x)                   |   ||     sin (x)                      |
     ||1 + ---------                   |   ||1 + ---------                     |
     ||         4                      |   ||         4/x\                     |
     \\    4*sin (x)                   /   ||    4*sin |-|                     |
                                           \\          \2/                     /
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\frac{-1 + \frac{\sin^{2}{\left(2 x \right)}}{4 \sin^{4}{\left(x \right)}}}{1 + \frac{\sin^{2}{\left(2 x \right)}}{4 \sin^{4}{\left(x \right)}}} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\frac{-1 + \frac{\sin^{2}{\left(x \right)}}{4 \sin^{4}{\left(\frac{x}{2} \right)}}}{1 + \frac{\sin^{2}{\left(x \right)}}{4 \sin^{4}{\left(\frac{x}{2} \right)}}} & \text{otherwise} \end{cases}\right) - 1$$
                                                            //                1                  for x mod 2*pi = 0\
     //               1                 for x mod pi = 0\   ||                                                     |
     ||                                                 |   ||/     1        for x mod 2*pi = 0                    |
     ||/     1        for x mod pi = 0                  |   |||                                                    |
     |||                                                |   |||        2/x\                                        |
-1 + |<|        2                                       | + |<|-1 + cot |-|                                        |
     ||<-1 + cot (x)                       otherwise    |   ||<         \2/                          otherwise     |
     |||------------     otherwise                      |   |||------------      otherwise                         |
     |||       2                                        |   |||       2/x\                                         |
     \\\1 + cot (x)                                     /   |||1 + cot |-|                                         |
                                                            \\\        \2/                                         /
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\frac{\cot^{2}{\left(x \right)} - 1}{\cot^{2}{\left(x \right)} + 1} & \text{otherwise} \end{cases} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\frac{\cot^{2}{\left(\frac{x}{2} \right)} - 1}{\cot^{2}{\left(\frac{x}{2} \right)} + 1} & \text{otherwise} \end{cases} & \text{otherwise} \end{cases}\right) - 1$$
                                              //        1          for x mod 2*pi = 0\
     //        1          for x mod pi = 0\   ||                                     |
     ||                                   |   ||          2/x\                       |
     ||          2                        |   ||       cos |-|                       |
     ||       cos (x)                     |   ||           \2/                       |
     ||-1 + ------------                  |   ||-1 + ------------                    |
     ||        2/    pi\                  |   ||        2/x   pi\                    |
     ||     cos |x - --|                  |   ||     cos |- - --|                    |
-1 + |<         \    2 /                  | + |<         \2   2 /                    |
     ||-----------------     otherwise    |   ||-----------------      otherwise     |
     ||          2                        |   ||          2/x\                       |
     ||       cos (x)                     |   ||       cos |-|                       |
     || 1 + ------------                  |   ||           \2/                       |
     ||        2/    pi\                  |   || 1 + ------------                    |
     ||     cos |x - --|                  |   ||        2/x   pi\                    |
     \\         \    2 /                  /   ||     cos |- - --|                    |
                                              \\         \2   2 /                    /
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\frac{\frac{\cos^{2}{\left(x \right)}}{\cos^{2}{\left(x - \frac{\pi}{2} \right)}} - 1}{\frac{\cos^{2}{\left(x \right)}}{\cos^{2}{\left(x - \frac{\pi}{2} \right)}} + 1} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\frac{\frac{\cos^{2}{\left(\frac{x}{2} \right)}}{\cos^{2}{\left(\frac{x}{2} - \frac{\pi}{2} \right)}} - 1}{\frac{\cos^{2}{\left(\frac{x}{2} \right)}}{\cos^{2}{\left(\frac{x}{2} - \frac{\pi}{2} \right)}} + 1} & \text{otherwise} \end{cases}\right) - 1$$
                                              //        1          for x mod 2*pi = 0\
     //        1          for x mod pi = 0\   ||                                     |
     ||                                   |   ||        2/x   pi\                    |
     ||        2/    pi\                  |   ||     sec |- - --|                    |
     ||     sec |x - --|                  |   ||         \2   2 /                    |
     ||         \    2 /                  |   ||-1 + ------------                    |
     ||-1 + ------------                  |   ||          2/x\                       |
     ||          2                        |   ||       sec |-|                       |
-1 + |<       sec (x)                     | + |<           \2/                       |
     ||-----------------     otherwise    |   ||-----------------      otherwise     |
     ||        2/    pi\                  |   ||        2/x   pi\                    |
     ||     sec |x - --|                  |   ||     sec |- - --|                    |
     ||         \    2 /                  |   ||         \2   2 /                    |
     || 1 + ------------                  |   || 1 + ------------                    |
     ||          2                        |   ||          2/x\                       |
     \\       sec (x)                     /   ||       sec |-|                       |
                                              \\           \2/                       /
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\frac{-1 + \frac{\sec^{2}{\left(x - \frac{\pi}{2} \right)}}{\sec^{2}{\left(x \right)}}}{1 + \frac{\sec^{2}{\left(x - \frac{\pi}{2} \right)}}{\sec^{2}{\left(x \right)}}} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\frac{-1 + \frac{\sec^{2}{\left(\frac{x}{2} - \frac{\pi}{2} \right)}}{\sec^{2}{\left(\frac{x}{2} \right)}}}{1 + \frac{\sec^{2}{\left(\frac{x}{2} - \frac{\pi}{2} \right)}}{\sec^{2}{\left(\frac{x}{2} \right)}}} & \text{otherwise} \end{cases}\right) - 1$$
                                              //        1          for x mod 2*pi = 0\
     //        1          for x mod pi = 0\   ||                                     |
     ||                                   |   ||          2/x\                       |
     ||          2                        |   ||       csc |-|                       |
     ||       csc (x)                     |   ||           \2/                       |
     ||-1 + ------------                  |   ||-1 + ------------                    |
     ||        2/pi    \                  |   ||        2/pi   x\                    |
     ||     csc |-- - x|                  |   ||     csc |-- - -|                    |
-1 + |<         \2     /                  | + |<         \2    2/                    |
     ||-----------------     otherwise    |   ||-----------------      otherwise     |
     ||          2                        |   ||          2/x\                       |
     ||       csc (x)                     |   ||       csc |-|                       |
     || 1 + ------------                  |   ||           \2/                       |
     ||        2/pi    \                  |   || 1 + ------------                    |
     ||     csc |-- - x|                  |   ||        2/pi   x\                    |
     \\         \2     /                  /   ||     csc |-- - -|                    |
                                              \\         \2    2/                    /
$$\left(\begin{cases} 1 & \text{for}\: x \bmod \pi = 0 \\\frac{\frac{\csc^{2}{\left(x \right)}}{\csc^{2}{\left(- x + \frac{\pi}{2} \right)}} - 1}{\frac{\csc^{2}{\left(x \right)}}{\csc^{2}{\left(- x + \frac{\pi}{2} \right)}} + 1} & \text{otherwise} \end{cases}\right) + \left(\begin{cases} 1 & \text{for}\: x \bmod 2 \pi = 0 \\\frac{\frac{\csc^{2}{\left(\frac{x}{2} \right)}}{\csc^{2}{\left(- \frac{x}{2} + \frac{\pi}{2} \right)}} - 1}{\frac{\csc^{2}{\left(\frac{x}{2} \right)}}{\csc^{2}{\left(- \frac{x}{2} + \frac{\pi}{2} \right)}} + 1} & \text{otherwise} \end{cases}\right) - 1$$
-1 + Piecewise((1, Mod(x = pi, 0)), ((-1 + csc(x)^2/csc(pi/2 - x)^2)/(1 + csc(x)^2/csc(pi/2 - x)^2), True)) + Piecewise((1, Mod(x = 2*pi, 0)), ((-1 + csc(x/2)^2/csc(pi/2 - x/2)^2)/(1 + csc(x/2)^2/csc(pi/2 - x/2)^2), True))
Численный ответ [src]
-1.0 + cos(x) + cos(2*x)
-1.0 + cos(x) + cos(2*x)