- Split input into 2 regimes
if x < -0.033966867866531136 or 0.029704376882507127 < x
Initial program 1.0
\[\frac{1 - \cos x}{x \cdot x}\]
- Using strategy
rm Applied *-un-lft-identity1.0
\[\leadsto \frac{\color{blue}{1 \cdot \left(1 - \cos x\right)}}{x \cdot x}\]
Applied times-frac0.5
\[\leadsto \color{blue}{\frac{1}{x} \cdot \frac{1 - \cos x}{x}}\]
if -0.033966867866531136 < x < 0.029704376882507127
Initial program 61.3
\[\frac{1 - \cos x}{x \cdot x}\]
Taylor expanded around 0 0.0
\[\leadsto \color{blue}{\left(\frac{1}{720} \cdot {x}^{4} + \frac{1}{2}\right) - \frac{1}{24} \cdot {x}^{2}}\]
Applied simplify0.0
\[\leadsto \color{blue}{(\frac{1}{720} \cdot \left({x}^{4}\right) + \frac{1}{2})_* - \left(\frac{1}{24} \cdot x\right) \cdot x}\]
- Recombined 2 regimes into one program.
Applied simplify0.3
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;x \le -0.033966867866531136 \lor \neg \left(x \le 0.029704376882507127\right):\\
\;\;\;\;\frac{1}{x} \cdot \frac{1 - \cos x}{x}\\
\mathbf{else}:\\
\;\;\;\;(\frac{1}{720} \cdot \left({x}^{4}\right) + \frac{1}{2})_* - x \cdot \left(x \cdot \frac{1}{24}\right)\\
\end{array}}\]