Previous section-----Next section

2.5.3 Nonlinear Equation Solver

At the core of Mech's numerical solution block is a Newton-Rhapson simultaneous nonlinear equation solver, similar to the built-in Mathematica function FindRoot. In fact, Mech can be used to solve arbitrary systems of equations that have no relation to mechanism analysis.
Mech's general constraint function Constraint is used to build a constraint object from an arbitrary algebraic equation. The algebraic constraint can be incorporated into a mechanism model along with other geometric constraints, or an entire model can be built from general constraints.

The general constraint function.

The following uses Mech to find the intersection of a parabola and a circle.

This prevents impending spelling errors.

This builds the nonmechanical model.

This plots the two functions, showing their intersection.

This seeks a solution to the two equations.

This looks for the other solution.