# Tutorial

Via some interesting use cases, several features are introduced.

1. If one can solve polynomial systems, then one can solve many problems, as illustrated by the wide variety of application areas.

2. The use cases illustrate the formulation of the polynomial systems via the packages in Python’s computational ecosystem, in particular sympy and numpy.

3. The interpretation of the output often happens via plots.

For the plots, Jupyter notebooks are available in the `tests` folder. The development of the use cases happened via short Python scripts.

In the `phcpy` context, solving a problem includes the writing of scripts which formulate the polynomial system that define the problem and the scripts which verify and interpret the solutions.

- A Counter Example to Koushnirenko’s Conjecture
  - solving the system on many cores
  - extracting the real roots
  - plotting the curves
- A 4-Bar Mechanism
  - solving a polynomial system
  - a straight-line configuration
  - a four-bar mechanism
  - the coupler curve
- Two Lines Meeting Four Given Lines
  - solving a general instance
  - four real lines
  - visualization
- The Circle Problem of Apollonius
  - the polynomial systems
  - plotting circles
  - solving polynomial systems
  - a special problem
  - a perturbed problem
- All Lines Tangent to Four Spheres
  - centers and radii
  - formulating the equations
  - solving the problem
  - the tangent lines
  - plotting the lines
- Tracking Paths Step by Step
  - plotting solutions paths
  - plotting paths and poles
- Adjacent 2-by-2 Minors
  - computing a witness set
  - monodromy breakup
- Design of a moving 7-bar mechanism
  - a Laurent polynomial system
  - a special problem
  - a numerical irreducible decomposition
- Tangent Lines via Witness Set Intersection
  - a witness set of the circle
  - intersecting with the Jacobian
  - extending with slack variables
  - intersecting two witness sets
  - plotting the tangent lines