lambda x:f"(1-1{(s:=x//3*'*(1+S(5)+S(S(20)-10))/(S(12)+S(-4))')})/S(-4{s})"
Try it online!
This produces an expression with complex numbers as intermediates that can be evaluated in Python with S=cmath.sqrt
. For instance, x=3
gives:
(1*S(1+S(5)+S(2*S(5)-10))/S(S(12)+S(-4))-1/(1*S(1+S(5)+S(2*S(5)-10))/S(S(12)+S(-4))))/S(-4)
The main idea is to work with complex numbers, in particular roots of unity. Since \$e^{i \theta}\ = \cos(\theta) + i\sin(\theta)\$ where \$i = \sqrt{-1}\$, we can work with multiples of \$\theta\$ as
$$\ \cos(k\theta) + i\sin(k\theta)= e^{i k\theta}\ = \left(e^{i \theta}\right)^k = \left( \cos(\theta) + i\sin(\theta)\right)^k$$
From there, we can extract just the sine with:
$$\sin(k \theta) = \frac{\left(e^{i \theta}\right)^k-1/\left(e^{i \theta}\right)^k}{2i}$$
We can take the \$k\$ power by multiplying \$k\$ times, that is concatenating \$k\$ copies of *stuff
in the expression, since the challenge doesn't allow exponents in the formula.
So we express \$e^{i \theta}\$ for \$\theta = 3^{\circ}\$ (three degrees), and take its \$k\$-th power by multiplying it \$k\$ times, using string repetition.
It remains to express \$e^{i \theta}\$ for \$\theta = 3^{\circ}\$. We could directly write out its sine and cosine, but it's a bit shorter to express it in terms of 36 and 30 degrees:
$$e^{i (3^\circ)} = \sqrt{e^{i (6^\circ)}} = \sqrt{e^{i (36^\circ)}e^{i (-30^\circ)}} = \sqrt{(\cos(36^\circ)+i \sin (36^\circ))(\cos(30^\circ)-i \sin (30^\circ))}$$
These angles have relatively nice sines and cosines. A bit of tweaking and combining terms gives this in the code's notation as:
S((1+S(5)+S(2*S(5)-10))/(S(12)+S(-4)))
If we call S(c)
the value above, the value we want to output is:
(S(c) - 1/S(c))/S(-4)
using that \$\sqrt{-4} = 2i\$. Finally, an improvement from @loopwalt that saved 6 bytes is to simplify this to
(1-c)/S(-4c)