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

Edit detail for SandBox Integration revision 10 of 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Editor: pabjr
Time: 2020/04/14 22:06:48 GMT+0
Note: Exp Integral

removed:
-From pabjr Tue Apr 14 22:03:00 +0000 2020
-From: pabjr
-Date: Tue, 14 Apr 2020 22:03:00 +0000
-Subject: Exp Integral
-Message-ID: <20200414220300+0000@fricas-wiki.math.uni.wroc.pl>
-
-integrate((1 - x/a)*%e^(-(b (x - a))/(x + d*a)),x)
-

Integration

Let's do some integration examples:

fricas
integrate(%e^x, x)

\label{eq1}{e}^{x}(1)
Type: Union(Expression(Integer),...)

int(cos(x),x,0,pi);
reduce
\displaylines{\qdd
0
\cr}
 

fricas
integrate(x^2/sqrt(4-x^2),x)

\label{eq2}{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{{32}\ {\sqrt{-{{x}^{2}}+ 4}}}- 
\
\
\displaystyle
{8 \ {{x}^{2}}}+{64}
(2)
Type: Union(Expression(Integer),...)

Below FriCAS? gives up because sign of a is unknown:

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

\label{eq3}\verb#"failed"#(3)
Type: Union(fail: failed,...)

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

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

fricas
integrate((x^3+x^2+2)/(x*(x^2-1)^2), x)

\label{eq4}{\left(
\begin{array}{@{}l}
\displaystyle
{{\left(-{5 \ {{x}^{2}}}+ 5 \right)}\ {\log \left({x + 1}\right)}}+{{\left({8 \ {{x}^{2}}}- 8 \right)}\ {\log \left({x}\right)}}+ 
\
\
\displaystyle
{{\left(-{3 \ {{x}^{2}}}+ 3 \right)}\ {\log \left({x - 1}\right)}}-{2 \  x}- 6 
(4)
Type: Union(Expression(Integer),...)

fricas
integrate(2*x/sin(x)^2,x)

\label{eq5}{{2 \ {\sin \left({x}\right)}\ {\log \left({{\sin \left({x}\right)}\over 2}\right)}}-{2 \  x \ {\cos \left({x}\right)}}}\over{\sin \left({x}\right)}(5)
Type: Union(Expression(Integer),...)

Comparing Axiom and Reduce:

fricas
integrate(sin(1/x),x)

\label{eq6}{{2 \  x \ {\sin \left({1 \over x}\right)}}-{Ci \left({1 \over x}\right)}-{Ci \left({-{1 \over x}}\right)}}\over 2(6)
Type: Union(Expression(Integer),...)

int(sin(1/x),x);
reduce
\displaylines{\qdd
\int {\sin 
      \(\frac{1}{
              x}
       

load_package algint;
int(sin(1/x),x);
reduce
\displaylines{\qdd
\int {\sin 
      \(\frac{1}{
              x}
       

A different problem, where Axiom has to give up:

fricas
integrate(sqrt(sin(1/x)),x)
>> Error detected within library code: integrate: implementation incomplete (has polynomial part)

In Reduce:

load_package algint;
int(sqrt(sin(1/x)),x);
reduce
\displaylines{\qdd
\frac{2\cdot 
      \sqrt{\sin 
            \(\frac{1}{
                    x}
             

fricas
integrate(exp(-x^2),x)

\label{eq7}{{\erf \left({x}\right)}\ {\sqrt{\pi}}}\over 2(7)
Type: Union(Expression(Integer),...)

fricas
integrate(sin(x)/x,x)

\label{eq8}Si \left({x}\right)(8)
Type: Union(Expression(Integer),...)
fricas
differentiate(%,x)

\label{eq9}{\sin \left({x}\right)}\over x(9)
Type: Expression(Integer)

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

fricas
integrate(2*x/sin(x)^2,x=1/2..1)

\label{eq10}\verb#"potentialPole"#(10)
Type: Union(pole: potentialPole,...)

fricas
integrate(sin(x),x=0..%pi/2)

\label{eq11}1(11)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)

fricas
integrate(atan(x/a)/x,x)

\label{eq12}\int^{
\displaystyle
x}{{{\arctan \left({\%A \over a}\right)}\over \%A}\ {d \%A}}(12)
Type: Union(Expression(Integer),...)

fricas
integrate(1/(a+z^3), z=0..1,"noPole")

\label{eq13}{\left(
\begin{array}{@{}l}
\displaystyle
-{{\sqrt{3}}\ {\log{\left({{3 \ {{a}^{2}}\ {{\root{3}\of{{a}^{2}}}^{2}}}+{{\left(-{2 \ {{a}^{3}}}+{{a}^{2}}\right)}\ {\root{3}\of{{a}^{2}}}}+{{a}^{4}}-{2 \ {{a}^{3}}}}\right)}}}+{2 \ {\sqrt{3}}\ {\log \left({{{\root{3}\of{{a}^{2}}}^{2}}+{2 \  a \ {\root{3}\of{{a}^{2}}}}+{{a}^{2}}}\right)}}+ 
\
\
\displaystyle
{{12}\ {\arctan \left({{{2 \ {\sqrt{3}}\ {\root{3}\of{{a}^{2}}}}-{a \ {\sqrt{3}}}}\over{3 \  a}}\right)}}+{2 \  \pi}
(13)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)

fricas
integrate(x^3+x^2/4+x,x)

\label{eq14}{{1 \over 4}\ {{x}^{4}}}+{{1 \over{12}}\ {{x}^{3}}}+{{1 \over 2}\ {{x}^{2}}}(14)
Type: Polynomial(Fraction(Integer))

You cannot integrate Expression Float

fricas
integrate(50*%e^(-0.02*t),t)
There are 12 exposed and 10 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

fricas
integrate(50*%e^(-0.02*t)::Expression Fraction Integer,t)

\label{eq15}-{{2500}\ {{e}^{-{{1 \over{50}}\  t}}}}(15)
Type: Union(Expression(Fraction(Integer)),...)

fricas
integrate(exp(cos(x)),x)

\label{eq16}\int^{
\displaystyle
x}{{{e}^{\cos \left({\%A}\right)}}\ {d \%A}}(16)
Type: Union(Expression(Integer),...)

fricas
integrate(sin(x),x)

\label{eq17}-{\cos \left({x}\right)}(17)
Type: Union(Expression(Integer),...)
fricas
integrate(%,x)

\label{eq18}-{\sin \left({x}\right)}(18)
Type: Union(Expression(Integer),...)

fricas
integrate(a/h - c*h/12 + (b/h)*r + (c/h)*r^2,r)

\label{eq19}{{4 \  c \ {{r}^{3}}}+{6 \  b \ {{r}^{2}}}+{{\left(-{c \ {{h}^{2}}}+{{12}\  a}\right)}\  r}}\over{{12}\  h}(19)
Type: Union(Expression(Integer),...)

fricas
integrate(exp(-(a+b*t)^2/2),t)

\label{eq20}{{\sqrt{2}}\ {\sqrt{\pi}}\ {\erf \left({{{\left({b \  t}+ a \right)}\ {\sqrt{{b}^{2}}}}\over{b \ {\sqrt{2}}}}\right)}}\over{2 \ {\sqrt{{b}^{2}}}}(20)
Type: Union(Expression(Integer),...)

fricas
integrate(exp(-(a+b*t)^2/t),t)

\label{eq21}\int^{
\displaystyle
t}{{{e}^{{-{{{\%A}^{2}}\ {{b}^{2}}}-{2 \  \%A \  a \  b}-{{a}^{2}}}\over \%A}}\ {d \%A}}(21)
Type: Union(Expression(Integer),...)

fricas
integrate(exp(-1/t),t)

\label{eq22}{t \ {{e}^{-{1 \over t}}}}+{Ei \left({-{1 \over t}}\right)}(22)
Type: Union(Expression(Integer),...)

fricas
integrate(exp(-1/t),t=1..x)

\label{eq23}\verb#"potentialPole"#(23)
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}

fricas
integrate(t*exp(-(a+b*t)^2/2),t)

\label{eq24}{\left(
\begin{array}{@{}l}
\displaystyle
-{a \  b \ {\sqrt{2}}\ {\sqrt{\pi}}\ {\erf \left({{{\left({b \  t}+ a \right)}\ {\sqrt{{b}^{2}}}}\over{b \ {\sqrt{2}}}}\right)}}- 
\
\
\displaystyle
{2 \ {{e}^{{-{{{b}^{2}}\ {{t}^{2}}}-{2 \  a \  b \  t}-{{a}^{2}}}\over 2}}\ {\sqrt{{b}^{2}}}}
(24)
Type: Union(Expression(Integer),...)

fricas
integrate(1/(a+z^3), z=0..1,"noPole")

\label{eq25}{\left(
\begin{array}{@{}l}
\displaystyle
-{{\sqrt{3}}\ {\log{\left({{3 \ {{a}^{2}}\ {{\root{3}\of{{a}^{2}}}^{2}}}+{{\left(-{2 \ {{a}^{3}}}+{{a}^{2}}\right)}\ {\root{3}\of{{a}^{2}}}}+{{a}^{4}}-{2 \ {{a}^{3}}}}\right)}}}+{2 \ {\sqrt{3}}\ {\log \left({{{\root{3}\of{{a}^{2}}}^{2}}+{2 \  a \ {\root{3}\of{{a}^{2}}}}+{{a}^{2}}}\right)}}+ 
\
\
\displaystyle
{{12}\ {\arctan \left({{{2 \ {\sqrt{3}}\ {\root{3}\of{{a}^{2}}}}-{a \ {\sqrt{3}}}}\over{3 \  a}}\right)}}+{2 \  \pi}
(25)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)

From the ReduceProblem?:

fricas
integrate(1/sqrt(2*%pi)*exp(-1/2*log(x)^2),x=0..%plusInfinity)

\label{eq26}{{{e}^{1 \over 2}}\ {\sqrt{2}}\ {\sqrt{\pi}}}\over{\sqrt{2 \  \pi}}(26)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)
fricas
integrate(1/sqrt(2*%pi)*exp(-1/2*log(x)^2),x)

\label{eq27}{{{e}^{1 \over 2}}\ {\sqrt{2}}\ {\sqrt{\pi}}\ {\erf \left({{{\log \left({x}\right)}- 1}\over{\sqrt{2}}}\right)}}\over{2 \ {\sqrt{2 \  \pi}}}(27)
Type: Union(Expression(Integer),...)

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:
fricas
integrate(1/x,x=1..%plusInfinity)

\label{eq28}+ \infty(28)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)
Paradox Part2:
Thu, 10 Feb 2005 17:47:59 -0600 reply
Volume under that curve:
fricas
integrate(%pi*((1/x)^2), x=1..%plusInfinity)

\label{eq29}\pi(29)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)

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

fricas
integrate(1/x,x)

\label{eq30}\log \left({x}\right)(30)
Type: Union(Expression(Integer),...)
fricas
integrate(sqrt(x),x)

\label{eq31}{2 \  x \ {\sqrt{x}}}\over 3(31)
Type: Union(Expression(Integer),...)
fricas
integrate(sqrt(x^3+x),x)

\label{eq32}\int^{
\displaystyle
x}{{\sqrt{{{\%A}^{3}}+ \%A}}\ {d \%A}}(32)
Type: Union(Expression(Integer),...)

a turning moving body --unknown, Sun, 19 Jun 2005 20:16:03 -0500 reply
fricas
integrate(( a*sin( m + n*t + o*t*t/2 ) )/( n + ot ) + ( b*cos( m + n*t + o*t*t/2 ) )/( n + ot ), t)

\label{eq33}{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{b \ {\sin{\left({{{2 \  m \  o}-{{n}^{2}}}\over{2 \  o}}\right)}}}+{a \ {\cos{\left({{{2 \  m \  o}-{{n}^{2}}}\over{2 \  o}}\right)}}}
(33)
Type: Union(Expression(Integer),...)

a turning accelerating body --unknown, Sun, 19 Jun 2005 23:16:48 -0500 reply
fricas
integrate(( a*cos( m + n*t + o*t*t/2 ) )- ( b*sin( m + n*t + o*t*t/2 ) ), t)

\label{eq34}{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{a \ {\sin{\left({{{2 \  m \  o}-{{n}^{2}}}\over{2 \  o}}\right)}}}-{b \ {\cos{\left({{{2 \  m \  o}-{{n}^{2}}}\over{2 \  o}}\right)}}}
(34)
Type: Union(Expression(Integer),...)

fricas
integrate(-2*(3-3*t)^2*(3*t),t)

\label{eq35}-{{{27}\over 2}\ {{t}^{4}}}+{{36}\ {{t}^{3}}}-{{27}\ {{t}^{2}}}(35)
Type: Polynomial(Fraction(Integer))

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

\label{eq36}\verb#"potentialPole"#(36)
Type: Union(pole: potentialPole,...)
fricas
integrate(1/(1+x^2),x=-u..u, "noPole")

\label{eq37}2 \ {\arctan \left({u}\right)}(37)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)

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

\label{eq38}{{15}\ {\sqrt{\pi}}}\over{16}(38)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)

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

\label{eq39}{-{\log \left({{\sqrt{{x + 1}\over x}}+ 1}\right)}+{\log \left({{\sqrt{{x + 1}\over x}}- 1}\right)}+{2 \  x \ {\sqrt{{x + 1}\over x}}}}\over 2(39)
Type: Union(Expression(Integer),...)

fricas
integrate(sin(sin x), x)

\label{eq40}\int^{
\displaystyle
x}{{\sin \left({\sin \left({\%A}\right)}\right)}\ {d \%A}}(40)
Type: Union(Expression(Integer),...)

fricas
integrate(a/2*(1-cos(b*t)),t)

\label{eq41}{-{a \ {\sin \left({b \  t}\right)}}+{a \  b \  t}}\over{2 \  b}(41)
Type: Union(Expression(Integer),...)

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

\label{eq42}{\left(
\begin{array}{@{}l}
\displaystyle
{8 \ {\log \left({{3 \ {{\tan \left({{\arctan \left({x}\right)}\over 3}\right)}^{2}}}- 1}\right)}}-{3 \ {{\tan \left({{\arctan \left({x}\right)}\over 3}\right)}^{2}}}+ 
\
\
\displaystyle
{{18}\  x \ {\tan \left({{\arctan \left({x}\right)}\over 3}\right)}}
(42)
Type: Union(Expression(Integer),...)

fricas
integrate(x, x)

\label{eq43}{1 \over 2}\ {{x}^{2}}(43)
Type: Polynomial(Fraction(Integer))
fricas
simplify((1/(2*z))*z^2)

\label{eq44}z \over 2(44)
Type: Expression(Integer)
fricas
integrate((1/(2*z))*z^2, z)

\label{eq45}{{z}^{2}}\over 4(45)
Type: Union(Expression(Integer),...)
fricas
integrate(log(x),x)

\label{eq46}{x \ {\log \left({x}\right)}}- x(46)
Type: Union(Expression(Integer),...)
fricas
integrate(1/x,x)

\label{eq47}\log \left({x}\right)(47)
Type: Union(Expression(Integer),...)
fricas
integrate(0^0,x)

\label{eq48}x(48)
Type: Polynomial(Fraction(Integer))

from fr.sci.maths --unknown, Tue, 09 May 2006 09:58:11 -0500 reply
fricas
integrate( log(y)^3/(y*(y-1)),y)

\label{eq49}\int^{
\displaystyle
y}{{{{\log \left({\%A}\right)}^{3}}\over{{{\%A}^{2}}- \%A}}\ {d \%A}}(49)
Type: Union(Expression(Integer),...)

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

\label{eq50}{\sqrt{\pi}}\over 2(50)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)

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

\label{eq51}{\sqrt{\pi}}\over 4(51)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)

No ; after command or else output is supressed.
fricas
integrate(exp(%i*2*%pi*f*t), t=0..T)

\label{eq52}{-{i \ {{e}^{2 \  i \  T \  f \  \pi}}}+ i}\over{2 \  f \  \pi}(52)
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
\displaylines{\qdd
\int {e^{\sin 
         \(x
          

fricas
integrate(exp(sin(x)),x)

\label{eq53}\int^{
\displaystyle
x}{{{e}^{\sin \left({\%A}\right)}}\ {d \%A}}(53)
Type: Union(Expression(Integer),...)

An integral which Maxima can't do, but Axiom can --amca01, Tue, 05 Jan 2010 15:08:53 -0800 reply
fricas
integrate(sqrt(x+sqrt(1+x^2))/x,x)

\label{eq54}\begin{array}{@{}l}
\displaystyle
-{\log \left({{\sqrt{{\sqrt{{{x}^{2}}+ 1}}+ x}}+ 1}\right)}+{\log \left({{\sqrt{{\sqrt{{{x}^{2}}+ 1}}+ x}}- 1}\right)}- 
\
\
\displaystyle
{2 \ {\arctan \left({\sqrt{{\sqrt{{{x}^{2}}+ 1}}+ x}}\right)}}+{2 \ {\sqrt{{\sqrt{{{x}^{2}}+ 1}}+ x}}}
(54)
Type: Union(Expression(Integer),...)

\begin(axiom) integrate((1 - x/a)%e^(-(b (x - a))/(x + da)),x) \end(axiom)