sympy cannot integrate sqrt(tan(x))

63 Views Asked by At

sympy returns just the integral symbol without solving it.

from sympy import tan, sqrt,symbols, integrate
x=symbols('x')
integrate(sqrt(tan(x))) 

The thing is that WolframAlpha, Maxima, and symbolab would solve the integral. Why sympy cannot do it?

1

There are 1 best solutions below

5
Gabriel Araújo On

Is this the problem?

from sympy import tan, sqrt, integrate, symbols

x = symbols('x', real = True)
integrate(sqrt(tan(x)))

# output:
Integral(sqrt(tan(x)), x)

sympy returns the Integral object when it cannot solve a particular integral. If other tools can do it, that's because they are more powerful tools.