- Split input into 2 regimes
if x < -0.026062455830960528 or 0.03184327862110824 < 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.026062455830960528 < x < 0.03184327862110824
Initial program 61.3
\[\frac{1 - \cos x}{x \cdot x}\]
Taylor expanded around 0 0.0
\[\leadsto \color{blue}{\left(\frac{1}{2} + \frac{1}{720} \cdot {x}^{4}\right) - \frac{1}{24} \cdot {x}^{2}}\]
- Recombined 2 regimes into one program.
Applied simplify0.3
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;x \le -0.026062455830960528 \lor \neg \left(x \le 0.03184327862110824\right):\\
\;\;\;\;\frac{1 - \cos x}{x} \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{720} \cdot {x}^{4} + \frac{1}{2}\right) - \frac{1}{24} \cdot {x}^{2}\\
\end{array}}\]