# HP Forums

Full Version: [Bug] Calculus calculation in xcas
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(i) calculating indefinite integrals

(1)
Xcas can calculate this
Code:
`int(x^-n,x)`
But can't calculate this
Code:
`int(1/x^n,x)`

(2)

(ii) In terms of derivative
(1)
Code:
`tcollect(laplacian(f(r*cos(theta)*cos(beta),r*cos(theta)*sin(beta),r*sin(theta))​,[r,beta,theta]))`

(2)
Code:
`zeros(diff(f(x,y,z(x,y)),[x,y]),diff(z(x,y),[x,y]))`

thank you parisse!
Code:
`int(e^x*sin(x)^2/(1+sin(x)+cos(x))^2,x)`
Xcas can't solve
Wolfram alpha
(05-28-2019 02:07 PM)yangyongkang Wrote: [ -> ]
Code:
`int(e^x*sin(x)^2/(1+sin(x)+cos(x))^2,x)`
Xcas can't solve
Wolfram alpha

Seems to work on okay on my Prime virtual and hardware calculators as well as xcas on the computer. It's pretty messy till you use simplify, but it works.
(05-28-2019 02:07 PM)yangyongkang Wrote: [ -> ]
Code:
`int(e^x*sin(x)^2/(1+sin(x)+cos(x))^2,x)`
Xcas can't solve
Wolfram alpha

For what it's worth, the TI Nspire can't solve it either!
Select more complex indefinite points and test xcas or hp prime
Code:
```normal(([int(1/(x^3+x+1), x),  int(sin(a*x)*sin(b*x)*sin(c*x), x),  int((x+x^(1/2)+1)^(1/2), x),  int(exp(-i*x)/cosh(x)^3, x),  int(arctan(x)*ln((x^2+1)*(1/2))/(x+1), x),  int(ln(2*sin((1/2)*x))^2, x),  int(exp(a*x^n), x),  int(x^2/cos(x), x),  int(x*sin(x)*cos(x^2), x),  int(cos(sin(x)^2), x),  int(max(sin(x), cos(x)), x),  int(1/(sin(x)*sqrt(1+cos(x))), x),  int(sqrt(-x^2+1)*arcsin(x), x),  int(arcsin(sqrt(x))/sqrt(x*(1-x)), x),  int(arccos(x)/(-x^2+1)^(3/2), x),  int(arcsin(x)*(x^2+1)/(x^2*sqrt(-x^2+1)), x),  int(1/((x-1)^4*sqrt(1/x)), x),  int(x^3/sqrt(-x^2+2*x+1), x),  int(sqrt(x*(x+1))/(sqrt(x)+sqrt(x+1)), x),  int(1/(1+sqrt(-x^2-2*x+1)), x),  int(1/(x+sqrt(x^2+x+1)), x),  int(sqrt(x^2+x+1)/(x+1), x),  int(sqrt(x/(1+x*sqrt(x))), x),  int(x/sqrt(1+2^x), x),  int(2^x/sqrt(1+3^x), x),  int(sqrt(1+4*x+sqrt(x)), x),  int(arctan(x)*ln((x^2+1)*(1/2))/(x+1), x),  int(ln(2*sin((1/2)*x))^2, x),  int(ln(x+1)/(x^2+1), x),  int(ln(1/2+(1/2)*sqrt(1+4*x))/x, x),  int(x*ln(x/(1-x))/sqrt(-x^2+1), x),  int(1/((x^2+a)*(x^2+b)), x),  int(1/(x^6+x^3+2), x),  int((x-sin(x))/((pi^2+x^2)*x^3), x),  int(1/(x^4+x^2+x+1))]))```
(05-29-2019 02:51 AM)yangyongkang Wrote: [ -> ]Select more complex indefinite points and test xcas or hp prime

Actually, the Prime is able to find antiderivatives for some of these, but others not. Of the ones for which it could not, I tried a few on WolframAlpha and it also failed to find the antiderivatives. I didn't bother checking them all. Are there any of these that you listed that another CAS solves but Prime does not? Some functions simply don't have antiderivatives that can be expressed in closed form.

You can't blame the Prime/xcas for not finding something that's not there.
[suggestion] supports region integration and Boolean functions
For example, to calculate the area of a circle, we can do this
Code:
`int(int(when(x^2+y^2<=r^2,1,0),x,-r,r),y,-r,r)`
but not support
(05-29-2019 04:27 AM)Wes Loewer Wrote: [ -> ]
(05-29-2019 02:51 AM)yangyongkang Wrote: [ -> ]Select more complex indefinite points and test xcas or hp prime

Actually, the Prime is able to find antiderivatives for some of these, but others not. Of the ones for which it could not, I tried a few on WolframAlpha and it also failed to find the antiderivatives. I didn't bother checking them all. Are there any of these that you listed that another CAS solves but Prime does not? Some functions simply don't have antiderivatives that can be expressed in closed form.

You can't blame the Prime/xcas for not finding something that's not there.

This is just testing, not comparing, because these examples are complicated
The problem is not solved, there is a new fixed point problem
hello, every one.I am back again. The unhappy thing is that these bugs are still not solved, new firmware is coming out, I hope the new CAS version can solve these problems.
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :