I kind of figured out how to use sympy in python to test math ideas.
First copy the initial imports from sympy interactive tutorial.
Then the syntax and what you can do a mix of ordinary python with numpy coding and sympy.
So defining a function is done with
some code with x
An example would be to find an other approximate function for exp(-x**2).
In the example I tried to adapt sin(x)/x to exp(-x**2). It could be ?solved with ordinary machine learning methods.
a = sin(x*k)/(x*k)
y = a**15
b = y*sin(x*k)/(x*k)
Here I tought I adapt the function internally. That is. I multiply the original function with a function of itself. The y = a**15.
Then I just ran g(x,k) through the loop to find k with the loss of loss = F.mean_squared_error(g(x,k), exp(-x**2))
From this I recomend that you can use pretty much your entire imagination to find the value you want. Its much more fun that way.