eigenmath/help.html

578 lines
14 KiB
HTML

<html>
<head>
</head>
<body>
<tt>
<p>
<a href="Eigenmath.pdf"><img src="man.jpg"></a>
<p>
<hr>
<p>
<table>
<tr>
<td valign="top">
<tt>
<ul>
<li><a href="#abs">abs</a>
<li><a href="#adj">adj</a>
<li><a href="#and">and</a>
<li><a href="#arccos">arccos</a>
<li><a href="#arccosh">arccosh</a>
<li><a href="#arcsin">arcsin</a>
<li><a href="#arcsinh">arcsinh</a>
<li><a href="#arctan">arctan</a>
<li><a href="#arctanh">arctanh</a>
<li><a href="#arg">arg</a>
<li><a href="#ceiling">ceiling</a>
<li><a href="#check">check</a>
<li><a href="#choose">choose</a>
<li><a href="#circexp">circexp</a>
<li><a href="#coeff">coeff</a>
<li><a href="#cofactor">cofactor</a>
<li><a href="#conj">conj</a>
<li><a href="#contract">contract</a>
<li><a href="#cos">cos</a>
<li><a href="#cosh">cosh</a>
<li><a href="#cross">cross</a>
<li><a href="#curl">curl</a>
</ul>
</td>
<td valign="top">
<tt>
<ul>
<li><a href="#d">d</a>
<li><a href="#defint">defint</a>
<li><a href="#deg">deg</a>
<li><a href="#denominator">denominator</a>
<li><a href="#det">det</a>
<li><a href="#dim">dim</a>
<li><a href="#do">do</a>
<li><a href="#dot">dot</a>
<li><a href="#draw">draw</a>
<li><a href="#erf">erf</a>
<li><a href="#erfc">erfc</a>
<li><a href="#eval">eval</a>
<li><a href="#exp">exp</a>
<li><a href="#expcos">expcos</a>
<li><a href="#expsin">expsin</a>
<li><a href="#factor">factor</a>
<li><a href="#factorial">factorial</a>
<li><a href="#filter">filter</a>
<li><a href="#float">float</a>
<li><a href="#floor">floor</a>
<li><a href="#for">for</a>
<li><a href="#gcd">gcd</a>
</ul>
</td>
<td valign="top">
<tt>
<ul>
<li><a href="#hermite">hermite</a>
<li><a href="#hilbert">hilbert</a>
<li><a href="#imag">imag</a>
<li><a href="#inner">inner</a>
<li><a href="#integral">integral</a>
<li><a href="#inv">inv</a>
<li><a href="#isprime">isprime</a>
<li><a href="#laguerre">laguerre</a>
<li><a href="#lcm">lcm</a>
<li><a href="#legendre">legendre</a>
<li><a href="#log">log</a>
<li><a href="#mag">mag</a>
<li><a href="#mod">mod</a>
<li><a href="#not">not</a>
<li><a href="#nroots">nroots</a>
<li><a href="#numerator">numerator</a>
<li><a href="#or">or</a>
<li><a href="#outer">outer</a>
<li><a href="#polar">polar</a>
<li><a href="#prime">prime</a>
<li><a href="#print">print</a>
<li><a href="#product">product</a>
</ul>
</td>
<td valign="top">
<tt>
<ul>
<li><a href="#quote">quote</a>
<li><a href="#quotient">quotient</a>
<li><a href="#rank">rank</a>
<li><a href="#rationalize">rationalize</a>
<li><a href="#real">real</a>
<li><a href="#rect">rect</a>
<li><a href="#roots">roots</a>
<li><a href="#simplify">simplify</a>
<li><a href="#sin">sin</a>
<li><a href="#sinh">sinh</a>
<li><a href="#sqrt">sqrt</a>
<li><a href="#stop">stop</a>
<li><a href="#subst">subst</a>
<li><a href="#sum">sum</a>
<li><a href="#tan">tan</a>
<li><a href="#tanh">tanh</a>
<li><a href="#taylor">taylor</a>
<li><a href="#test">test</a>
<li><a href="#transpose">transpose</a>
<li><a href="#unit">unit</a>
<li><a href="#zero">zero</a>
</ul>
</td>
</tr>
</table>
<p>
<h1><tt><a name="abs">abs(<i>x</i>)</a></tt></h1>
Returns the absolute value or vector length of x.
<p>
<h1><tt><a name="adj">adj(<i>m</i>)</a></tt></h1>
Returns the adjunct of matrix m.
The inverse of m is equal to adj(m) divided by det(m).
<p><h1><tt><a name="and">and(<i>a,b,...</i>)</a></tt></h1>
Logical-and of predicate expressions.
<p>
<h1><tt><a name="arccos">arccos(<i>x</i>)</a></tt></h1>
Returns the inverse cosine of x.
<p>
<h1><tt><a name="arccosh">arccosh(<i>x</i>)</a></tt></h1>
Returns the inverse hyperbolic cosine of x.
<p>
<h1><tt><a name="arcsin">arcsin(<i>x</i>)</a></tt></h1>
Returns the inverse sine of x.
<p>
<h1><tt><a name="arcsinh">arcsinh(<i>x</i>)</a></tt></h1>
Returns the inverse hyperbolic sine of x.
<p>
<h1><tt><a name="arctan">arctan(<i>x</i>)</a></tt></h1>
Returns the inverse tangent of x.
<p>
<h1><tt><a name="arctanh">arctanh(<i>x</i>)</a></tt></h1>
Returns the inverse hyperbolic tangent of x.
<p>
<h1><tt><a name="arg">arg(<i>z</i>)</a></tt></h1>
Returns the angle of complex z.
<p>
<h1><tt><a name="ceiling">ceiling(<i>x</i>)</a></tt></h1>
Returns the smallest integer not less than x.
<p>
<h1><tt><a name="check">check(<i>x</i>)</a></tt></h1>
If x is true then continue, else stop.
<p>
<h1><tt><a name="choose">choose(<i>n,k</i>)</a></tt></h1>
Returns the number of combinations of n items taken k at a time.
<p>
<h1><tt><a name="circexp">circexp(<i>x</i>)</a></tt></h1>
Returns expression x with circular and hyperbolic functions converted to exponential forms.
Sometimes this will simplify an expression.
<p>
<h1><tt><a name="coeff">coeff(<i>p,x,n</i>)</a></tt></h1>
Returns the coefficient of x to the n in polynomial p.
The x argument can be omitted for polynomials in x.
<p>
<h1><tt><a name="cofactor">cofactor(<i>m,i,j</i>)</a></tt></h1>
Returns the cofactor of m for row i and column j.
<p>
<h1><tt><a name="conj">conj(<i>z</i>)</a></tt></h1>
Returns the complex conjugate of z.
<p>
<h1><tt><a name="contract">contract(<i>a,i,j</i>)</a></tt></h1>
Returns "a" summed over indices i and j.
If i and j are omitted then 1 and 2 are used.
contract(m) is equivalent to the trace of matrix m.
<p>
<h1><tt><a name="cos">cos(<i>x</i>)</a></tt></h1>
Returns the cosine of x.
<p>
<h1><tt><a name="cosh">cosh(<i>x</i>)</a></tt></h1>
Returns the hyperbolic cosine of x.
<p>
<h1><tt><a name="cross">cross(<i>u,v</i>)</a></tt></h1>
Returns the cross product of vectors u and v.
<p>
<h1><tt><a name="curl">curl(<i>u</i>)</a></tt></h1>
Returns the curl of vector u.
<p>
<h1><a name="d">d(<i>f,x</i>)</a></h1>
Returns the partial derivative of f with respect to x.
<p>
<h1><a name="defint">defint(<i>f,x,a,b</i>)</h1>
Returns the definite integral of f with respect to x
evaluated from "a" to b.
The argument list can be extended for multiple integrals.
For example, defint(f,x,a,b,y,c,d).
<p>
<h1><tt><a name="deg">deg(<i>p,x</i>)</a></tt></h1>
Returns the degree of polynomial p(x).
<p>
<h1><tt><a name="denominator">denominator(<i>x</i>)</a></tt></h1>
Returns the denominator of expression x.
<p>
<h1><tt><a name="det">det(<i>m</i>)</a></tt></h1>
Returns the determinant of matrix m.
<p>
<h1><tt><a name="dim">dim(<i>a,n</i>)</a></tt></h1>
Returns the cardinality of the nth index of tensor "a".
<p>
<h1><tt><a name="do">do(<i>a,b,...</i>)</a></tt></h1>
Evaluates each argument from left to right.
Returns the result of the last argument.
<p>
<h1><tt><a name="dot">dot(<i>a,b,...</i>)</a></tt></h1>
Returns the dot or inner product of tensors.
<p>
<h1><tt><a name="draw">draw(<i>f,x</i>)</a></tt></h1>
Draws a graph of f(x).
Drawing ranges can be set with xrange and yrange.
<!--
<p>
<h1><tt><a name="eigen">eigen(<i>m</i>)</a></tt></h1>
<h1><tt>eigenval(<i>m</i>)</tt></h1>
<h1><tt>eigenvec(<i>m</i>)</tt></h1>
These functions compute eigenvalues and eigenvectors numerically.
Matrix m must be both numerical and symmetric.
The eigenval function returns a matrix with the eigenvalues along
the diagonal.
The eigenvec function returns a matrix with the eigenvectors arranged as row
vectors.
The eigen function does not return anything but stores the eigenvalue matrix
in D and the eigenvector matrix in Q.
<p>
Example 1. Check the relation AX = lambda X where lambda is an eigenvalue and
X is the associated eigenvector.
<pre>
<i>Enter</i>
A = hilbert(3)
eigen(A)
lambda = D[1,1]
X = Q[1]
dot(A,X) - lambda X
<i>Result</i>
-1.16435e-14
-6.46705e-15
-4.55191e-15
</pre>
<p>
Example 2: Check the relation A = Q<sup>T</sup>DQ.
<pre>
<i>Enter</i>
A - dot(transpose(Q),D,Q)
<i>Result</i>
6.27365e-12 -1.58236e-11 1.81902e-11
-1.58236e-11 -1.95365e-11 2.56514e-12
1.81902e-11 2.56514e-12 1.32627e-11
</pre>
-->
<p>
<h1><tt><a name="erf">erf(<i>x</i>)</a></tt></h1>
Error function of x.
<p>
<h1><tt><a name="erfc">erfc(<i>x</i>)</a></tt></h1>
Complementary error function of x.
<p>
<h1><tt><a name="eval">eval(<i>f,x,a</i>)</a></tt></h1>
Returns f evaluated at x=a.
<p>
<h1><tt><a name="exp">exp(<i>x</i>)</a></tt></h1>
Returns the exponential of x.
<p>
<h1><tt><a name="expcos">expcos(<i>x</i>)</a></tt></h1>
Returns the exponential cosine of x.
<p>
<h1><tt><a name="expsin">expsin(<i>x</i>)</a></tt></h1>
Returns the exponential sine of x.
<p>
<h1><tt><a name="factor">factor(<i>n</i>)</a></tt></h1>
Factors integer n.
<p>
<h1><tt>factor(<i>p,x</i>)</tt></h1>
Factors polynomial p(x).
The x can be omitted for polynomials in x.
The polynomial should be factorable over integers.
The argument list can be extended.
For example, factor(p,x,y) factors p over x and then over y.
<p>
<h1><tt><a name="factorial">factorial(<i>x</i>)</a></tt></h1>
Can be entered as x!
<p>
<h1><tt><a name="filter">filter(<i>f,a,b,...</i>)</a></tt></h1>
Returns f excluding any terms containing a, b, etc.
<p>
<h1><tt><a name="float">float(<i>x</i>)</a></tt></h1>
Converts rational numbers and integers to floating point values.
The symbol pi is also converted.
<p>
<h1><tt><a name="floor">floor(<i>x</i>)</a></tt></h1>
Returns the largest integer not greater than x.
<p>
<h1><tt><a name="for">for(<i>i,j,k,a,b,...</i>)</a></tt></h1>
For i equals j through k evaluate a, b, etc.
<p>
<h1><tt><a name="gcd">gcd(<i>a,b,...</i>)</a></tt></h1>
Returns the greatest common divisor.
<p>
<h1><tt><a name="hermite">hermite(<i>x,n</i>)</a></tt></h1>
Returns the nth Hermite polynomial in x.
<p>
<h1><tt><a name="hilbert">hilbert(<i>n</i>)</a></tt></h1>
Returns an n by n Hilbert matrix.
<p>
<h1><tt><a name="imag">imag(<i>z</i>)</a></tt></h1>
Returns the imaginary part of complex z.
<p>
<h1><tt><a name="inner">inner(<i>a,b,...</i>)</a></tt></h1>
Returns the inner product of tensors.
Same as the dot product.
<p>
<h1><tt><a name="integral">integral(<i>f,x</i>)</a></tt></h1>
Returns the integral of f with respect to x.
<p>
<h1><tt><a name="inv">inv(<i>m</i>)</a></tt></h1>
Returns the inverse of matrix m.
<p>
<h1><tt><a name="isprime">isprime(<i>n</i>)</a></tt></h1>
Returns 1 if n is a prime number, returns zero otherwise.
<p>
<h1><tt><a name="laguerre">laguerre(<i>x,n,a</i>)</a></tt></h1>
Returns the nth Laguerre polynomial in x.
If "a" is omitted then a=0 is used.
<p>
<h1><tt><a name="lcm">lcm(<i>a,b,...</i>)</a></tt></h1>
Returns the least common multiple.
<p>
<h1><tt><a name="legendre">legendre(<i>x,n,m</i>)</a></tt></h1>
Returns the nth Legendre polynomial in x.
If m is omitted then m=0 is used.
<p>
<h1><tt><a name="log">log(<i>x</i>)</a></tt></h1>
Returns the natural logarithm of x.
<p>
<h1><tt><a name="mag">mag(<i>z</i>)</a></tt></h1>
Returns the magnitude of complex z.
<p>
<h1><tt><a name="mod">mod(<i>a,b</i>)</a></tt></h1>
Returns the remainder of the result of "a" divided by b.
<p>
<h1><tt><a name="not">not(<i>x</i>)</a></tt></h1>
Returns the logical negation of x.
<p>
<h1><tt><a name="nroots">nroots(<i>p,x</i>)</a></tt></h1>
Returns the numerical roots of polynomial p(x).
The argument x can be omitted.
If it is omitted then the computer will guess the free variable.
<p>
<h1><tt><a name="numerator">numerator(<i>x</i>)</a></tt></h1>
Returns the numerator of expression x.
<p>
<h1><tt><a name="or">or(<i>a,b,...</i>)</a></tt></h1>
Logical-or of predicate expressions.
<p>
<h1><tt><a name="outer">outer(<i>a,b,...</i>)</a></tt></h1>
Returns the outer product of tensors.
Also known as the tensor product.
<p>
<h1><tt><a name="polar">polar(<i>z</i>)</a></tt></h1>
Returns complex z in polar form.
<p>
<h1><tt><a name="prime">prime(<i>n</i>)</a></tt></h1>
Returns the nth prime number.
The domain of n is 1 to 10000.
<p>
<h1><tt><a name="print">print(<i>a,b,...</i>)</a></tt></h1>
Evaluate expressions and print the results.
Useful for printing from inside a "for" loop.
<p>
<h1><tt><a name="product">product(<i>i,j,k,f</i>)</a></tt></h1>
For i equals j through k evaluate f.
Returns the product of all f.
<p>
<h1><tt><a name="quote">quote(<i>x</i>)</a></tt></h1>
Returns expression x without evaluating it first.
<p><h1><tt><a name="quotient">quotient(<i>p,q,x</i>)</a></tt></h1>
Returns the quotient of polynomial p(x) over q(x).
The last argument can be omitted for polynomials in x.
The remainder can be calculated by p-q*quotient(p,q).
<p>
<h1><tt><a name="rank">rank(<i>a</i>)</a></tt></h1>
Returns the number of indices that tensor "a" has.
<p>
<h1><tt><a name="rationalize">rationalize(<i>x</i>)</a></tt></h1>
Returns x with everything over a common denominator.
<p>
<h1><tt><a name="real">real(<i>z</i>)</a></tt></h1>
Returns the real part of complex z.
<p>
<h1><tt><a name="rect">rect(<i>z</i>)</a></tt></h1>
Returns complex z in rectangular form.
<p>
<h1><tt><a name="roots">roots(<i>p,x</i>)</a></tt></h1>
Returns the values of x such that p(x)=0.
The polynomial p should be factorable over integers.
Returns a vector for multiple roots.
<p>
<h1><tt><a name="simplify">simplify(<i>x</i>)</a></tt></h1>
Returns x in a simpler form.
<p>
<h1><tt><a name="sin">sin(<i>x</i>)</a></tt></h1>
Returns the sine of x.
<p>
<h1><tt><a name="sinh">sinh(<i>x</i>)</a></tt></h1>
Returns the hyperbolic sine of x.
<p>
<h1><tt><a name="sqrt">sqrt(<i>x</i>)</a></tt></h1>
Returns the square root of x.
<p>
<h1><tt><a name="stop">stop()</a></tt></h1>
In a script, it does what it says.
<p>
<h1><tt><a name="subst">subst(<i>a,b,c</i>)</a></tt></h1>
Substitutes "a" for b in c and returns the result.
<p>
<h1><tt><a name="sum">sum(<i>i,j,k,f</i>)</a></tt></h1>
For i equals j through k evaluate f.
Returns the sum of all f.
<p>
<h1><tt><a name="tan">tan(<i>x</i>)</a></tt></h1>
Returns the tangent of <i>x</i>.
<p>
<h1><tt><a name="tanh">tanh(<i>x</i>)</a></tt></h1>
Returns the hyperbolic tangent of <i>x</i>.
<p>
<h1><tt><a name="taylor">taylor(<i>f,x,n,a</i>)</a></tt></h1>
Returns the Taylor expansion of f(x) around x=a.
If "a" is omitted then a=0 is used.
The argument n is the degree of the expansion.
<p><h1><tt><a name="test">test(<i>a,b,c,d,...</i>)</a></tt></h1>
If "a" is true then b is returned
else if c is true then d is returned, etc.
If the number of arguments is odd then the last argument is returned
when all else fails.
<p>
<h1><tt><a name="transpose">transpose(<i>a,i,j</i>)</a></tt></h1>
Returns the transpose of "a" with respect to indices i and j.
If i and j are omitted then 1 and 2 are used.
Hence a matrix can be transposed with a single argument.
<p>
<h1><tt><a name="unit">unit(<i>n</i>)</a></tt></h1>
Returns an n by n identity matrix.
<p>
<h1><tt><a name="zero">zero(<i>i,j,...</i>)</a></tt></h1>
Returns a null tensor with dimensions i, j, etc.
Useful for creating a tensor and then setting the component values.
<p>
<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=103462&amp;type=2" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a>
</body>
</html>