PatternSolve

PatternSolve[eqns, vars]
solves the set of equations (eqns) for the variables vars with pattern equations using the base set of template equations.
PatternSolve[eqns, vars, patteqns]
solves the set of equations (eqns) for the variables vars with pattern equations using the list of template equations defined in patteqns.
  • Equations are given in the form lhs == rhs.
  • Simultaneous equations can be combined in a list.
  • A single variable or a list of variables can be specified.
  • Example: PatternSolve[Sin[x] + 9 == 0, x].
  • PatternSolve gives all matching solutions in terms of list of the form {{templateEqID}, {x -> sol}, {condition}}.
  • The returned condition specify necessary, but not sufficient condition of the real solution.
  • PatternSolve can be applied for a set of redundant equations. This means that the number of equations can be bigger than the number of variables.
  • patteqns specifies a list of additional template equations to be used.
  • In case of UseBaseTemplates→False option is specified only the additional template equations are used. The default option is True, when the additional template equations are appended to the base template equations.
  • PatternSolve deals primarily with special trigonometric polynomial equations of inverse kinematical problem.
  • PatternSolve looks for equations matching the specified template equations, and substitute the matched parameters into the template solution.
  • The equations are converted into the normal form of the pattern matching before the template search is started.
optiondefault valuedescription
ExcludedParametersNoneList of symbol to filter the resulted solution. The solution containing any parameter will be dropped.
UseBaseTemplatesTrueSpecify whether the base template equation should be included in the template equations used for pattern matching.
Load LinkageDesigner package
In[1]:=
Click for copyable input
Solve the trigonometric polynomial with Solve function
In[2]:=
Click for copyable input
Out[2]=
Sustitute the solution into the equation
In[3]:=
Click for copyable input
Out[3]=
Solve the same equation with PatternSolve function
In[4]:=
Click for copyable input
Out[4]=
Substitute the solution
In[5]:=
Click for copyable input
Out[5]=