|
|
last edited 16 years ago by kratt6 |
1 2 3 | ||
Editor: kratt6
Time: 2008/01/03 05:16:26 GMT-8 |
||
Note: deindent 12 to make mathaction happy |
changed: - r:Fraction Integer:=1.544 - eq1:=90*%pi/180-asin(n*sin(34*%pi/180)/r)=asin(n/r) - s:=solve(eq1,n) - \end{axiom} r:Fraction Integer:=1.544 eq1:=90*%pi/180-asin(n*sin(34*%pi/180)/r)=asin(n/r) s:=solve(eq1,n) \end{axiom} changed: - eval(eq1,s.1)::Equation Expression Float - eval(eq1,s.2)::Equation Expression Float - \end{axiom} eval(eq1,s.1)::Equation Expression Float eval(eq1,s.2)::Equation Expression Float \end{axiom}
You have to use \begin{axiom} ... \end{axiom} or \begin{reduce} ... \end{reduce} before and after the command like this:
\begin{reduce} int(1/(a+z^3), z); \end{reduce}
Oh yes, note that for Axiom you don't end the command with ; and
the command for integration in Axiom is integrate
.
(1) -> integrate(1/(a+z^3),z)
(1) |
But it must be there for Reduce.
r^2+r+1; | reduce |
ln
is written log
This won't work:
\begin{axiom}integrate((x^2+2*x*ln(x)+5)/(sin(x^2+x^3-x^4)^2), x)\end{axiom}
Put the \begin{axiom} and \end{axiom} on separate lines and
notice that in Axiom ln
is written log
integrate((x^2+2*x*log(x)+5)/(sin(x^2+x^3-x^4)^2),x)
(2) |
This is wrong:
\begin{axiom} \sqrt{49/100} \end{axiom}
Begin each comment with an explanation. Don't put \ in front of the Axiom command.
Do it like this:
Some explanation \begin{axiom} sqrt{49/100} \end{axiom}
Some explanation
sqrt{49/100}
(3) |
This is wrong:
\begin{axiom} $ \sqrt{49/100} $ \end{axiom}
Don't put $ before and after $ and there is no \ in front.
Just do it like this:
\begin{axiom} sqrt{49/100} \end{axiom}
and what you will see is this:
sqrt{49/100}
(4) |
This command appears to work
integrate(x^5 ln[x],x)
(5) |
But notice that
5 ln[x]
(6) |
is something strange. Oddly perhaps, Axiom interprets 5
as a
UnivariatePolynomial and 'ln[x]' as a subscripted Symbol and the
result is a univariate polynomial in the variable 'ln[x]'.
So perhaps what you meant to write was:
integrate(x^5*log(x),x)
(7) |
begin
and end
The command:
\begin(axiom) integrate(sin(x)) \end(axiom)
wont work.
Use "braces" like this { } not parenthesis ( ) around {axiom}.
Finally, unless the expression is a univariate polynomial, then you must also specify the variable with which to integrate.
integrate(sin(x),x)
(8) |
This command:
\begin{axiom} solve{xy=1,x} \end{axiom}
uses {} after the solve operation. This is syntactically correct but it probably doesn't do what you might expect.
solve{xy=1,x}
(9) |
In Axiom {...,...} is executed as a block of commands which returns the result of the last command in the sequence. Compare
a:={xy=1,x}
(10) |
which is just x
to
b:=(xy=1,x)
(11) |
solve normally operates on such a tuple and
c:=[xy=1,x]
(12) |
which is a list and finally
c:=set [xy=1,x]
(13) |
which is how to construct a set.
Also notice that multiplication must be written using *
solve(x*y=1,x)
(14) |
I'd like to see if Axiom can do my favorite definite integral:
\begin{axiom} integrate(x^4/(sinh(x))^2,x,-inf,inf) \end{axiom}
In Axiom use %minusInfinity and %plusInfinity instead of -inf and inf.
integrate(x^4/(sinh(x))^2,x=%minusInfinity..%plusInfinity)
(15) |
The results of calculations depend on the type of the inputs You can tell Axiom that you would like the result expressed as a floating point number (if possible) using @. For example:
asin(1/2)@Float
(16) |
The trig functions are expressed in radians so use instead and instead of . Finally, because Axiom prefers symbolic calculations express as a rational number
r:Fraction Integer:=1.544
(17) |
eq1:=90*%pi/180-asin(n*sin(34*%pi/180)/r)=asin(n/r)
(18) |
s:=solve(eq1,n)
(19) |
Axiom thinks there are two solutions, unfortunately only one is valid:
eval(eq1,s.1)::Equation Expression Float
(20) |
eval(eq1,s.2)::Equation Expression Float
(21) |
For example
integrate((4 - x**2)**.5::Expression Fraction Integer,x)
There are no library operations named ** Use HyperDoc Browse or issue )what op ** to learn if there is any operation containing " ** " in its name.
Cannot find a definition or applicable library operation named ** with argument type(s) Variable(x) PositiveInteger
Perhaps you should use "@" to indicate the required return type,or "$" to specify which version of the function you need.
differentiate
or the abbreviation D
Since sin(x) cannot be interpreted as a univariate polynomial, you must specify the integration variable.
differentiate(sin(x),x)
(22) |
)abbrev
.
Typing )abb
is not enough even though that works in Axiom itself.