- Split input into 3 regimes
if x < -0.009745756652596336
Initial program 1.1
\[\frac{1 - \cos x}{x \cdot x}\]
- Using strategy
rm Applied flip--1.3
\[\leadsto \frac{\color{blue}{\frac{1 \cdot 1 - \cos x \cdot \cos x}{1 + \cos x}}}{x \cdot x}\]
Applied associate-/l/1.3
\[\leadsto \color{blue}{\frac{1 \cdot 1 - \cos x \cdot \cos x}{\left(x \cdot x\right) \cdot \left(1 + \cos x\right)}}\]
Simplified1.1
\[\leadsto \frac{\color{blue}{\sin x \cdot \sin x}}{\left(x \cdot x\right) \cdot \left(1 + \cos x\right)}\]
- Using strategy
rm Applied +-commutative1.1
\[\leadsto \frac{\sin x \cdot \sin x}{\left(x \cdot x\right) \cdot \color{blue}{\left(\cos x + 1\right)}}\]
- Using strategy
rm Applied times-frac1.1
\[\leadsto \color{blue}{\frac{\sin x}{x \cdot x} \cdot \frac{\sin x}{\cos x + 1}}\]
Simplified0.8
\[\leadsto \frac{\sin x}{x \cdot x} \cdot \color{blue}{\tan \left(\frac{x}{2}\right)}\]
if -0.009745756652596336 < x < 0.025343046100655117
Initial program 61.4
\[\frac{1 - \cos x}{x \cdot x}\]
- Using strategy
rm Applied flip--61.4
\[\leadsto \frac{\color{blue}{\frac{1 \cdot 1 - \cos x \cdot \cos x}{1 + \cos x}}}{x \cdot x}\]
Applied associate-/l/61.4
\[\leadsto \color{blue}{\frac{1 \cdot 1 - \cos x \cdot \cos x}{\left(x \cdot x\right) \cdot \left(1 + \cos x\right)}}\]
Simplified29.7
\[\leadsto \frac{\color{blue}{\sin x \cdot \sin x}}{\left(x \cdot x\right) \cdot \left(1 + \cos x\right)}\]
- Using strategy
rm Applied +-commutative29.7
\[\leadsto \frac{\sin x \cdot \sin x}{\left(x \cdot x\right) \cdot \color{blue}{\left(\cos x + 1\right)}}\]
- Using strategy
rm Applied clear-num29.7
\[\leadsto \color{blue}{\frac{1}{\frac{\left(x \cdot x\right) \cdot \left(\cos x + 1\right)}{\sin x \cdot \sin x}}}\]
Taylor expanded around 0 0.0
\[\leadsto \frac{1}{\color{blue}{\frac{1}{6} \cdot {x}^{2} + \left(\frac{1}{120} \cdot {x}^{4} + 2\right)}}\]
Simplified0.0
\[\leadsto \frac{1}{\color{blue}{(\frac{1}{120} \cdot \left({x}^{4}\right) + \left((\left(x \cdot x\right) \cdot \frac{1}{6} + 2)_*\right))_*}}\]
if 0.025343046100655117 < x
Initial program 0.9
\[\frac{1 - \cos x}{x \cdot x}\]
- Using strategy
rm Applied add-sqr-sqrt1.1
\[\leadsto \frac{\color{blue}{\sqrt{1 - \cos x} \cdot \sqrt{1 - \cos x}}}{x \cdot x}\]
Applied times-frac0.6
\[\leadsto \color{blue}{\frac{\sqrt{1 - \cos x}}{x} \cdot \frac{\sqrt{1 - \cos x}}{x}}\]
- Recombined 3 regimes into one program.
Final simplification0.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;x \le -0.009745756652596336:\\
\;\;\;\;\tan \left(\frac{x}{2}\right) \cdot \frac{\sin x}{x \cdot x}\\
\mathbf{elif}\;x \le 0.025343046100655117:\\
\;\;\;\;\frac{1}{(\frac{1}{120} \cdot \left({x}^{4}\right) + \left((\left(x \cdot x\right) \cdot \frac{1}{6} + 2)_*\right))_*}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{1 - \cos x}}{x} \cdot \frac{\sqrt{1 - \cos x}}{x}\\
\end{array}\]