login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Integration

Let's do some integration examples:

axiom
integrate(%e**x, x)
LatexWiki Image(1)
Type: Union(Expression Integer,...)

load_package SPECFN;
reduce

on ROUNDED,ADJPREC;
reduce

Ei(1.00000000000000000001);
*** precision increased to 21
reduce
LatexWiki Image 
Ei(1.0);
reduce
LatexWiki Image 
Ei(2.0);
reduce
LatexWiki Image 

Can Reduce compute Ei in arbitrary precision?

See http://www.uni-koeln.de/REDUCE/3.6/doc/specfn/

Also http://homepages.inf.ed.ac.uk/mtoussai/publications/toussaint-99-mexico.pdf

Reset

off ROUNDED,ADJPREC;
reduce

int(cos(x),x,0,pi);
*** ci already defined as operator 
*** si already defined as operator
reduce
LatexWiki Image 

axiom
integrate(x^2/sqrt(4-x^2),x)
LatexWiki Image(2)
Type: Union(Expression Integer,...)

axiom
integrate(exp(-a*x**2),x=0..%plusInfinity)
LatexWiki Image(3)
Type: Union(fail: failed,...)

The following won't "work", see CommonMistakes:

axiom
integrate(exp(-a::PositiveInteger*x**2),x=0..%plusInfinity)
Cannot convert from type Variable a to PositiveInteger for value a

axiom
integrate((x^3+x^2+2)/(x*(x^2-1)^2), x)
LatexWiki Image(4)
Type: Union(Expression Integer,...)

axiom
integrate(2*x/sin(x)^2,x)
LatexWiki Image(5)
Type: Union(Expression Integer,...)

Comparing Axiom and Reduce:

axiom
integrate(sin(1/x),x)
LatexWiki Image(6)
Type: Union(Expression Integer,...)

int(sin(1/x),x);
reduce
LatexWiki Image 

Hell, why does the following blow MathAction?:

  \begin{reduce}
  load_package algint;
  int(sin(1/x),x);
  \end{reduce}

A different problem, where Axiom has to give up:

axiom
integrate(sqrt(sin(1/x)),x)
>> Error detected within library code: integrate: implementation incomplete (constant residues)

However, in Reduce: Again, why does the following blow MathAction?:

  \begin{reduce}
  load_package algint;
  int(sqrt(sin(1/x)),x);
  \end{reduce}

axiom
integrate(exp(-x^2),x)
LatexWiki Image(7)
Type: Union(Expression Integer,...)

axiom
integrate(sin(x)/x,x)
LatexWiki Image(8)
Type: Union(Expression Integer,...)
axiom
differentiate(%,x)
LatexWiki Image(9)
Type: Expression Integer

axiom
integrate(sin(1/x),x=%minusInfinity..%plusInfinity,"noPole")
>> Error detected within library code: integrate: pole in path of integration

axiom
integrate(2*x/sin(x)^2,x=1/2..1);
Type: Union(pole: potentialPole,...)

axiom
integrate(sin(x),x=0..%pi/2)
LatexWiki Image(10)
Type: Union(f1: OrderedCompletion? Expression Integer,...)

axiom
integrate(atan(x/a)/x,x)
LatexWiki Image(11)
Type: Union(Expression Integer,...)

axiom
integrate(1/(a+z^3), z=0..1,"noPole")
LatexWiki Image(12)
Type: Union(f1: OrderedCompletion? Expression Integer,...)

axiom
integrate(x^3+x^2/4+x,x)
LatexWiki Image(13)
Type: Polynomial Fraction Integer

You cannot integrate Expression Float

axiom
integrate(50*%e^(-0.02*t),t)
There are 11 exposed and 8 unexposed library operations named integrate having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op integrate 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 integrate with argument type(s) Expression Float Variable t
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

But symbolic integration works with integer expressions

axiom
integrate(50*%e^(-0.02*t)::Expression Fraction Integer,t)
LatexWiki Image(14)
Type: Union(Expression Fraction Integer,...)

axiom
integrate(exp(cos(x)),x)
LatexWiki Image(15)
Type: Union(Expression Integer,...)

axiom
integrate(sin(x),x)
  integrate(%,x)
>> Error detected within library code: Sorry - cannot handle that integrand yet

axiom
integrate(a/h - c*h/12 + (b/h)*r + (c/h)*r^2,r)
LatexWiki Image(16)
Type: Union(Expression Integer,...)

axiom
integrate(exp(-(a+b*t)^2/2),t)
LatexWiki Image(17)
Type: Union(Expression Integer,...)

axiom
integrate(exp(-(a+b*t)^2/t),t)
LatexWiki Image(18)
Type: Union(Expression Integer,...)

axiom
integrate(exp(-1/t),t)
LatexWiki Image(19)
Type: Union(Expression Integer,...)

axiom
integrate(exp(-1/t),t=1..x)
LatexWiki Image(20)
Type: Union(pole: potentialPole,...)

Unfortunately, there is currently no easy way to make "assumptions" about variables. Thus, The following won't work:

  \begin{axiom}
   assume(x, real)
   integrate(exp(-1/t),t=1..x)
   \end{axiom}

axiom
integrate(t*exp(-(a+b*t)^2/2),t)
LatexWiki Image(21)
Type: Union(Expression Integer,...)

axiom
integrate(1/(a+z^3), z=0..1,"noPole")
LatexWiki Image(22)
Type: Union(f1: OrderedCompletion? Expression Integer,...)

From the ReduceProblem? (what does axiom do?):

axiom
int(1/sqrt(2*PI)*exp(-1/2*log(x)**2),x,0,INFINITY);
There are 34 exposed and 23 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) PositiveInteger Domain
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

Well, you should use Axiom syntax. Note that PI is a domain, spelled out: PositiveInteger in Axiom, the constant LatexWiki Image is denoted %pi. Furthermore, the operation you want is called integrate. Finally, infinity is denoted %infinity, but in fact, I wouldn't know how to do such integrals in Axiom anyway. Thus, the best I get is:

axiom
integrate(1/sqrt(2*%pi)*exp(-1/2*log(x)**2),x=0..k)
LatexWiki Image(23)
Type: Union(pole: potentialPole,...)

If you would get a result, you could use limit afterwards, of course.

Mathematical Paradox?
Thu, 10 Feb 2005 17:45:57 -0600 reply
Area under the curve:
axiom
integrate(1/x,x=1..%plusInfinity)
LatexWiki Image(24)
Type: Union(f1: OrderedCompletion? Expression Integer,...)
Paradox Part2:
Thu, 10 Feb 2005 17:47:59 -0600 replyVolume under that curve:
axiom
integrate(%pi*((1/x)^2), x=1..%plusInfinity)
LatexWiki Image(25)
Type: Union(f1: OrderedCompletion? Expression Integer,...)

Curve has an infinite area...but a finite volume (I think I did this correctly)!

axiom
integrate(1/x,x)
LatexWiki Image(26)
Type: Union(Expression Integer,...)

axiom
integrate(sqrt(x),x)
LatexWiki Image(27)
Type: Union(Expression Integer,...)

axiom
integrate(sqrt(x^3+x),x)
LatexWiki Image(28)
Type: Union(Expression Integer,...)

a turning moving body --unknown, Sun, 19 Jun 2005 20:16:03 -0500 reply
axiom
integrate(( a*sin( m + n*t + o*t*t/2 ) )/( n + ot ) + ( b*cos( m + n*t
+ o*t*t/2 ) )/( n + ot ), t)
LatexWiki Image(29)
Type: Union(Expression Integer,...)

a turning accelerating body --unknown, Sun, 19 Jun 2005 23:16:48 -0500 reply
axiom
integrate(( a*cos( m + n*t + o*t*t/2 ) )- ( b*sin( m + n*t +
o*t*t/2 ) ), t)
LatexWiki Image(30)
Type: Union(Expression Integer,...)

axiom
integrate(-2*(3-3*t)^2*(3*t),t)
LatexWiki Image(31)
Type: Polynomial Fraction Integer

integrate(1/(1+x**2),x=-u..u)

axiom
integrate(1/(1+x**2),x=-u..u)
LatexWiki Image(32)
Type: Union(pole: potentialPole,...)

axiom
integrate(x**6*exp(-x**2), x=0..%plusInfinity)
LatexWiki Image(33)
Type: Union(f1: OrderedCompletion? Expression Integer,...)

integrate(1/sqrt(1/x+1),x)

axiom
integrate(1/sqrt(1/x+1),x)
LatexWiki Image(34)
Type: Union(Expression Integer,...)

integrate(sin(sin x), x)

integrate(a/2(1-cos(bt)),t)

yet another test that shall work but not in maple ? --unknown, Thu, 09 Mar 2006 09:21:47 -0600 reply
integrate(tan(arctan(x)/3),x)

integrate(tan(arctan(x)/3),x);

integrate(x, x)

axiom
integrate(x, x)
LatexWiki Image(35)
Type: Polynomial Fraction Integer

axiom
integrate((1/(2*z))*z^2), z)
Line 1: integrate((1/(2*z))*z^2), z) ...........................A Error A: Improper syntax. 1 error(s) parsing

axiom
integrate((1/(2*z))*z^2, z)
LatexWiki Image(36)
Type: Union(Expression Integer,...)

axiom
simplify((1/(2*z))*z^2)
LatexWiki Image(37)
Type: Expression Integer
axiom
integrate((1/(2*z))*z^2, z)
LatexWiki Image(38)
Type: Union(Expression Integer,...)

integrate(ln(x),x)

integrate(1/x,x)

axiom
integrate(0**0,x)
LatexWiki Image(39)
Type: Polynomial Fraction Integer

from fr.sci.maths --unknown, Tue, 09 May 2006 09:56:50 -0500 reply
axiom
integrate( ln(y)^3/(y*(y-1)),y)
There are no library operations named ln Use HyperDoc Browse or issue )what op ln to learn if there is any operation containing " ln " in its name.
Cannot find a definition or applicable library operation named ln with argument type(s) Variable y
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

from fr.sci.maths --unknown, Tue, 09 May 2006 09:58:11 -0500 reply
axiom
integrate( log(y)^3/(y*(y-1)),y)
LatexWiki Image(40)
Type: Union(Expression Integer,...)

axiom
integrate(exp(-x^2),x=0..%plusInfinity)
LatexWiki Image(41)
Type: Union(f1: OrderedCompletion? Expression Integer,...)

integrate(x*2exp(-x^2),x=0..%plusInfinity)

No ; after command or else output is supressed.
axiom
integrate(exp(%i*2*%pi*f*t), t=0..T)
LatexWiki Image(42)
Type: Union(f1: OrderedCompletion? Expression Complex Integer,...)

Axiom and Maxima not capable of this integrand --WinnieThePooh?, Tue, 29 May 2007 17:24:44 -0500 reply
int(exp(sin(x)),x)
reduce




subject:
  ( 7 subscribers )  
Please rate this page: