# Strange error in integration


[roganov@aorus bin]\$ ./sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.2, Release Date: 2020-10-24                     │
│ Using Python 3.8.5. Type "help()" for help.                        │
└────────────────────────────────────────────────────────────────────┘
sage: var('x')
x
sage: h = cos(1/2*x)*sqrt(4-x^2)
sage: integrate(h,x)
integrate(sqrt(-(x + 2)*(x - 2))*cos(1/2*x), x)
sage: integrate(h+x,x)
1/2*x^2
sage: integrate(cos(1/2*x)*sqrt(4-x^2)+x,x)
1/2*x^2

edit retag close merge delete

Sort by » oldest newest most voted

Maxima is the culprit

sage: integrate(cos(1/2*x)*sqrt(4-x^2)+x,x, algorithm='fricas')
integral(sqrt(-x^2 + 4)*cos(1/2*x) + x, x)
sage: integrate(cos(1/2*x)*sqrt(4-x^2)+x,x, algorithm='maxima')
1/2*x^2
sage: integrate(cos(1/2*x)*sqrt(4-x^2)+x,x, algorithm='giac')
integrate(sqrt(-x^2 + 4)*cos(1/2*x) + x, x)
sage: integrate(cos(1/2*x)*sqrt(4-x^2)+x,x, algorithm='sympy')
integrate(sqrt(-x^2 + 4)*cos(1/2*x) + x, x)

more

## Stats

Seen: 67 times

Last updated: May 04