What is the best way to approximate trigonometric functions in HC
00krishna opened this issue · 2 comments
Hello. I was wondering if it is possible to approximate trigonometric functions in HC? I was experimenting with a simple mechanical system, just to learn the package. So I started with looking for the fixed points of a simple pendulum.
The system is:
I set
So this system does not work natively in HC because of the trig function.
I tried using the Taylor series approximation for the
returns the root at
@var x[1:2]; # declare the variables x and y
f1 = x[2]
f2 = -9.8*(x[1] - x[1]^3/factorial(3) + x[1]^5/factorial(5))
H = System([f1, f2])
result3 = HomotopyContinuation.solve(H)
real_solutions(result3)
Hence I was wondering if there is a better way to approximate trig functions in the HC system? Like should I use a complex function, or something else. Or is there a way to set the domain for the search of the roots so that I can capture the second root at
Hi,
unfortunately, there is no support for trigonometric functions. While in principle, it is possible to do homotopies for any analytic functions, our software only supports polynomial functions. The reason is that for polynomial systems there is a theory for start systems, so that the software can find all zeros of a given system. Such a theory does not exist for analytic functions, simply because there can be infinitely many roots (for instance,
In your example, the software correctly computes the 5 complex roots of f2
. One of them is real. The Taylor approximation is only good locally around 0, that is why you will not find
Closed