File r37/lisp/csl/html/r37_0194.html artifact 4d8b1c6d16 part of check-in a57e59ec0d



<A NAME=FACTOR_declaration>

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



<B>FACTOR</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>declaration</B><P>
<P>
 
 <P>
<P>
When a kernel is declared by <em>factor</em>, all terms involving fixed 
powers of that kernel are printed as a product of the fixed powers and 
the rest of the terms. 
 <P> <H3> 
syntax: </H3>
<P>
<P>
<em>factor</em>&lt;kernel&gt; {<em>,</em>&lt;kernel&gt;}* 
<P>
<P>
<P>
&lt;kernel&gt; must be a 
<A HREF=r37_0002.html>kernel</A> or a 
<A HREF=r37_0053.html>list</A> of 
<em>kernel</em>s. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
a := (x + y + z)**2; 

        2                    2            2
  A := X  + 2*X*Y + 2*X*Z + Y  + 2*Y*Z + Z  


factor y; 

a; 

   2                  2            2
  Y  + 2*Y*(X + Z) + X  + 2*X*Z + Z  


factor sin(x); 

c := df(sin(x)**4*x**2*z,x); 

               4               3         2
  C := 2*SIN(X) *X*Z + 4*SIN(X) *COS(X)*X *Z 


remfac sin(x); 

c; 

          3
  2*SIN(X) *X*Z*(2*COS(X)*X + SIN(X))

</TT></PRE><P>Use the <em>factor</em> declaration to display variables of intere
st so that 
you can see their powers more clearly, as shown in the example. Remove 
this special treatment with the declaration 
<A HREF=r37_0217.html>remfac</A>. The 
<em>factor</em> declaration is only effective when the switch 
<A HREF=r37_0319.html>pri</A> 
is on. 
<P>
<P>
The <em>factor</em> declaration is not a factoring command; to factor 
expressions use the 
<A HREF=r37_0287.html>factor</A> switch or the 
<A HREF=r37_0151.html>factorize</A> command. 
<P>
<P>
The <em>factor</em> declaration is helpful in such cases as Taylor polynomials 
where the explicit powers of the variable are expected at the top level, not 
buried in various factored forms. 
<P>
<P>
Note that <em>factor</em> does not affect the order of its arguments. You 
should also use 
<A HREF=r37_0212.html>order</A> if this is important. 
<P>
<P>
<P>


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