File r37/lisp/csl/html/r37_0426.html artifact 3fb6a29ba0 part of check-in 3c4d7b69af



<A NAME=num_solve>

<TITLE>num_solve</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>



<B>NUM_SOLVE</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>operator</B><P>
<P>
 
 <P>
<P>
An adaptively damped Newton iteration is used to find 
an approximative root of a function (function vector) or the 
solution of an 
<A HREF=r37_0045.html>equation</A> (equation system). The expressions 
must have continuous derivatives for all variables. 
A starting point for the iteration can be given. If not given 
random values are taken instead. When the number of 
forms is not equal to the number of variables, the 
Newton method cannot be applied. Then the minimum 
of the sum of absolute squares is located instead. 
<P>
<P>
With 
<A HREF=r37_0274.html>complex</A> on, solutions with imaginary parts can be 
found, if either the expression(s) or the starting point 
contain a nonzero imaginary part. 
<P>
<P>
 <P> <H3> 
syntax: </H3>
<em>num_solve</em>(&lt;exp&gt;, &lt;var&gt;[=&lt;val&gt;][,accuracy=&lt;a&gt;][,
iterations=&lt;i&gt;]) 
<P>
<P>
or 
<P>
<P>
<em>num_solve</em>({&lt;exp&gt;,...,&lt;exp&gt;}, &lt;var&gt;[=&lt;val&gt;],...,
&lt;var&gt;[=&lt;val&gt;] 
 [,accuracy=&lt;a&gt;][,iterations=&lt;i&gt;]) 
<P>
<P>
or 
<P>
<P>
<em>num_solve</em>({&lt;exp&gt;,...,&lt;exp&gt;}, {&lt;var&gt;[=&lt;val&gt;],...
,&lt;var&gt;[=&lt;val&gt;]} 
 [,accuracy=&lt;a&gt;][,iterations=&lt;i&gt;]) 
 <P>
<P>
<P>
<P>
where &lt;exp&gt; are function expressions, 
 &lt;var&gt; are the variables, 
 &lt;val&gt; are optional start values. 
For &lt;a&gt; and &lt;i&gt; see 
<A HREF=r37_0423.html>numeric accuracy</A>. 
 <P>
<P>
<em>num_solve</em>tries to find a zero/solution of the expression(s). 
Result is a list of equations, where the variables are 
equated to the coordinates of the result point. 
 <P>
<P>
The <em>Jacobian matrix</em> is stored as side effect the shared 
variable <em>jacobian</em>. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
num_solve({sin x=cos y, x + y = 1},{x=1,y=2});


  {X= - 1.8561957251,Y=2.856195584}


jacobian;

      [COS(X)  SIN(Y)]
      [              ]
      [  1       1   ]

</TT></PRE><P>

REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]