Sin | trigonometric sine function |
Cos | trigonometric cosine function |
Tan | trigonometric tangent function |
ArcSin | inverse trigonometric function arc-sine |
ArcCos | inverse trigonometric function arc-cosine |
ArcTan | inverse trigonometric function arc-tangent |
Exp | exponential function |
Ln | natural logarithm |
Sqrt | square root |
Abs | absolute value or modulus of complex number |
Sign | sign of a number |
D | take derivative of expression with respect to variable |
Curl | curl of a vector field |
Diverge | divergence of a vector field |
Integrate | integration |
Limit | limit of an expression |
Sin(x) |
Yacas knows some trigonometric identities, so it can simplify to exact results even if N is not used. This is the case, for instance, when the argument is a multiple of Pi/6 or Pi/4.
These functions are threaded, meaning that if the argument x is a list, the function is applied to all entries in the list.
In> Sin(1) Out> Sin(1); In> N(Sin(1),20) Out> 0.84147098480789650665; In> Sin(Pi/4) Out> Sqrt(2)/2; |
Cos(x) |
Yacas knows some trigonometric identities, so it can simplify to exact results even if N is not used. This is the case, for instance, when the argument is a multiple of Pi/6 or Pi/4.
These functions are threaded, meaning that if the argument x is a list, the function is applied to all entries in the list.
In> Cos(1) Out> Cos(1); In> N(Cos(1),20) Out> 0.5403023058681397174; In> Cos(Pi/4) Out> Sqrt(1/2); |
Tan(x) |
Yacas knows some trigonometric identities, so it can simplify to exact results even if N is not used. This is the case, for instance, when the argument is a multiple of Pi/6 or Pi/4.
These functions are threaded, meaning that if the argument x is a list, the function is applied to all entries in the list.
In> Tan(1) Out> Tan(1); In> N(Tan(1),20) Out> 1.5574077246549022305; In> Tan(Pi/4) Out> 1; |
ArcSin(x) |
Note that the number y is not unique. For instance, Sin(0) and Sin(Pi) both equal 0, so what should ArcSin(0) be? In Yacas, it is agreed that the value of ArcSin(x) should be in the interval [-Pi/2, Pi/2].
Usually, Yacas leaves this function alone unless it is forced to do a numerical evaluation by the N function. If the argument is -1, 0, or 1 however, Yacas will simplify the expression. If the argument is complex, the expression will be rewritten using the Ln function.
This function is threaded, meaning that if the argument x is a list, the function is applied to all entries in the list.
In> ArcSin(1) Out> Pi/2; In> ArcSin(1/3) Out> ArcSin(1/3); In> Sin(ArcSin(1/3)) Out> 1/3; In> x:=N(ArcSin(0.75)) Out> 0.848062; In> N(Sin(x)) Out> 0.7499999477; |
ArcCos(x) |
Note that the number y is not unique. For instance, Cos(Pi/2) and Cos(3*Pi/2) both equal 0, so what should ArcCos(0) be? In Yacas, it is agreed that the value of ArcCos(x) should be in the interval [0,Pi] .
Usually, Yacas leaves this function alone unless it is forced to do a numerical evaluation by the N function. If the argument is -1, 0, or 1 however, Yacas will simplify the expression. If the argument is complex, the expression will be rewritten using the Ln function.
This function is threaded, meaning that if the argument x is a list, the function is applied to all entries in the list.
In> ArcCos(0) Out> Pi/2 |
In> ArcCos(1/3) Out> ArcCos(1/3) In> Cos(ArcCos(1/3)) Out> 1/3 |
In> x:=N(ArcCos(0.75)) Out> 0.7227342478 In> N(Cos(x)) Out> 0.75 |
ArcTan(x) |
Note that the number y is not unique. For instance, Tan(0) and Tan(2*Pi) both equal 0, so what should ArcTan(0) be? In Yacas, it is agreed that the value of ArcTan(x) should be in the interval [-Pi/2, Pi/2].
Usually, Yacas leaves this function alone unless it is forced to do a numerical evaluation by the N function. Yacas will try to simplify as much as possible while keeping the result exact. If the argument is complex, the expression will be rewritten using the Ln function.
This function is threaded, meaning that if the argument x is a list, the function is applied to all entries in the list.
In> ArcTan(1) Out> Pi/4 |
In> ArcTan(1/3) Out> ArcTan(1/3) In> Tan(ArcTan(1/3)) Out> 1/3 |
In> x:=N(ArcTan(0.75)) Out> 0.643501108793285592213351264945231378078460693359375 In> N(Tan(x)) Out> 0.75 |
Exp(x) |
This function is threaded, meaning that if the argument x is a list, the function is applied to all entries in the list.
In> Exp(0) Out> 1; In> Exp(I*Pi) Out> -1; In> N(Exp(1)) Out> 2.7182818284; |
Ln(x) |
This function is threaded, meaning that if the argument x is a list, the function is applied to all entries in the list.
In> Ln(1) Out> 0; In> Ln(Exp(x)) Out> x; In> D(x) Ln(x) Out> 1/x; |
Sqrt(x) |
This function is threaded, meaning that if the argument x is a list, the function is applied to all entries in the list.
In> Sqrt(16) Out> 4; In> Sqrt(15) Out> Sqrt(15); In> N(Sqrt(15)) Out> 3.8729833462; In> Sqrt(4/9) Out> 2/3; In> Sqrt(-1) Out> Complex(0,1); |
Abs(x) |
This function is connected to the Sign function by the identity "Abs(x) * Sign(x) = x" for real "x".
This function is threaded, meaning that if the argument x is a list, the function is applied to all entries in the list.
In> Abs(2); Out> 2; In> Abs(-1/2); Out> 1/2; In> Abs(3+4*I); Out> 5; |
Sign(x) |
This function is connected to the Abs function by the identity Abs(x)*Sign(x)=x for real x.
This function is threaded, meaning that if the argument x is a list, the function is applied to all entries in the list.
In> Sign(2) Out> 1; In> Sign(-3) Out> -1; In> Sign(0) Out> 1; In> Sign(-3) * Abs(-3) Out> -3; |
D(variable) expression D(list) expression D(variable,n) expression |
list -- a list of variables
expression -- expression to take derivatives of
n -- order of derivative
The D operator is threaded in both var and expr. This means that if either of them is a list, the function is applied to each entry in the list. The results are collected in another list which is returned. If both var and expr are a list, their lengths should be equal. In this case, the first entry in the list expr is differentiated with respect to the first entry in the list var, the second entry in expr is differentiated with respect to the second entry in var, and so on.
The D operator returns the original function if n=0, a common mathematical idiom that simplifies many formulae.
In> D(x)Sin(x*y) Out> y*Cos(x*y); In> D({x,y,z})Sin(x*y) Out> {y*Cos(x*y),x*Cos(x*y),0}; In> D(x,2)Sin(x*y) Out> -Sin(x*y)*y^2; In> D(x){Sin(x),Cos(x)} Out> {Cos(x),-Sin(x)}; |
Curl(vector, basis) |
basis -- list of variables forming the basis
Curl(f,x) = { D(x[2]) f[3] - D(x[3]) f[2], D(x[3]) f[1] - D(x[1]) f[3], D(x[1]) f[2] - D(x[2]) f[1] } |
In> Curl({x*y,x*y,x*y},{x,y,z}) Out> {x,-y,y-x}; |
Diverge(vector, basis) |
basis -- list of variables forming the basis
Diverge(f,x) = D(x[1]) f[1] + ... + D(x[n]) f[n], |
In> Diverge({x*y,x*y,x*y},{x,y,z}) Out> y+x; |
Integrate(var, x1, x2) expr Integrate(var) expr |
x1 -- first point of definite integration
x2 -- second point of definite integration
expr -- expression to integrate
Some simple integration rules have currently been implemented. Polynomials, some quotients of polynomials, trigonometric functions and their inverses, hyperbolic functions and their inverses, Exp, and Ln, and products of these functions with polynomials can be integrated.
In> Integrate(x,a,b) Cos(x) Out> Sin(b)-Sin(a); In> Integrate(x) Cos(x) Out> Sin(x); |
Limit(var, val) expr Limit(var, val, dir) expr |
val -- a number
dir -- a direction (Left or Right)
expr -- an expression
The second calling sequence is used for unidirectional limits. If one gives "dir" the value Left, the limit is taken as "var" approaches "val" from the positive infinity; and Right will take the limit from the negative infinity.
In> Limit(x,0) Sin(x)/x Out> 1; In> Limit(x,0) (Sin(x)-Tan(x))/(x^3) Out> -1/2; In> Limit(x,0) 1/x Out> Undefined; In> Limit(x,0,Left) 1/x Out> -Infinity; In> Limit(x,0,Right) 1/x Out> Infinity; |