$ python3.11
Python 3.11.15 (main, Mar 3 2026, 00:52:57) [Clang 17.0.0 (clang-1700.6.4.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sympy as sp
>>> from parallel_mixed import Tower, parallel_integrate_mixed as PIM
>>> x = sp.symbols('x', positive=True)
>>> q = 2*x**4 - 2*x**2 + 1
>>> N = (x**2 + 1)/x**3
>>> T = Tower([x], [(sp.S(1), sp.S(0))], q=q)
>>> f = (sp.S(0), sp.cancel(N/q))
>>> I = PIM(f, T)
>>> print(I)
log(x**2 - sqrt(2)*sqrt(2*x**4 - 2*x**2 + 1)/2 + sqrt(2)/2) + log(x**2 + sqrt(2)*sqrt(2*x**4 - 2*x**2 + 1)/2 - 1/2) - log(x**2 + sqrt(2)*sqrt(2*x**4 - 2*x**2 + 1)/2 + sqrt(2)/2) - sqrt(2*x**4 - 2*x**2 + 1)/(2*x**2)
>>> integrand = (x**2 + 1)/(x**3*sp.sqrt(q))
>>> print(sp.N((sp.diff(I, x) - integrand).subs(x, 2), 30))
0.e-166
>>>
that particular integral was (x**2 - 1) / (x**3 * sqrt(2*x**4 - 2*x**2 + 1))
it can be solved using pen and paper by a common old trick taking out an x from the sqrt part and dividing in numerator and now we will be left with form f'/sqrt(f) form which can be easily integrated --
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sympy/3baf0b21-ae63-48cc-a7ae-827ec1d00d30n%40googlegroups.com.
$ python3.11
Python 3.11.15 (main, Mar 3 2026, 00:52:57) [Clang 17.0.0 (clang-1700.6.4.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sympy as sp
>>> from sympy import sqrt
>>> from build_tower import integrate_surface
>>> x = sp.Symbol('x', positive=True)
>>> f = (x**2 - 1)/(x**3 * sqrt(2*x**4 - 2*x**2 + 1))
>>> F = integrate_surface(f, x)
>>> print(F)
sqrt(2*x**4 - 2*x**2 + 1)/(2*x**2)
>>> sp.simplify(sp.diff(F, x) - f)
0
>>>