Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

why this integral fail using "fricas" algorithm?

Using sagemath 8.9 on Linux, with Fricas 1.5 installed

>sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.9, Release Date: 2019-09-29                     │
│ Using Python 2.7.16. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
sage: var('x')
x
sage: integrate(sqrt(2)*x^2 + 2*x,x, algorithm="fricas")
  File "<string>", line unknown
SyntaxError: Malformed expression

sage: integrate(sqrt(2)*x^2 + 2*x,x, algorithm="maxima")
1/3*sqrt(2)*x^3 + x^2

But it works when using Fricas 1.5 directly

2) -> ii:=integrate(sqrt(2)*x^2 + 2*x,x);
                                            Type: Polynomial(AlgebraicNumber)
(3) -> unparse(ii::InputForm)    
   (3)  "((2^(1/2))/3)::AlgebraicNumber()*x^3+1::AlgebraicNumber()*x^2"
                                                                 Type: String

Is this a bug in the sagemath <---> Fricas interface?

Thanks --Nasser

why this integral fail using "fricas" algorithm?

Using sagemath 8.9 on Linux, with Fricas 1.5 installed

>sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.9, Release Date: 2019-09-29                     │
│ Using Python 2.7.16. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
sage: var('x')
x
sage: integrate(sqrt(2)*x^2 + 2*x,x, algorithm="fricas")
  File "<string>", line unknown
SyntaxError: Malformed expression

sage: integrate(sqrt(2)*x^2 + 2*x,x, algorithm="maxima")
1/3*sqrt(2)*x^3 + x^2

But it works when using Fricas 1.5 directly

2) -> ii:=integrate(sqrt(2)*x^2 + 2*x,x);
                                            Type: Polynomial(AlgebraicNumber)
(3) -> unparse(ii::InputForm)    
   (3)  "((2^(1/2))/3)::AlgebraicNumber()*x^3+1::AlgebraicNumber()*x^2"
                                                                 Type: String

Is this a bug in the sagemath <---> Fricas Fricas interface?

Thanks --Nasser

why this integral fail using "fricas" algorithm?

Using sagemath 8.9 on Linux, with Fricas 1.5 installed

>sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.9, Release Date: 2019-09-29                     │
│ Using Python 2.7.16. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
sage: var('x')
x
sage: integrate(sqrt(2)*x^2 + 2*x,x, algorithm="fricas")
  File "<string>", line unknown
SyntaxError: Malformed expression

sage: integrate(sqrt(2)*x^2 + 2*x,x, algorithm="maxima")
1/3*sqrt(2)*x^3 + x^2

But it works when using Fricas 1.5 directly

2) -> ii:=integrate(sqrt(2)*x^2 + 2*x,x);
                                            Type: Polynomial(AlgebraicNumber)
(3) -> unparse(ii::InputForm)    
   (3)  "((2^(1/2))/3)::AlgebraicNumber()*x^3+1::AlgebraicNumber()*x^2"
                                                                 Type: String

Is this a bug in the sagemath <---> Fricas interface?

Thanks --Nasser

why this integral fail using "fricas" algorithm?

Using sagemath 8.9 on Linux, with Fricas 1.5 installed

>sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.9, Release Date: 2019-09-29                     │
│ Using Python 2.7.16. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
sage: var('x')
x
sage: integrate(sqrt(2)*x^2 + 2*x,x, algorithm="fricas")
  File "<string>", line unknown
SyntaxError: Malformed expression

sage: integrate(sqrt(2)*x^2 + 2*x,x, algorithm="maxima")
1/3*sqrt(2)*x^3 + x^2

But it works when using Fricas 1.5 directly

2) -> ii:=integrate(sqrt(2)*x^2 + 2*x,x);
                                            Type: Polynomial(AlgebraicNumber)
(3) -> unparse(ii::InputForm)    
   (3)  "((2^(1/2))/3)::AlgebraicNumber()*x^3+1::AlgebraicNumber()*x^2"
                                                                 Type: String

Is this a bug in the sagemath <---> Fricas interface?

Thanks --Nasser