Ask Your Question
3

Strange error in integration

asked 2021-05-04 13:55:38 +0200

roganov gravatar image

[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 flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2021-05-04 19:06:56 +0200

FrédéricC gravatar image

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)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-05-04 13:55:38 +0200

Seen: 58 times

Last updated: May 04