1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | ||
Editor: page
Time: 2007/09/26 23:55:01 GMT-7 |
||
Note: cleanup |
removed:
-From pbwagner Mon Sep 10 13:00:06 -0500 2007
-From: pbwagner
-Date: Mon, 10 Sep 2007 13:00:06 -0500
-Subject: example from my daughter's college calc
-Message-ID: <20070910130006-0500@wiki.axiom-developer.org>
-
-integrate(log(log(x)),x)
This is the front page of the SandBox. You can try anything you like here but keep in mind that other people are also using these pages to learn and experiment with Axiom and Reduce. Please be curteous to others if you correct mistakes and try to explain what you are doing.No Email Notices
Normally, if you
edit
any page on MathAction and clickSave
or if you add a comment to a page, a notice of the change is sent out to all subscribers on the axiom-developer email list, see the [Axiom Community]. Separate notices are also sent to those users whosubscribe
directly to MathAction.Use Preview
If you click
Preview
instead ofSave
, you will get a chance to see the result of your calculations and LaTeX commands but no email notice is sent out and the result is not saved until you decide to clickSave
or not.Use the SandBox
On this page or on any other page with a name beginning with SandBox such as SandBoxJohn2, SandBoxSimple, SandBoxEtc, clicking
Save
only sends email notices to users whosubscribe
directly to that specific SandBox page. Saving and adding comments does not create an email to the email list. You can safely use these pages for testing without disturbing anyone who might not care to know about your experiments.New SandBox Pages
You can also create new SandBox pages as needed just by editing this page and adding a link to the list of new page below. The link must include at least two uppercase letters and no spaces or alternatively it can be any phrase written inside [ ] brackets as long as it begins with SandBox. When you Save this page, the link to the new page will appear with a blue question mark ? beside it. Clicking on the blue question mark ? will ask you if you wish to create a new page.
generator
for type Vector[SandboxBiblography]
pretend
vs. strong typing[SandBox kaveh]
[MathMLFormat]
extend
to add a category to a previously defined domain.1::EXPR INT
or 1::FRAC INT
[SandBox Zero]
[SandBox Axiom Strengths]
[SandBox10]
[SandBoxKMG]
Click on the ? to create a new page. You should also edit this page to include a description and a new empty link for the next person.
Here is a simple Axiom command:
\begin{axiom} integrate(1/(a+z^3), z=0..1,"noPole") \end{axiom}
axiomintegrate(1/(a+z^3), z=0..1,"noPole")
And here is a REDUCE command:
\begin{reduce} load_package sfgamma; load_package defint; int(1/(a+z^3), z,0,1); \end{reduce} \begin{reduce} load_package sfgamma; load_package defint; int(1/(a+z^3), z,0,1); \end{reduce} <hr />
Please review the list of [Common Mistakes]? and the list of [MathAction Problems]? if you are have never used MathAction? before. If you are learning to use Axiom and think that someone must have solved some particular problem before you, check this list of Common [Axiom Problems]?.
axiom)set output tex off )set output algebra on
axiomsolve([x^2 + y^2 - 2*(ax*x + ay*y) = l1, x^2 + y^2 - 2*(cx*x + cy*y) = l2],[x,y]) (2) [ (- 2cy + 2ay)y - l2 + l1 [x= ------------------------, 2cx - 2ax 2 2 2 2 2 (4cy - 8ay cy + 4cx - 8ax cx + 4ay + 4ax )y + 2 2 (4cy - 4ay)l2 + (- 4cy + 4ay)l1 + (8ax cx - 8ax )cy - 8ay cx + 8ax ay cx * y + 2 2 2 2 l2 + (- 2l1 + 4ax cx - 4ax )l2 + l1 + (- 4cx + 4ax cx)l1 = 0 ] ]
But fails with LaTeX?.
axiom)set output tex on )set output algebra off
0**0
depends on the type of '0':
axiom(0::Float)**(0::Float) >> Error detected within library code: 0**0 is undefined
The idea was, that defining $0^0$ as 1 is ok whenever there is no notion of limit. However,
axiom(0::EXPR INT)**(0::EXPR INT)
is not quite in line with this, I think. There has been some discussion on this subject on axiom-developer.
It is easy to change this behaviour, if we know better...
Let's see if the same happens here:axiomsinCosProducts := rule sin (x) * sin (y) == (cos(x-y) - cos(x+y))/2 cos (x) * cos (y) == (cos(x-y) + cos(x+y))/2 sin (x) * cos (y) == (sin(x-y) + sin(x+y))/2
sinCosProducts := rule (_ sin (x) * sin (y) == (cos(x-y) - cos(x+y))/2; _ cos (x) * cos (y) == (cos(x-y) + cos(x+y))/2; _ sin (x) * cos (y) == (sin(x-y) + sin(x+y))/2)
Alternatively, using a text editor you can enter the commands into a
file called, for example sincos.input
exactly as in MathActon? above
and the use the command:
)read sincos.input
axiom)lib RINTERPA RINTERP PCDEN GUESS GUESSINT GUESSP )library cannot find the file RINTERPA. )library cannot find the file RINTERP. )library cannot find the file PCDEN. )library cannot find the file GUESS. )library cannot find the file GUESSINT. )library cannot find the file GUESSP. guess(n, [1, 5, 14, 34, 69, 135, 240, 416, 686, 1106], n+->n, [guessRat], [guessSum, guessProduct, guessOne],2)$GuessInteger GuessInteger is not a valid type.
z:=sum(myfn(x),x=1..10) -- This fails, why?
The reason this fails is because Axiom tries to evaluate
myfn(x)
first. But x
is not yet an Integer
so Axiom
cannot compute myfn(x)
. I guess you were expecting Axiom
to "wait" and not evaluate myfn(x)
until after x
has
been assigned the value 1, right? But Axiom does not work
this way.
The solution is to write myfn(x)
so that is can be applied
to something symbolic like x
. For example something this:
axiommyfn(i : Expression Integer) : Expression Integer == i Function declaration myfn : Expression Integer -> Expression Integer has been added to workspace.
axiommyfn(x)
Compiling function myfn with type Expression Integer -> Expression Integer
axiomz:=sum(myfn(x),x=1..10)
Thanks for your quick response. I tried to respond to this earlier, but didn't see it in the sand box, please forgive me if you get multiple copies.
I tried to simplify the code from my original program, and generated a univariate function, however my actual code has a multivariate function, and your excellent hint on the use of the Expression qualifier on the parameter and return type which works great for the univariate function case appears to fail for multivarite functions. Please consider the following example.
axioma(n : Expression Integer, k : Expression Integer, p : Expression Float) : Expression Float == binomial(n,k) * p**(k) * (1.0-p)**(n-k) Function declaration a : (Expression Integer,Expression Integer, Expression Float) -> Expression Float has been added to workspace.
axiomoutput(a(4,3,0.25)) -- see that the function actually evaluates for sensible values
Compiling function a with type (Expression Integer,Expression Integer,Expression Float) -> Expression Float 0.046875
axiomz := sum(a(4,i,0.25), i=1..3) --- this fails There are 6 exposed and 2 unexposed library operations named sum having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op sum to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation. Cannot find a definition or applicable library operation named sum with argument type(s) Expression Float SegmentBinding PositiveInteger Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. output(z) 55
I did notice in the Axiom online book, chapter 6.6, around page 241, the recommendation to use untyped functions, which appears to allow Axiom to do inference on parameter and result type.
axiomb(n, k, p) == binomial(n,k) * p**(k) * (1.0-p)**(n-k)
axiomoutput(b(4,3,0.25)) -- see that the function actually evaluates for sensible values
Compiling function b with type (PositiveInteger,PositiveInteger, Float) -> Float 0.046875
axiomz := sum(b(4,i,0.25), i=1..3) --- this fails
Compiling function b with type (PositiveInteger,Variable i,Float) -> Expression Float There are 6 exposed and 2 unexposed library operations named sum having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op sum to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation. Cannot find a definition or applicable library operation named sum with argument type(s) Expression Float SegmentBinding PositiveInteger Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. output(z) 55
For univariate functions the approach
axiomc(k) == binomial(4,k) * 0.25**k * (1.0 - 0.25)**(4-k) -- This approach is only a test, but is not suitable for my program
axiomoutput(c(3)) -- test to see if function can be evaluated for sensible arguments
Compiling function c with type PositiveInteger -> Float 0.046875
axiomz := sum(c(i), i=1..3) -- still doesn't work
Compiling function c with type Variable i -> Expression Float There are 6 exposed and 2 unexposed library operations named sum having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op sum to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation. Cannot find a definition or applicable library operation named sum with argument type(s) Expression Float SegmentBinding PositiveInteger Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. output(z) 55
But interestingly something like
axiomd(k) == 1.5 * k -- coerce uotput to be a Float
axiomz := sum(d(i), i=1..3) -- This works!
Compiling function d with type Variable i -> Polynomial Float
axiomoutput(z) 9.0
Bill, thanks again for your quick help, unforutnatly I lack a local Axiom expert, any ideas would really be welcome here.
Try thisaxiomz := reduce(+,[b(4,i,0.25) for i in 1..3])
Thanks Bill Page for your help, it is much appreciated (although I used a for loop and not reduce :-)).
I'm having a bit of difficulty getting a Function returning a matrix to work as expected, perhaps it is just cockpit error, but I don't see the error of my ways.
axiomCFM(Q : Matrix(Float)): Matrix(Float) == x := nrows(Q) MyIdentityMatrix : Matrix(Float) := new(x, x, 0) for i in 1..nrows(MyIdentityMatrix) repeat MyIdnetityMatrix(i,i) := 1.0 Ninv := MyIdnetityMatrix - Q N := inverse(Ninv) N Function declaration CFM : Matrix Float -> Matrix Float has been added to workspace.
axiom--test ComputeFundamentalMatrix X := matrix[[0, 0.5, 0],[0.5, 0, 0.5],[0, 0.5, 0]]
axiomoutput(X) +0.0 0.5 0.0+ | | |0.5 0.0 0.5| | | +0.0 0.5 0.0+
axiomN := CFM(X) The form on the left hand side of an assignment must be a single variable, a Tuple of variables or a reference to an entry in an object supporting the setelt operation. output(N) N
Any ideas where I'm blowing it here? I tried explicitly setting N to be a Matrix type but that failed too.
axiomCFM(Q : Matrix(Float)): Matrix(Float) == x := nrows(Q) MyIdentityMatrix : Matrix(Float) := new(x, x, 0) for i in 1..nrows(MyIdentityMatrix) repeat MyIdnetityMatrix(i,i) := 1.0 Ninv := MyIdnetityMatrix - Q N := inverse(Ninv) N Function declaration CFM : Matrix Float -> Matrix Float has been added to workspace. Compiled code for CFM has been cleared. 1 old definition(s) deleted for function or rule CFM
axiom--test ComputeFundamentalMatrix X := matrix[[0, 0.5, 0],[0.5, 0, 0.5],[0, 0.5, 0]]
axiomoutput(X) +0.0 0.5 0.0+ | | |0.5 0.0 0.5| | | +0.0 0.5 0.0+
axiomN : Matrix(Float) := CFM(X) The form on the left hand side of an assignment must be a single variable, a Tuple of variables or a reference to an entry in an object supporting the setelt operation. output(N) N is declared as being in Matrix Float but has not been given a value.
Thanks again for all your help.
Regards:
Bill M. (Sorry, my unique last name attracts too much spam).
although I used a for loop and not reduce :-)
Good thinking. ;)
You have a simple typographical error. You have written both:
MyIdentityMatrix
and :
MyIdnetityMatrix
BTW, instead of the complicated construction of the identify matrix you should just write:
Ninv := 1 - Q
For matrices 1
denotes the identity.
axiom)set output tex off )set output algebra on FunFun := x**4 - 6* x**3 + 11* x*x + 2* x + 1 4 3 2 (28) x - 6x + 11x + 2x + 1
axiomradicalSolve(FunFun) (29) [ x = - ROOT +---------------------+2 | +-+ +----+ |2069\|3 + 144\|- 79 - 9 |--------------------- 3| +-+ \| 27\|3 + +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 30 |--------------------- - 169 3| +-+ \| 27\|3 * ROOT +---------------------+2 | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 + +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 15 |--------------------- + 169 3| +-+ \| 27\|3 / +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 + +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 - 144 |--------------------- 3| +-+ \| 27\|3 / +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 * ROOT +---------------------+2 | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 + +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 15 |--------------------- + 169 3| +-+ \| 27\|3 / +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 + +-------------------------------------------------------------+ | +---------------------+2 +---------------------+ | | +-+ +----+ | +-+ +----+ | |2069\|3 + 144\|- 79 |2069\|3 + 144\|- 79 |9 |--------------------- + 15 |--------------------- + 169 | 3| +-+ 3| +-+ | \| 27\|3 \| 27\|3 |------------------------------------------------------------- + 3 | +---------------------+ | | +-+ +----+ | |2069\|3 + 144\|- 79 | 9 |--------------------- | 3| +-+ \| \| 27\|3 / 2 , x = ROOT +---------------------+2 +---------------------+ | +-+ +----+ | +-+ +----+ |2069\|3 + 144\|- 79 |2069\|3 + 144\|- 79 - 9 |--------------------- + 30 |--------------------- 3| +-+ 3| +-+ \| 27\|3 \| 27\|3 + - 169 * ROOT +---------------------+2 | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 + +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 15 |--------------------- + 169 3| +-+ \| 27\|3 / +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 + +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 - 144 |--------------------- 3| +-+ \| 27\|3 / +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 * +-------------------------------------------------------------+ | +---------------------+2 +---------------------+ | | +-+ +----+ | +-+ +----+ | |2069\|3 + 144\|- 79 |2069\|3 + 144\|- 79 |9 |--------------------- + 15 |--------------------- + 169 | 3| +-+ 3| +-+ | \| 27\|3 \| 27\|3 |------------------------------------------------------------- | +---------------------+ | | +-+ +----+ | |2069\|3 + 144\|- 79 | 9 |--------------------- | 3| +-+ \| \| 27\|3 + +-------------------------------------------------------------+ | +---------------------+2 +---------------------+ | | +-+ +----+ | +-+ +----+ | |2069\|3 + 144\|- 79 |2069\|3 + 144\|- 79 |9 |--------------------- + 15 |--------------------- + 169 | 3| +-+ 3| +-+ | \| 27\|3 \| 27\|3 |------------------------------------------------------------- + 3 | +---------------------+ | | +-+ +----+ | |2069\|3 + 144\|- 79 | 9 |--------------------- | 3| +-+ \| \| 27\|3 / 2 , x = - ROOT +---------------------+2 | +-+ +----+ |2069\|3 + 144\|- 79 - 9 |--------------------- 3| +-+ \| 27\|3 + +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 30 |--------------------- - 169 3| +-+ \| 27\|3 * ROOT +---------------------+2 | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 + +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 15 |--------------------- + 169 3| +-+ \| 27\|3 / +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 + +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 144 |--------------------- 3| +-+ \| 27\|3 / +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 * ROOT +---------------------+2 | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 + +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 15 |--------------------- + 169 3| +-+ \| 27\|3 / +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 + +-------------------------------------------------------------+ | +---------------------+2 +---------------------+ | | +-+ +----+ | +-+ +----+ | |2069\|3 + 144\|- 79 |2069\|3 + 144\|- 79 |9 |--------------------- + 15 |--------------------- + 169 | 3| +-+ 3| +-+ | \| 27\|3 \| 27\|3 - |------------------------------------------------------------- + 3 | +---------------------+ | | +-+ +----+ | |2069\|3 + 144\|- 79 | 9 |--------------------- | 3| +-+ \| \| 27\|3 / 2 , x = ROOT +---------------------+2 +---------------------+ | +-+ +----+ | +-+ +----+ |2069\|3 + 144\|- 79 |2069\|3 + 144\|- 79 - 9 |--------------------- + 30 |--------------------- 3| +-+ 3| +-+ \| 27\|3 \| 27\|3 + - 169 * ROOT +---------------------+2 | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 + +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 15 |--------------------- + 169 3| +-+ \| 27\|3 / +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 + +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 144 |--------------------- 3| +-+ \| 27\|3 / +---------------------+ | +-+ +----+ |2069\|3 + 144\|- 79 9 |--------------------- 3| +-+ \| 27\|3 * +-------------------------------------------------------------+ | +---------------------+2 +---------------------+ | | +-+ +----+ | +-+ +----+ | |2069\|3 + 144\|- 79 |2069\|3 + 144\|- 79 |9 |--------------------- + 15 |--------------------- + 169 | 3| +-+ 3| +-+ | \| 27\|3 \| 27\|3 |------------------------------------------------------------- | +---------------------+ | | +-+ +----+ | |2069\|3 + 144\|- 79 | 9 |--------------------- | 3| +-+ \| \| 27\|3 + +-------------------------------------------------------------+ | +---------------------+2 +---------------------+ | | +-+ +----+ | +-+ +----+ | |2069\|3 + 144\|- 79 |2069\|3 + 144\|- 79 |9 |--------------------- + 15 |--------------------- + 169 | 3| +-+ 3| +-+ | \| 27\|3 \| 27\|3 - |------------------------------------------------------------- + 3 | +---------------------+ | | +-+ +----+ | |2069\|3 + 144\|- 79 | 9 |--------------------- | 3| +-+ \| \| 27\|3 / 2 ]
axiom)set output tex on )set output algebra off
Matthias
axiomt:=matrix ([[0,1,1],[1,-2,2],[1,2,-1]])
We cat diagonalise t by finding it's eigenvalues.
axiom)set output tex off )set output algebra on e:=radicalEigenvectors(t) (31) [ +-----------------+2 +-----------------+ | +-+ +------+ | +-+ +------+ |3\|3 + \|- 1345 |3\|3 + \|- 1345 3 |----------------- - 3 |----------------- + 7 3| +-+ 3| +-+ \| 6\|3 \| 6\|3 [radval= --------------------------------------------------, radmult= 1, +-----------------+ | +-+ +------+ |3\|3 + \|- 1345 3 |----------------- 3| +-+ \| 6\|3 radvect = [ [ [ +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 - 12\|3 |----------------- 3| +-+ \| 6\|3 + +-----------------+ | +-+ +------+ +-+ +------+ |3\|3 + \|- 1345 +-+ +------+ (60\|3 + 6\|- 1345 ) |----------------- + 205\|3 + 3\|- 1345 3| +-+ \| 6\|3 / +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 126\|3 |----------------- 3| +-+ \| 6\|3 ] , [ +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 6\|3 |----------------- 3| +-+ \| 6\|3 + +-----------------+ | +-+ +------+ +-+ +------+ |3\|3 + \|- 1345 +-+ +------+ (117\|3 - 3\|- 1345 ) |----------------- - 71\|3 + 9\|- 1345 3| +-+ \| 6\|3 / +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 126\|3 |----------------- 3| +-+ \| 6\|3 ] , [1]] ] ] , [ radval = +-----------------+2 | +-+ +------+ +---+ |3\|3 + \|- 1345 (- 3\|- 3 - 3) |----------------- 3| +-+ \| 6\|3 + +-----------------+ | +-+ +------+ +---+ |3\|3 + \|- 1345 (- 3\|- 3 + 3) |----------------- + 14 3| +-+ \| 6\|3 / +-----------------+ | +-+ +------+ +---+ |3\|3 + \|- 1345 (3\|- 3 - 3) |----------------- 3| +-+ \| 6\|3 , radmult= 1, radvect = [ [ [ +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 - 24\|3 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ ((- 60\|- 3 - 60)\|3 - 6\|- 1345 \|- 3 - 6\|- 1345 ) * +-----------------+ | +-+ +------+ |3\|3 + \|- 1345 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ (205\|- 3 - 205)\|3 + 3\|- 1345 \|- 3 - 3\|- 1345 / +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 252\|3 |----------------- 3| +-+ \| 6\|3 ] , [ +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 12\|3 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ ((- 117\|- 3 - 117)\|3 + 3\|- 1345 \|- 3 + 3\|- 1345 ) * +-----------------+ | +-+ +------+ |3\|3 + \|- 1345 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ (- 71\|- 3 + 71)\|3 + 9\|- 1345 \|- 3 - 9\|- 1345 / +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 252\|3 |----------------- 3| +-+ \| 6\|3 ] , [1]] ] ] , [ radval = +-----------------+2 | +-+ +------+ +---+ |3\|3 + \|- 1345 (- 3\|- 3 + 3) |----------------- 3| +-+ \| 6\|3 + +-----------------+ | +-+ +------+ +---+ |3\|3 + \|- 1345 (- 3\|- 3 - 3) |----------------- - 14 3| +-+ \| 6\|3 / +-----------------+ | +-+ +------+ +---+ |3\|3 + \|- 1345 (3\|- 3 + 3) |----------------- 3| +-+ \| 6\|3 , radmult= 1, radvect = [ [ [ +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 - 24\|3 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ ((60\|- 3 - 60)\|3 + 6\|- 1345 \|- 3 - 6\|- 1345 ) * +-----------------+ | +-+ +------+ |3\|3 + \|- 1345 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ (- 205\|- 3 - 205)\|3 - 3\|- 1345 \|- 3 - 3\|- 1345 / +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 252\|3 |----------------- 3| +-+ \| 6\|3 ] , [ +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 12\|3 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ ((117\|- 3 - 117)\|3 - 3\|- 1345 \|- 3 + 3\|- 1345 ) * +-----------------+ | +-+ +------+ |3\|3 + \|- 1345 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ (71\|- 3 + 71)\|3 - 9\|- 1345 \|- 3 - 9\|- 1345 / +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 252\|3 |----------------- 3| +-+ \| 6\|3 ] , [1]] ] ] ]
axiomd:=diagonalMatrix([e.1.radval,e.2.radval,e.3.radval]) Function definition for d is being overwritten. Compiled code for d has been cleared. (32) +-----------------+2 +-----------------+ | +-+ +------+ | +-+ +------+ |3\|3 + \|- 1345 |3\|3 + \|- 1345 3 |----------------- - 3 |----------------- + 7 3| +-+ 3| +-+ \| 6\|3 \| 6\|3 [[--------------------------------------------------,0,0], +-----------------+ | +-+ +------+ |3\|3 + \|- 1345 3 |----------------- 3| +-+ \| 6\|3 [0, +-----------------+2 | +-+ +------+ +---+ |3\|3 + \|- 1345 (- 3\|- 3 - 3) |----------------- 3| +-+ \| 6\|3 + +-----------------+ | +-+ +------+ +---+ |3\|3 + \|- 1345 (- 3\|- 3 + 3) |----------------- + 14 3| +-+ \| 6\|3 / +-----------------+ | +-+ +------+ +---+ |3\|3 + \|- 1345 (3\|- 3 - 3) |----------------- 3| +-+ \| 6\|3 , 0] , [0, 0, +-----------------+2 | +-+ +------+ +---+ |3\|3 + \|- 1345 (- 3\|- 3 + 3) |----------------- 3| +-+ \| 6\|3 + +-----------------+ | +-+ +------+ +---+ |3\|3 + \|- 1345 (- 3\|- 3 - 3) |----------------- - 14 3| +-+ \| 6\|3 / +-----------------+ | +-+ +------+ +---+ |3\|3 + \|- 1345 (3\|- 3 + 3) |----------------- 3| +-+ \| 6\|3 ] ]
Now prove it by constructing the simularity transformation from the eigenvectors:
axiomp:=horizConcat(horizConcat(e.1.radvect.1,e.2.radvect.1),e.3.radvect.1) (33) [ [ +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 - 12\|3 |----------------- 3| +-+ \| 6\|3 + +-----------------+ | +-+ +------+ +-+ +------+ |3\|3 + \|- 1345 +-+ +------+ (60\|3 + 6\|- 1345 ) |----------------- + 205\|3 + 3\|- 1345 3| +-+ \| 6\|3 / +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 126\|3 |----------------- 3| +-+ \| 6\|3 , +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 - 24\|3 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ ((- 60\|- 3 - 60)\|3 - 6\|- 1345 \|- 3 - 6\|- 1345 ) * +-----------------+ | +-+ +------+ |3\|3 + \|- 1345 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ (205\|- 3 - 205)\|3 + 3\|- 1345 \|- 3 - 3\|- 1345 / +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 252\|3 |----------------- 3| +-+ \| 6\|3 , +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 - 24\|3 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ ((60\|- 3 - 60)\|3 + 6\|- 1345 \|- 3 - 6\|- 1345 ) * +-----------------+ | +-+ +------+ |3\|3 + \|- 1345 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ (- 205\|- 3 - 205)\|3 - 3\|- 1345 \|- 3 - 3\|- 1345 / +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 252\|3 |----------------- 3| +-+ \| 6\|3 ] , [ +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 6\|3 |----------------- 3| +-+ \| 6\|3 + +-----------------+ | +-+ +------+ +-+ +------+ |3\|3 + \|- 1345 +-+ +------+ (117\|3 - 3\|- 1345 ) |----------------- - 71\|3 + 9\|- 1345 3| +-+ \| 6\|3 / +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 126\|3 |----------------- 3| +-+ \| 6\|3 , +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 12\|3 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ ((- 117\|- 3 - 117)\|3 + 3\|- 1345 \|- 3 + 3\|- 1345 ) * +-----------------+ | +-+ +------+ |3\|3 + \|- 1345 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ (- 71\|- 3 + 71)\|3 + 9\|- 1345 \|- 3 - 9\|- 1345 / +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 252\|3 |----------------- 3| +-+ \| 6\|3 , +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 12\|3 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ ((117\|- 3 - 117)\|3 - 3\|- 1345 \|- 3 + 3\|- 1345 ) * +-----------------+ | +-+ +------+ |3\|3 + \|- 1345 |----------------- 3| +-+ \| 6\|3 + +---+ +-+ +------+ +---+ +------+ (71\|- 3 + 71)\|3 - 9\|- 1345 \|- 3 - 9\|- 1345 / +-----------------+2 | +-+ +------+ +-+ |3\|3 + \|- 1345 252\|3 |----------------- 3| +-+ \| 6\|3 ] , [1,1,1]]
axiomp*d*inverse(p) +0 1 1 + | | (34) |1 - 2 2 | | | +1 2 - 1+
axiom)set output tex on )set output algebra off
\end{axiom}
Axiom can't integrame exp(x^4) ;(axiomintegrate(exp(x**4),x)
But Maple can...
axiomf(x) == (1/4)*x*(-Gamma(1/4,-x**4)*Gamma(3/4)+%pi*sqrt(2))/((-x**4)**(1/4)*Gamma(3/4))
axiomD(f(x),x)
Compiling function f with type Variable x -> Expression DoubleFloat
Gamma(x,y)
is not an elementary function.
Martin
This is both obviously wrong since the integrand is a positive function:axiomintegrate(1/(1+x^4),x=%minusInfinity..%plusInfinity)
axiomnumeric(integrate(1/(1+x^4),x=0..1))
axiom)clear co All user variables and function definitions have been cleared. All )browse facility databases have been cleared. Internally cached functions and constructors have been cleared. )clear completely is finished. n := 32
axiomy : FARRAY INT := new(n,1)
axiomn0 := n
axiomn1 := sum(x^1, x=0..n-1)
axiomn2 := sum(x^2, x=0..n-1)
axiomn3 := sum(x^3, x=0..n-1)
axiomn4 := sum(x^4, x=0..n-1)
axiomA := matrix([[n4, n3, n2],_ [n3, n2, n1],_ [n2, n1, n0]])
axiomX := vector([x1, x2, x3])
axiomB := vector([sum(x^2* u, x=0..n-1),_ sum(x* v, x=0..n-1),_ sum( w, x=0..n-1)])
axiomsolve([A * X = B], [x1, x2, x3]) There are 20 exposed and 3 unexposed library operations named solve having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op solve to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation. Cannot find a definition or applicable library operation named solve with argument type(s) List Equation Vector Fraction Polynomial Integer List OrderedVariableList [x1,x2,x3] Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.
axiomintegrate(1/((x+t)*sqrt(1+(x*t)**2)),t=0..%plusInfinity,"noPole")
axiomsubst(%,x=1)
axiomintegrate(1/((1+t)*sqrt(1+(1*t)**2)),t=0..%plusInfinity,"noPole")
axiomsimplify(%-subst((asinh(x^2)+asinh(1/x^2))/sqrt(1+x^4),x=1))
axiom%::Expression Float
axioma := matrix([ [-1,0,0,0,1,0], [0,1,0,0,0,0], [0,0,2,0,0,-2], [0,0,0,4,0,0], [0,0,0,0,3,0], [0,0,-3,0,0,3]])
axiomdeterminant(a)
axiominverse(a)
axiomAs := matrix([ [-3,1,1,1], [1,1,1,1], [1,1,1,1], [1,1,1,1]])
axiomA := subMatrix(As, 2,4,2,4)
axiomob := orthonormalBasis(A)
axiomP : Matrix(Expression Integer) := new(3,3,0)
axiomsetsubMatrix!(P,1,1,ob.3)
axiomsetsubMatrix!(P,1,2,ob.1)
axiomsetsubMatrix!(P,1,3,ob.2)
axiomPt := transpose(P)
axiomPs : Matrix(Expression Integer) := new(4,4,0)
axiomPs(1,1) := 1
axiomsetsubMatrix!(Ps,2,2,P)
axiomPsT := transpose(Ps)
axiomPsTAsPs := PsT * As * Ps
axiomb1 := PsTAsPs(2,1)
axioml1 := PsTAsPs(2,2)
axiomUs : Matrix(Expression Integer) := new(4,4,0)
axiomUs(1,1) := 1
axiomUs(2,2) := 1
axiomUs(3,3) := 1
axiomUs(4,4) := 1
axiomUs(2,1) := -b1 / l1
axiomPsUs := Ps * Us
axiomPsUsT := transpose(PsUs)
axiomPsUsTAsPsUs := PsUsT * As * PsUs
axiomC := inverse(PsUs)
axiomc := PsUsTAsPsUs(1,1)
axiomgQ := PsUsTAsPsUs / c
axiomx1 := transpose(matrix([[1,2,3,4]]))
axiomv1 := transpose(x1) * As * x1
axiomx2 := C * x1
axiomv2 := transpose(x2) * PsUsTAsPsUs * x2
axiomdraw(y**2/2+(x**2-1)**2/4-1=0, x,y, range ==[-2..2, -1..1]) There are 20 exposed and 18 unexposed library operations named ** having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op ** to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation. Cannot find a definition or applicable library operation named ** with argument type(s) FlexibleArray Integer PositiveInteger Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.
axiomf1 := taylor(1 - x**2,x = 0)
axiomasin f1
axiomsin %
SandboxMSkuce?
axiom1+1
SandBoxCS224?
axiomintegrate((x-1)/log(x), x)
axiomintegrate(x*exp(x)*sin(x),x)
axiom[p for p in primes(2,1000)|(p rem 16)=1]
axiom[p**2+1 for p in primes(2,100)]
axiomintegrate (2x^2 + 2x, x) Cannot find a definition or applicable library operation named 2 with argument type(s) Variable x Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.
\end {axiom}
axiomradix(36,37) >> Error detected within library code: index out of range
Is it error?
axiomintegrate(log(log(x)),x)
sage: unset PYTHONPATH; PATH=/usr/local/bin:$PATH HOME=/var/zope/var/LatexWiki sage 7327787296785384836-18px.sage mkdir: cannot create directory `/var/zope': Permission denied cp: target `/var/zope/var/LatexWiki/.sage//' is not a directory: No such file or directory Traceback (most recent call last): File "7327787296785384836-18px.py", line 2, in <module> from sage.all_cmdline import File "/usr/local/sage-2.6/local/lib/python2.5/site-packages/sage/all_cmdline.py", line 14, in <module> from sage.all import File "/usr/local/sage-2.6/local/lib/python2.5/site-packages/sage/all.py", line 53, in <module> from sage.misc.all import # takes a while File "/usr/local/sage-2.6/local/lib/python2.5/site-packages/sage/misc/all.py", line 1, in <module> from misc import (alarm, ellipsis_range, ellipsis_iter, srange, xsrange, sxrange, getitem, File "/usr/local/sage-2.6/local/lib/python2.5/site-packages/sage/misc/misc.py", line 76, in <module> raise OSError, " * Error trying to create the SAGE tmp directory in your home directory. A possible cause of this might be that you built or upgraded SAGE after typingsu
. You probably need to delete the directory $HOME/.sage." OSError: ** Error trying to create the SAGE tmp directory in your home directory. A possible cause of this might be that you built or upgraded SAGE after typingsu
. You probably need to delete the directory $HOME/.sage.[Errno 13] Permission denied:
/var/zope