Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Solve a system of trigonometric or hyperbolic equations
ResourceFunction["TrigNSolve"][eqns,vars] numerically solves the trigonometric system eqns in vars. |
Find real solutions for a system of five equations:
In[1]:= |
Out[3]= |
Check that residuals are small:
In[4]:= |
Out[4]= |
A system can have variables appearing in trigs or as ordinary variables and can also have radical expressions:
In[5]:= |
Out[6]= |
Solve a mixed trig-hyperbolic system:
In[7]:= |
Out[8]= |
Solve a system in trigs and ordinary variables:
In[9]:= |
Out[10]= |
Numerically solve a difficult trigonometric system and extract real-valued solutions:
In[11]:= |
Out[12]= |
Use the "Endomorphism" method from NSolve on a large trigonometric system:
In[13]:= |
Out[14]= |
Extract real-valued solutions:
In[15]:= |
Out[15]= |
Compare to the default Method→Automatic timing:
In[16]:= |
Out[16]= |
And to the "Monodromy" method:
In[17]:= |
Out[17]= |
Timing results strongly suggest that "Homotopy" was used as the Automatic default for this example:
In[18]:= |
Out[18]= |
TrigNSolve requires that variables appearing in trig functions not also appear as polynomial variables:
In[19]:= |
Out[19]= |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License