SandBox Integration
last edited 1 year ago by test1

Integration

Let's do some integration examples:

fricas
(1) -> integrate(%e^x, x)
Type: Union(Expression(Integer),...)

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

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

Below FriCAS gives up because sign of a is unknown:

fricas
integrate(exp(-a*x^2),x=0..%plusInfinity)
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)
Type: Union(Expression(Integer),...)

fricas
integrate(2*x/sin(x)^2,x)
Type: Union(Expression(Integer),...)

Comparing FriCAS and Reduce:

fricas
integrate(sin(1/x),x)
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 FriCAS 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)
Type: Union(Expression(Integer),...)

fricas
integrate(sin(x)/x,x)
Type: Union(Expression(Integer),...)
fricas
differentiate(%,x)
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)
Type: Union(pole: potentialPole,...)

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

fricas
integrate(atan(x/a)/x,x)
Type: Union(Expression(Integer),...)

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

fricas
integrate(x^3+x^2/4+x,x)
Type: Polynomial(Fraction(Integer))

You cannot integrate Expression Float

fricas
integrate(50*%e^(-0.02*t),t)
There are 9 exposed and 11 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)
Type: Union(Expression(Fraction(Integer)),...)

fricas
integrate(exp(cos(x)),x)
Type: Union(Expression(Integer),...)

fricas
integrate(sin(x),x)
Type: Union(Expression(Integer),...)
fricas
integrate(%,x)
Type: Union(Expression(Integer),...)

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

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

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

fricas
integrate(exp(-1/t),t)
Type: Union(Expression(Integer),...)

fricas
integrate(exp(-1/t),t=1..x)
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)
Type: Union(Expression(Integer),...)

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

From the ReduceProblem?:

fricas
integrate(1/sqrt(2*%pi)*exp(-1/2*log(x)^2),x=0..%plusInfinity)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)
fricas
integrate(1/sqrt(2*%pi)*exp(-1/2*log(x)^2),x)
Type: Union(Expression(Integer),...)

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

Mathematical Paradox?
2005年2月10日 17:45:57 -0600 reply
Area under the curve:
fricas
integrate(1/x,x=1..%plusInfinity)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)
Paradox Part2:
2005年2月10日 17:47:59 -0600 reply
Volume under that curve:
fricas
integrate(%pi*((1/x)^2), x=1..%plusInfinity)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)

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

... --unknown, 2005年5月17日 18:52:42 -0500 reply
fricas
integrate(1/x,x)
Type: Union(Expression(Integer),...)
fricas
integrate(sqrt(x),x)
Type: Union(Expression(Integer),...)
fricas
integrate(sqrt(x^3+x),x)
Type: Union(Expression(Integer),...)

a turning moving body --unknown, 2005年6月19日 20:16:03 -0500 reply
fricas
)set output tex off
 
fricas
)set output algebra on
integrate(( a*sin( m + n*t + o*t*t/2 ) )/( n + ot ) + ( b*cos( m + n*t + o*t*t/2 ) )/( n + ot ), t)
(33) +---+ | o 2 2 (o t + n) |--- 2 m o - n 2 m o - n \|%pi (- b sin(----------) + a cos(----------))fresnelS(---------------) 2 o 2 o o + +---+ | o 2 2 (o t + n) |--- 2 m o - n 2 m o - n \|%pi (a sin(----------) + b cos(----------))fresnelC(---------------) 2 o 2 o o / +---+ | o (ot + n) |--- \|%pi
Type: Union(Expression(Integer),...)

a turning accelerating body --unknown, 2005年6月19日 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)
(34) +---+ | o 2 2 (o t + n) |--- 2 m o - n 2 m o - n \|%pi (- a sin(----------) - b cos(----------))fresnelS(---------------) 2 o 2 o o + +---+ | o 2 2 (o t + n) |--- 2 m o - n 2 m o - n \|%pi (- b sin(----------) + a cos(----------))fresnelC(---------------) 2 o 2 o o / +---+ | o |--- \|%pi
Type: Union(Expression(Integer),...)
fricas
)set output algebra off
 
fricas
)set output tex on

... --unknown, 2005年6月26日 16:02:47 -0500 reply
fricas
integrate(-2*(3-3*t)^2*(3*t),t)
Type: Polynomial(Fraction(Integer))

... --unknown, 2005年10月30日 09:29:01 -0600 reply
fricas
integrate(1/(1+x^2),x=-u..u)
Type: Union(pole: potentialPole,...)
fricas
integrate(1/(1+x^2),x=-u..u, "noPole")
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)

... --unknown, 2005年11月01日 10:35:26 -0600 reply
fricas
integrate(x^6*exp(-x^2), x=0..%plusInfinity)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)

... --unknown, 2005年11月02日 17:00:21 -0600 reply
fricas
integrate(1/sqrt(1/x+1),x)
Type: Union(Expression(Integer),...)

... --unknown, 2005年11月23日 08:30:18 -0600 reply
fricas
integrate(sin(sin x), x)
Type: Union(Expression(Integer),...)

... --unknown, 2005年11月25日 16:28:37 -0600 reply
fricas
integrate(a/2*(1-cos(b*t)),t)
Type: Union(Expression(Integer),...)

yet another test that shall work but not in maple ? --unknown, 2006年3月09日 09:21:47 -0600 reply
fricas
integrate(tan(atan(x)/3),x)
Type: Union(Expression(Integer),...)

... --unknown, 2006年3月11日 12:41:33 -0600 reply
fricas
integrate(x, x)
Type: Polynomial(Fraction(Integer))
fricas
simplify((1/(2*z))*z^2)
Type: Expression(Integer)
fricas
integrate((1/(2*z))*z^2, z)
Type: Union(Expression(Integer),...)
fricas
integrate(log(x),x)
Type: Union(Expression(Integer),...)
fricas
integrate(1/x,x)
Type: Union(Expression(Integer),...)
fricas
integrate(0^0,x)
Type: Polynomial(Fraction(Integer))

from fr.sci.maths --unknown, 2006年5月09日 09:58:11 -0500 reply
fricas
integrate( log(y)^3/(y*(y-1)),y)
Type: Union(Expression(Integer),...)

... --unknown, 2006年5月29日 14:20:28 -0500 reply
fricas
integrate(exp(-x^2),x=0..%plusInfinity)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)

... --unknown, 2006年5月29日 14:21:39 -0500 reply
fricas
integrate(x^2*exp(-x^2),x=0..%plusInfinity)
Type: Union(f1: OrderedCompletion?(Expression(Integer)),...)

test --unknown, 2006年7月19日 11:59:36 -0500 reply
No ; after command or else output is supressed.
fricas
integrate(exp(%i*2*%pi*f*t), t=0..T)
Type: Union(f1: OrderedCompletion?(Expression(Complex(Integer))),...)

FriCAS and Maxima not capable of this integrand --WinnieThePooh?, 2007年5月29日 17:24:44 -0500 reply
int(exp(sin(x)),x);
reduce
\displaylines{\qdd \int {e^{\sin \(x

fricas
integrate(exp(sin(x)),x)
Type: Union(Expression(Integer),...)

An integral which Maxima can't do, but FriCAS can --amca01, 2010年1月05日 15:08:53 -0800 reply
fricas
integrate(sqrt(x+sqrt(1+x^2))/x,x)
Type: Union(Expression(Integer),...)

Exp Integral --pabjr, 2020年4月14日 22:01:58 +0000 reply
fricas
)set output algebra on
r2:=integrate((1 - x)*%e^((-b*(x - 1))/(x + d)),x)
(55) - b x + b --------- 2 2 x + d (- x + (- b d - b + 2)x + (- b + 1)d + (- b + 2)d)%e + 2 2 2 2 b d + b - b ((b - 2 b)d + (2 b - 4 b)d + b - 2 b)Ei(-------)%e x + d / 2
Type: Union(Expression(Integer),...)
fricas
unparse(r2::InputForm)
(56) "(((-1)*x^2+((-1)*b*d+((-1)*b+2))*x+(((-1)*b+1)*d^2+((-1)*b+2)*d))*exp(((-1)* b*x+b)/(x+d))+((b^2+(-2)*b)*d^2+(2*b^2+(-4)*b)*d+(b^2+(-2)*b))*Ei((b*d+b)/(x+ d))*exp((-1)*b))/2"
Type: String

Test

fricas
ii := integral(sin(x), x)
x ++ (57) | sin(%A)d%A ++
Type: Expression(Integer)

... --Mark, 2021年12月30日 17:31:48 +0000 reply
fricas
integrate((7*x^13+10*x^8+4*x^7-7*x^6-4*x^3-4*x^2+3*x+3)/(x^14-2*x^8-2*x^7-2*x^4-4*x^3-x^2+2*x+1),x)
(58) 14 8 7 4 3 2 log(x - 2 x - 2 x - 2 x - 4 x - x + 2 x + 1) + +-+ \|2 * log 9 8 3 2 +-+ 14 8 7 (- 2 x - 2 x + 2 x + 4 x + 2 x)\|2 + x - 2 x - 2 x + 4 3 2 2 x + 4 x + 3 x + 2 x + 1 / 14 8 7 4 3 2 x - 2 x - 2 x - 2 x - 4 x - x + 2 x + 1 / 2
Type: Union(Expression(Integer),...)




Subject: Be Bold !!
( 16 subscribers )
Please rate this page:

AltStyle によって変換されたページ (->オリジナル) /