To numerically solve the equation
x^2  cos(x) = 0 for x, type
Variable x
Solve( x^2  cos(x) = 0, x = 0.2 )
As shown to the right, this nonlinear equation has two solutions. The solution
x = 0.8241323 reported by Solve depends on the guessed solution x = 0.2.
If instead, one guesses a solution x = 9, Solve reports x = 0.8241323.
In general, nonlinear equations have unknown number of solutions (0, 1, 2, 3, ..., 17, ...).
The Solve command frequently converges to a solution close to the starting guess.
To save input (for subsequent reuse) and/or input and output responses, type
Save SolveSampleNonlinearEqn.txt
Save SolveSampleNonlinearEqn.all


Solving sets of nonlinear algebraic equations
Equations for a circle and sine curve.
x^{2} + y^{2} = 1
y = sin(x)
To numerically solve the previous set of nonlinear equations for x and y, type
Note: The arguments x=3 and
y=5 provide a starting guess for the solution.
Variable x, y
Zero[1] = x^2 + y^2  1
Zero[2] = y  sin(x)
Solve( Zero, x=3, y=5 )


These nonlinear equations have two solutions.
The program's solution of
x = 0.739085 and
y = 0.673612 depend on the guess.
The program frequently converges to a solution close to the starting guess.
To save input (for subsequent reuse) and/or
input and output responses, type
Save SolveSampleNonlinearEqns.txt
Save SolveSampleNonlinearEqns.all
Solving sets of nonlinear algebraic equations with input
x^{2} + y^{2} = R^{2}
y = A * sin(x)
To numerically solve the previous set of nonlinear equations for x and y, type
Note: Numerical values for A and
R are provided in the Input command.
Constant R, A
Variable x, y
Zero[1] = x^2 + y^2  R^2
Zero[2] = y  A*sin(x)
Input A=1, R=1
Solve( Zero, x=3, y=5 )
To save input (for subsequent reuse) and/or
input and output responses, type
Save SolveSampleNonlinearEqnsWithInput.txt
Save SolveSampleNonlinearEqnsWithInput.html


Generating code to solve nonlinear algebraic equations
MotionGenesis produces
highly efficient and
symbolically optimized codes.
A simple command file
shows how to generate various codes to solve the previous nonlinear equations.
Depending on your license,
these deployable codes are independent of MotionGenesis.
Note: Each code outputs results in the file
CodeSampleNonlinearEqns.1
To save input (for subsequent reuse) and/or
input and output responses, type
Save CodeSampleNonlinearEqns.txt
Save CodeSampleNonlinearEqns.html
