text:
using Rubin
using Tests
using Elliptic
using HypergeometricFunctions
using Polylogarithms
using SpecialFunctions

@test integrate((d+f*x^2)^-1*(A+B*x)*(a+b*x+c*x^2), x) == :(x*f^-1*(A*c+B*b)+-1//2*f^-2*(B*c*d+-1*A*b*f+-1*B*a*f)*log(d+f*x^2)+(1/2)*B*c*f^-1*x^2+-1*d^-1//2*f^-3//2*(A*c*d+B*b*d+-1*A*a*f)*arctan(x*d^-1//2*f^(1/2)))
@test integrate((d+f*x^2)^-1*(a+b*x+c*x^2)^2*(A+B*x), x) == :(x*f^-2*(A*f*b^2+-1*A*c*(c*d+-2*a*f)+-1*B*b*(-2*a*f+2*c*d))+(1/2)*f^-2*x^2*(-1*B*(d*c^2+-1*f*b^2+-2*a*c*f)+2*A*b*c*f)+-1//2*f^-3*(-1*B*(c^2*d^2+-1*f*(d*b^2+-1*f*a^2)+-2*a*c*d*f)+2*A*b*f*(c*d+-1*a*f))*log(d+f*x^2)+-1*d^-1//2*f^-5//2*(-1*A*(c*d+-1*a*f)^2+A*d*f*b^2+-2*B*b*d*(c*d+-1*a*f))*arctan(x*d^-1//2*f^(1/2))+1//3*c*f^-1*x^3*(A*c+2*B*b)+1//4*B*c^2*f^-1*x^4)
@test integrate((d+f*x^2)^-1*(a+b*x+c*x^2)^3*(A+B*x), x) == :((1/2)*f^-4*(-1*B*(c*d+-1*a*f)*(c^2*d^2+-1*f*(-1*f*a^2+3*d*b^2)+-2*a*c*d*f)+A*b*f*(-1*f*(d*b^2+-3*f*a^2)+3*c^2*d^2+-6*a*c*d*f))*log(d+f*x^2)+-1*x*f^-3*(-1*A*c*(c^2*d^2+3*a^2*f^2+-3*a*c*d*f)+-3*B*b*(c*d+-1*a*f)^2+B*d*f*b^3+3*A*f*b^2*(c*d+-1*a*f))+-1//2*f^-3*x^2*(-1*B*(c^3*d^2+-3*c*f*(d*b^2+-1*f*a^2)+3*a*b^2*f^2+-3*a*d*f*c^2)+A*b*f*(-1*f*b^2+3*d*c^2+-6*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1/2)*f^(1/2))^-5//2*(A*f^(1/2)+B*d^(1/2))*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(b*f^(1/2)+2*c*d^(1/2))+2*a*f^(1/2)))+-1//2*d^-1//2*f^3//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-5//2*(B*d^(1/2)+-1*A*f^(1/2))*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(-1*b*f^(1/2)+2*c*d^(1/2))+-2*a*f^(1/2))))
@test integrate((-1+x^2)^-1*(-1+x+x^2)^-1//2*(1+2x), x) == :(-1//2*arctan((1/2)*(-1+x+x^2)^-1//2*(3+x))+3//2*arctanh((1/2)*(-1+x+x^2)^-1//2*(1+-3x)))
@test integrate((1+x^2)^-1*(-1+x+x^2)^-1//2*(1+2x), x) == :((-1+(1/2)*5^(1/2))^(1/2)*arctanh((-20+10*5^(1/2))^-1//2*(-1+x+x^2)^-1//2*(5+-2*5^(1/2)+x*5^(1/2)))+-1*(1+(1/2)*5^(1/2))^(1/2)*arctan((20+10*5^(1/2))^-1//2*(-1+x+x^2)^-1//2*(5+2*5^(1/2)+-1*x*5^(1/2))))
@test integrate((1+x^2)^-1*(a+b*x+c*x^2)^-1//2*(a+-1c+b*x), x) == :(-1//2*2^(1/2)*(a^2+b^2+c^2+-2*a*c)^-1//4*(a^2+b^2+c*(c+(a^2+b^2+c^2+-2*a*c)^(1/2))+-1*a*((a^2+b^2+c^2+-2*a*c)^(1/2)+2c))^(1/2)*arctanh((1/2)*2^(1/2)*(a+b*x+c*x^2)^-1//2*(a^2+b^2+c^2+-2*a*c)^-1//4*(a^2+b^2+c*(c+(a^2+b^2+c^2+-2*a*c)^(1/2))+-1*a*((a^2+b^2+c^2+-2*a*c)^(1/2)+2c))^-1//2*(b*(a^2+b^2+c^2+-2*a*c)^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2)*(d+f*x^2)^-1//2*(2*d*c^2+b*f*(b+(b^2+-4*a*c)^(1/2))+-2*a*c*f)^-1//2*(2*c*d+-1*f*x*(b+(b^2+-4*a*c)^(1/2))))+(1/2)*2^(1/2)*(b^2+-4*a*c)^-1//2*(2*d*c^2+b*f*(b+-1*(b^2+-4*a*c)^(1/2))+-2*a*c*f)^-1//2*(B*b+-1*B*(b^2+-4*a*c)^(1/2)+-2*A*c)*arctanh((1/2)*2^(1/2)*(d+f*x^2)^-1//2*(2*d*c^2+b*f*(b+-1*(b^2+-4*a*c)^(1/2))+-2*a*c*f)^-1//2*(2*c*d+-1*f*x*(b+-1*(b^2+-4*a*c)^(1/2)))))
@test integrate((a+c*x^2)^-1*(d+f*x^2)^-1//2*(A+B*x), x) == :(A*a^-1//2*(c*d+-1*a*f)^-1//2*arctan(x*a^-1//2*(d+f*x^2)^-1//2*(c*d+-1*a*f)^(1/2))+-1*B*c^-1//2*(c*d+-1*a*f)^-1//2*arctanh(c^(1/2)*(d+f*x^2)^(1/2)*(c*d+-1*a*f)^-1//2))
@test integrate((1+-2*x^2+3x)^-1//2*(2+-3*x^2+4x)^-1*(2+x), x) == :((1/2)*(-13//5+10^(1/2))^(1/2)*arctan((1/2)*(1+10^(1/2))^-1//2*(1+-2*x^2+3x)^-1//2*(12+-3*10^(1/2)+x*(1+4*10^(1/2))))+(1/2)*(13//5+10^(1/2))^(1/2)*arctanh((1/2)*(-1+10^(1/2))^-1//2*(1+-2*x^2+3x)^-1//2*(12+3*10^(1/2)+x*(1+-4*10^(1/2)))))
@test integrate((1+-2*x^2+3x)^-3//2*(2+-3*x^2+4x)^-1*(2+x), x) == :(-9//2*(-3//5+1//5*10^(1/2))^(1/2)*arctan((1/2)*(1+10^(1/2))^-1//2*(1+-2*x^2+3x)^-1//2*(12+-3*10^(1/2)+x*(1+4*10^(1/2))))+-1//17*(1+-2*x^2+3x)^-1//2*(30+28x)+9//2*(3//5+1//5*10^(1/2))^(1/2)*arctanh((1/2)*(-1+10^(1/2))^-1//2*(1+-2*x^2+3x)^-1//2*(12+3*10^(1/2)+x*(1+-4*10^(1/2)))))
@test integrate((1+-2*x^2+3x)^-5//2*(2+-3*x^2+4x)^-1*(2+x), x) == :(-1//51*(1+-2*x^2+3x)^-3//2*(30+28x)+-1//867*(1+-2*x^2+3x)^-1//2*(582+9628x)+9//2*(-53//5+17//5*10^(1/2))^(1/2)*arctan((1/2)*(1+10^(1/2))^-1//2*(1+-2*x^2+3x)^-1//2*(12+-3*10^(1/2)+x*(1+4*10^(1/2))))+9//2*(53//5+17//5*10^(1/2))^(1/2)*arctanh((1/2)*(-1+10^(1/2))^-1//2*(1+-2*x^2+3x)^-1//2*(12+3*10^(1/2)+x*(1+-4*10^(1/2)))))
@test integrate((1+2*x^2+3x)^-1//2*(2+-3*x^2+4x)^-1*(2+x), x) == :((1/2)*(1+-7//25*10^(1/2))^(1/2)*arctanh((1/2)*(55+17*10^(1/2))^-1//2*(1+2*x^2+3x)^-1//2*(12+3*10^(1/2)+x*(17+4*10^(1/2))))+-1//2*(1+7//25*10^(1/2))^(1/2)*arctanh((1/2)*(55+-17*10^(1/2))^-1//2*(1+2*x^2+3x)^-1//2*(12+-3*10^(1/2)+x*(17+-4*10^(1/2)))))
@test integrate((1+2*x^2+3x)^-3//2*(2+-3*x^2+4x)^-1*(2+x), x) == :(-1//10*(1239+1959//5*10^(1/2))^(1/2)*arctanh((1/2)*(55+-17*10^(1/2))^-1//2*(1+2*x^2+3x)^-1//2*(12+-3*10^(1/2)+x*(17+-4*10^(1/2))))+1//5*(1+2*x^2+3x)^-1//2*(42+44x)+1//10*(1239+-1959//5*10^(1/2))^(1/2)*arctanh((1/2)*(55+17*10^(1/2))^-1//2*(1+2*x^2+3x)^-1//2*(12+3*10^(1/2)+x*(17+4*10^(1/2)))))
@test integrate((1+2*x^2+3x)^-5//2*(2+-3*x^2+4x)^-1*(2+x), x) == :(-1//50*(4885115//3+1544809//3*10^(1/2))^(1/2)*arctanh((1/2)*(55+-17*10^(1/2))^-1//2*(1+2*x^2+3x)^-1//2*(12+-3*10^(1/2)+x*(17+-4*10^(1/2))))+1//15*(1+2*x^2+3x)^-3//2*(42+44x)+1//15*(1+2*x^2+3x)^-1//2*(546+460x)+1//50*(4885115//3+-1544809//3*10^(1/2))^(1/2)*arctanh((1/2)*(55+17*10^(1/2))^-1//2*(1+2*x^2+3x)^-1//2*(12+3*10^(1/2)+x*(17+4*10^(1/2)))))
@test integrate((4+x^2+2x)^-1*(5+x^2+2x)^-1//2*(1+x), x) == :(-1*arctanh((5+x^2+2x)^(1/2)))
@test integrate((4+x^2+2x)^-1*(5+x^2+2x)^-1//2*(4+x), x) == :(-1*arctanh((5+x^2+2x)^(1/2))+3^(1/2)*arctan(1//3*3^(1/2)*(5+x^2+2x)^-1//2*(1+x)))
@test integrate((3+x+x^2)^-1*(5+x+x^2)^-1//2*(1+2x), x) == :(-1*2^(1/2)*arctanh((1/2)*2^(1/2)*(5+x+x^2)^(1/2)))
@test integrate(x*(3+x+x^2)^-1*(5+x+x^2)^-1//2, x) == :(-1//2*2^(1/2)*arctanh((1/2)*2^(1/2)*(5+x+x^2)^(1/2))+-1//22*22^(1/2)*arctan(1//11*22^(1/2)*(5+x+x^2)^-1//2*(1+2x)))
@test integrate((d+e*x+f*x^2)^-1//2*(a*e+b*e*x+b*f*x^2)^-2*(A+B*x), x) == :((1/2)*B*b^-1//2*f^-1*(b*d+-1*a*e)^-3//2*arctanh(b^(1/2)*(b*d+-1*a*e)^-1//2*(d+e*x+f*x^2)^(1/2))+-1*e^-1*(b*d+-1*a*e)^-1*(b*e+-4*a*f)^-1*(d+e*x+f*x^2)^(1/2)*(a*e+b*e*x+b*f*x^2)^-1*(e*(A*b+-2*B*a)+-1*b*x*(B*e+-2*A*f))+(1/2)*e^-3//2*f^-1*(b*d+-1*a*e)^-3//2*(b*e+-4*a*f)^-3//2*(B*e+-2*A*f)*(-1*b*(e^2+4*d*f)+8*a*e*f)*arctanh(e^-1//2*(b*d+-1*a*e)^(1/2)*(b*e+-4*a*f)^-1//2*(d+e*x+f*x^2)^-1//2*(e+2*f*x)))
@test integrate((a+b*x+c*x^2)^(1/2)*(a*d+b*d*x+c*d*x^2)^-2*(g+h*x), x) == :(-1*d^-2*(b^2+-4*a*c)^-1*(a+b*x+c*x^2)^-1//2*(-4*a*h+2*b*g+2*x*(-1*b*h+2*c*g)))
@test integrate((-3+-1*x^2+-4x)^-1//2*(3+2*x^2+4x)^-1*(3+2x), x) == :(arctanh(x*(-3+-1*x^2+-4x)^-1//2))
@test integrate((-3+-1*x^2+-4x)^-1//2*(3+2*x^2+4x)^-1*(3+4x), x) == :(2^(1/2)*arctan((1/2)*2^(1/2)*(1+-1*(-3+-1*x^2+-4x)^-1//2*(3+x)))+-1*2^(1/2)*arctan((1/2)*2^(1/2)*(1+(-3+-1*x^2+-4x)^-1//2*(3+x)))+arctanh(x*(-3+-1*x^2+-4x)^-1//2))
@test integrate((a+b*x+c*x^2)^(1/2)*(a*d+b*d*x+c*d*x^2)^-3//2*(g+h*x), x) == :((1/2)*h*c^-1*d^-1*(a+b*x+c*x^2)^(1/2)*(a*d+b*d*x+c*d*x^2)^-1//2*log(a+b*x+c*x^2)+-1*c^-1*d^-1*(b^2+-4*a*c)^-1//2*(a+b*x+c*x^2)^(1/2)*(a*d+b*d*x+c*d*x^2)^-1//2*(-1*b*h+2*c*g)*arctanh((b^2+-4*a*c)^-1//2*(b+2*c*x)))
@test integrate(x^2*(c+d*x^2)^(1/2)*(a^2+b^2*x^2+2*a*b*x)^(1/2), x) == :(-1//60*d^-2*(a+b*x)^-1*(c+d*x^2)^3//2*(a^2+b^2*x^2+2*a*b*x)^(1/2)*(8*b*c+-15*a*d*x)+-1//8*a*c^2*d^-3//2*(a+b*x)^-1*(a^2+b^2*x^2+2*a*b*x)^(1/2)*arctanh(x*d^(1/2)*(c+d*x^2)^-1//2)+1//5*b*d^-1*x^2*(a+b*x)^-1*(c+d*x^2)^3//2*(a^2+b^2*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@test integrate(x^-1*(d+-1*f*x^2)^-1*(a+b*x+c*x^2)^(1/2), x) == :(-1*a^(1/2)*d^-1*arctanh((1/2)*a^-1//2*(a+b*x+c*x^2)^-1//2*(2a+b*x))+(1/2)*d^-1*f^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^(1/2)*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(b*f^(1/2)+2*c*d^(1/2))+2*a*f^(1/2)))+-1//2*d^-1*f^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^(1/2)*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(-1*b*f^(1/2)+2*c*d^(1/2))+-2*a*f^(1/2))))
@test integrate(x^-2*(d+-1*f*x^2)^-1*(a+b*x+c*x^2)^(1/2), x) == :((1/2)*d^-3//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^(1/2)*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(b*f^(1/2)+2*c*d^(1/2))+2*a*f^(1/2)))+(1/2)*d^-3//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^(1/2)*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(-1*b*f^(1/2)+2*c*d^(1/2))+-2*a*f^(1/2)))+-1*d^-1*x^-1*(a+b*x+c*x^2)^(1/2)+-1//2*b*a^-1//2*d^-1*arctanh((1/2)*a^-1//2*(a+b*x+c*x^2)^-1//2*(2a+b*x)))
@test integrate(x^-3*(d+-1*f*x^2)^-1*(a+b*x+c*x^2)^(1/2), x) == :((1/2)*d^-2*f^(1/2)*(a*f+c*d+b*d^(1/2)*f^(1/2))^(1/2)*arctanh((1/2)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(b^2+-4*a*c)^2*arctanh((1/2)*c^-1//2*(a+b*x+c*x^2)^-1//2*(b+2*c*x))+-3//128*b*c^-3*f^-1*(a+b*x+c*x^2)^(1/2)*(b+2*c*x)*(b^2+-4*a*c)+-1//16*b*d*c^-3//2*f^-3*(-1*f*b^2+24*d*c^2+12*a*c*f)*arctanh((1/2)*c^-1//2*(a+b*x+c*x^2)^-1//2*(b+2*c*x)))
@test integrate(x^2*(d+-1*f*x^2)^-1*(a+b*x+c*x^2)^3//2, x) == :((1/2)*d^(1/2)*f^-3*(a*f+c*d+b*d^(1/2)*f^(1/2))^3//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(b*f^(1/2)+2*c*d^(1/2))+2*a*f^(1/2)))+(1/2)*d^(1/2)*f^-3*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^3//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(-1*b*f^(1/2)+2*c*d^(1/2))+-2*a*f^(1/2)))+-1//8*c^-1*f^-1*(a+b*x+c*x^2)^3//2*(b+2*c*x)+-1//64*c^-2*f^-2*(a+b*x+c*x^2)^(1/2)*(b*(-3*f*b^2+80*d*c^2+12*a*c*f)+2*c*x*(-3*f*b^2+16*d*c^2+12*a*c*f))+-1//128*c^-5//2*f^-3*(3*b^4*f^2+128*c^4*d^2+48*f*c^2*(d*b^2+f*a^2)+-24*a*c*b^2*f^2+192*a*d*f*c^3)*arctanh((1/2)*c^-1//2*(a+b*x+c*x^2)^-1//2*(b+2*c*x)))
@test integrate(x*(d+-1*f*x^2)^-1*(a+b*x+c*x^2)^3//2, x) == :(-1//3*f^-1*(a+b*x+c*x^2)^3//2+(1/2)*f^-5//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^3//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(b*f^(1/2)+2*c*d^(1/2))+2*a*f^(1/2)))+-1//2*f^-5//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^3//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(-1*b*f^(1/2)+2*c*d^(1/2))+-2*a*f^(1/2)))+-1//8*c^-1*f^-2*(a+b*x+c*x^2)^(1/2)*(f*b^2+8*d*c^2+8*a*c*f+2*b*c*f*x)+-1//16*b*c^-3//2*f^-2*(-1*f*b^2+24*d*c^2+12*a*c*f)*arctanh((1/2)*c^-1//2*(a+b*x+c*x^2)^-1//2*(b+2*c*x)))
@test integrate((d+-1*f*x^2)^-1*(a+b*x+c*x^2)^3//2, x) == :(-1//4*f^-1*(a+b*x+c*x^2)^(1/2)*(5b+2*c*x)+(1/2)*d^-1//2*f^-2*(a*f+c*d+b*d^(1/2)*f^(1/2))^3//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(b*f^(1/2)+2*c*d^(1/2))+2*a*f^(1/2)))+(1/2)*d^-1//2*f^-2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^3//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(-1*b*f^(1/2)+2*c*d^(1/2))+-2*a*f^(1/2)))+-1//8*c^-1//2*f^-2*(3*f*b^2+8*d*c^2+12*a*c*f)*arctanh((1/2)*c^-1//2*(a+b*x+c*x^2)^-1//2*(b+2*c*x)))
@test integrate(x^-1*(d+-1*f*x^2)^-1*(a+b*x+c*x^2)^3//2, x) == :(-1*a^3//2*d^-1*arctanh((1/2)*a^-1//2*(a+b*x+c*x^2)^-1//2*(2a+b*x))+(1/2)*d^-1*f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*x+c*x^2)^-1//2*(b+2*c*x))+-1//16*b*c^-3//2*d^-2*(-1*f*b^2+24*d*c^2+12*a*c*f)*arctanh((1/2)*c^-1//2*(a+b*x+c*x^2)^-1//2*(b+2*c*x))+1//8*f*c^-1*d^-2*(a+b*x+c*x^2)^(1/2)*(b^2+8*a*c+2*b*c*x)+-1//16*b*f*c^-3//2*d^-2*(b^2+-12*a*c)*arctanh((1/2)*c^-1//2*(a+b*x+c*x^2)^-1//2*(b+2*c*x)))
@test integrate((1+-1*x^2)^-1*(a+b*x+c*x^2)^3//2, x) == :((a+b*x+c*x^2)^(1/2)*(-5//4*b+-1//2*c*x)+(1/2)*(a+b+c)^3//2*arctanh((1/2)*(a+b+c)^-1//2*(a+b*x+c*x^2)^-1//2*(b+2a+x*(b+2c)))+-1//2*(a+c+-1b)^3//2*arctanh((1/2)*(a+c+-1b)^-1//2*(a+b*x+c*x^2)^-1//2*(-1b+2a+x*(b+-2c)))+-1//8*c^-1//2*(3*b^2+8*c^2+12*a*c)*arctanh((1/2)*c^-1//2*(a+b*x+c*x^2)^-1//2*(b+2*c*x)))
@test integrate((1+-1*x^2)^-1*(-1+x^2+-1x)^(1/2), x) == :((1/2)*arctanh((1/2)*(-1+x^2+-1x)^-1//2*(1+3x))+-1//2*arctan((1/2)*(-1+x^2+-1x)^-1//2*(3+-1x))+arctanh((1/2)*(-1+x^2+-1x)^-1//2*(1+-2x)))
@test integrate((1+x^2)^-1*(x+x^2)^3//2, x) == :(-5//4*arctanh(x*(x+x^2)^-1//2)+(1+2^(1/2))^(1/2)*arctan((2+2*2^(1/2))^-1//2*(x+x^2)^-1//2*(1+2^(1/2)+-1x))+(x+x^2)^(1/2)*(5//4+(1/2)*x)+-1*(-1+2^(1/2))^(1/2)*arctanh((-2+2*2^(1/2))^-1//2*(x+x^2)^-1//2*(1+-1x+-1*2^(1/2))))
@test integrate(x^4*(d+-1*f*x^2)^-1*(a+b*x+c*x^2)^-1//2, x) == :((1/2)*d^3//2*f^-2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(a+b*x+c*x^2)^-1//2, x) == :(-1*c^-1//2*f^-1*arctanh((1/2)*c^-1//2*(a+b*x+c*x^2)^-1//2*(b+2*c*x))+(1/2)*d^(1/2)*f^-1*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(b*f^(1/2)+2*c*d^(1/2))+2*a*f^(1/2)))+(1/2)*d^(1/2)*f^-1*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(-1*b*f^(1/2)+2*c*d^(1/2))+-2*a*f^(1/2))))
@test integrate(x*(d+-1*f*x^2)^-1*(a+b*x+c*x^2)^-1//2, x) == :((1/2)*f^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(b*f^(1/2)+2*c*d^(1/2))+2*a*f^(1/2)))+-1//2*f^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(-1*b*f^(1/2)+2*c*d^(1/2))+-2*a*f^(1/2))))
@test integrate((d+-1*f*x^2)^-1*(a+b*x+c*x^2)^-1//2, x) == :((1/2)*d^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(b*f^(1/2)+2*c*d^(1/2))+2*a*f^(1/2)))+(1/2)*d^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(-1*b*f^(1/2)+2*c*d^(1/2))+-2*a*f^(1/2))))
@test integrate(x^-1*(d+-1*f*x^2)^-1*(a+b*x+c*x^2)^-1//2, x) == :(-1*a^-1//2*d^-1*arctanh((1/2)*a^-1//2*(a+b*x+c*x^2)^-1//2*(2a+b*x))+(1/2)*d^-1*f^(1/2)*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(b*f^(1/2)+2*c*d^(1/2))+2*a*f^(1/2)))+-1//2*d^-1*f^(1/2)*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(-1*b*f^(1/2)+2*c*d^(1/2))+-2*a*f^(1/2))))
@test integrate(x^-2*(d+-1*f*x^2)^-1*(a+b*x+c*x^2)^-1//2, x) == :((1/2)*b*a^-3//2*d^-1*arctanh((1/2)*a^-1//2*(a+b*x+c*x^2)^-1//2*(2a+b*x))+(1/2)*f*d^-3//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(b*f^(1/2)+2*c*d^(1/2))+2*a*f^(1/2)))+(1/2)*f*d^-3//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(-1*b*f^(1/2)+2*c*d^(1/2))+-2*a*f^(1/2)))+-1*a^-1*d^-1*x^-1*(a+b*x+c*x^2)^(1/2))
@test integrate(x^-3*(d+-1*f*x^2)^-1*(a+b*x+c*x^2)^-1//2, x) == :((1/2)*d^-2*f^3//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(b*f^(1/2)+2*c*d^(1/2))+2*a*f^(1/2)))+-1*f*a^-1//2*d^-2*arctanh((1/2)*a^-1//2*(a+b*x+c*x^2)^-1//2*(2a+b*x))+-1//2*a^-1*d^-1*x^-2*(a+b*x+c*x^2)^(1/2)+-1//2*d^-2*f^3//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(-1*b*f^(1/2)+2*c*d^(1/2))+-2*a*f^(1/2)))+-1//8*a^-5//2*d^-1*(3*b^2+-4*a*c)*arctanh((1/2)*a^-1//2*(a+b*x+c*x^2)^-1//2*(2a+b*x))+3//4*b*a^-2*d^-1*x^-1*(a+b*x+c*x^2)^(1/2))
@test integrate(x^4*(d+-1*f*x^2)^-1*(a+b*x+c*x^2)^-3//2, x) == :(-1*c^-3//2*f^-1*arctanh((1/2)*c^-1//2*(a+b*x+c*x^2)^-1//2*(b+2*c*x))+(1/2)*d^3//2*f^-1*(a*f+c*d+b*d^(1/2)*f^(1/2))^-3//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(b*f^(1/2)+2*c*d^(1/2))+2*a*f^(1/2)))+(1/2)*d^3//2*f^-1*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-3//2*arctanh((1/2)*(a+b*x+c*x^2)^-1//2*(a*f+c*d+-1*b*d^(1/2)*f^(1/2))^-1//2*(b*d^(1/2)+x*(-1*b*f^(1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^2+4x)^-1, x) == :(-5//4*arctanh(x*(-3+-1*x^2+-4x)^-1//2)+5//2*(-3+-1*x^2+-4x)^(1/2)+11//2*arcsin(2+x)+-1//4*x*(-3+-1*x^2+-4x)^(1/2)+-1//4*2^(1/2)*arctan((1/2)*2^(1/2)*(1+(-3+-1*x^2+-4x)^-1//2*(3+x)))+1//4*2^(1/2)*arctan((1/2)*2^(1/2)*(1+-1*(-3+-1*x^2+-4x)^-1//2*(3+x))))
@test integrate(x^3*(-3+-1*x^2+-4x)^-1//2*(3+2*x^2+4x)^-1, x) == :(-2*arcsin(2+x)+-1//2*(-3+-1*x^2+-4x)^(1/2)+-1//4*2^(1/2)*arctan((1/2)*2^(1/2)*(1+(-3+-1*x^2+-4x)^-1//2*(3+x)))+1//4*2^(1/2)*arctan((1/2)*2^(1/2)*(1+-1*(-3+-1*x^2+-4x)^-1//2*(3+x)))+arctanh(x*(-3+-1*x^2+-4x)^-1//2))
@test integrate(x^2*(-3+-1*x^2+-4x)^-1//2*(3+2*x^2+4x)^-1, x) == :((1/2)*arcsin(2+x)+-1//2*arctanh(x*(-3+-1*x^2+-4x)^-1//2)+(1/2)*2^(1/2)*arctan((1/2)*2^(1/2)*(1+(-3+-1*x^2+-4x)^-1//2*(3+x)))+-1//2*2^(1/2)*arctan((1/2)*2^(1/2)*(1+-1*(-3+-1*x^2+-4x)^-1//2*(3+x))))
@test integrate((-3+-1*x^2+-4x)^-1//2*(3+2*x^2+4x)^-1, x) == :(1//3*arctanh(x*(-3+-1*x^2+-4x)^-1//2)+-1//3*2^(1/2)*arctan((1/2)*2^(1/2)*(1+-1*(-3+-1*x^2+-4x)^-1//2*(3+x)))+1//3*2^(1/2)*arctan((1/2)*2^(1/2)*(1+(-3+-1*x^2+-4x)^-1//2*(3+x))))
@test integrate(x^-1*(-3+-1*x^2+-4x)^-1//2*(3+2*x^2+4x)^-1, x) == :(-4//9*arctanh(x*(-3+-1*x^2+-4x)^-1//2)+-1//9*2^(1/2)*arctan((1/2)*2^(1/2)*(1+(-3+-1*x^2+-4x)^-1//2*(3+x)))+-1//9*3^(1/2)*arctan(1//3*3^(1/2)*(-3+-1*x^2+-4x)^-1//2*(3+2x))+1//9*2^(1/2)*arctan((1/2)*2^(1/2)*(1+-1*(-3+-1*x^2+-4x)^-1//2*(3+x))))
@test integrate(x^-2*(-3+-1*x^2+-4x)^-1//2*(3+2*x^2+4x)^-1, x) == :(10//27*arctanh(x*(-3+-1*x^2+-4x)^-1//2)+-2//27*2^(1/2)*arctan((1/2)*2^(1/2)*(1+(-3+-1*x^2+-4x)^-1//2*(3+x)))+1//9*x^-1*(-3+-1*x^2+-4x)^(1/2)+2//9*3^(1/2)*arctan(1//3*3^(1/2)*(-3+-1*x^2+-4x)^-1//2*(3+2x))+2//27*2^(1/2)*arctan((1/2)*2^(1/2)*(1+-1*(-3+-1*x^2+-4x)^-1//2*(3+x))))
@test integrate((2+3x)^2*(6+12*x^2+17x)^(1/2)*(30+-12*x^2+31x)^2, x) == :(-873//1792*(6+12*x^2+17x)^7//2+-1*(6+12*x^2+17x)^7//2*(5//16+-3//32*x)+-125455//1811939328*3^(1/2)*arctanh(1//12*3^(1/2)*(6+12*x^2+17x)^-1//2*(17+24x))+-1//4718592*(6+12*x^2+17x)^3//2*(2132735+3010920x)+1//24576*(6+12*x^2+17x)^5//2*(426547+602184x)+1//150994944*(6+12*x^2+17x)^(1/2)*(2132735+3010920x))
@test integrate((6+12*x^2+17x)^(1/2)*(2+3x)*(30+-12*x^2+31x), x) == :(-1//20*(6+12*x^2+17x)^5//2+(6+12*x^2+17x)^3//2*(1649//768+97//32*x)+-1//24576*(6+12*x^2+17x)^(1/2)*(1649+2328x)+97//294912*3^(1/2)*arctanh(1//12*3^(1/2)*(6+12*x^2+17x)^-1//2*(17+24x)))
@test integrate((2+3x)^-1*(6+12*x^2+17x)^(1/2)*(30+-12*x^2+31x)^-1, x) == :(1//42*arctanh(1//84*(6+12*x^2+17x)^-1//2*(206+291x)))
@test integrate((2+3x)^-2*(6+12*x^2+17x)^(1/2)*(30+-12*x^2+31x)^-2, x) == :(97//3226944*arctanh(1//84*(6+12*x^2+17x)^-1//2*(206+291x))+3137*(384160+-115248x)^-1*(6+12*x^2+17x)^(1/2)+-1*(980+-294x)^-1*(6+12*x^2+17x)^-1//2*(275+388x))
@test integrate((2+3x)^-3*(6+12*x^2+17x)^(1/2)*(30+-12*x^2+31x)^-3, x) == :(40325//637540872192*arctanh(1//84*(6+12*x^2+17x)^-1//2*(206+291x))+-1634466587*(75897722880+-22769316864x)^-1*(6+12*x^2+17x)^(1/2)+-50555899//19361664*(10+-3x)^-2*(6+12*x^2+17x)^(1/2)+-1//294*(10+-3x)^-2*(6+12*x^2+17x)^-3//2*(275+388x)+1//8232*(10+-3x)^-2*(6+12*x^2+17x)^-1//2*(738029+1042556x))
@test integrate((x^2+-3x)^2//3*(-3+2x), x) == :(3//5*(x^2+-3x)^5//3)
@test integrate((x*(-3+x))^2//3*(-3+2x), x) == :(3//5*(-1*x*(3+-1x))^5//3)
@test integrate(x*(x^2+-3x)^-1//3*(9+-9x+2*x^2), x) == :(3//5*(x^2+-3x)^5//3)
@test integrate(x*(x*(-3+x))^-1//3*(9+-9x+2*x^2), x) == :(3//5*(x^2+-3x)^5//3)
@test integrate((d+f*x^2+x*A^-1*B^-1*(d*B^2+f*A^2))^(1/2)*(A+B*x)*(a+c*x^2+x*A^-1*B^-1*d^-1*f^-1*(a*A^2*f^2+c*B^2*d^2)), x) == :(-1//16*f^-2*(d+f*x^2+x*(A*f*B^-1+B*d*A^-1))^3//2*(A*c+-2*A*a*f*d^-1+c*d*A^-1*B^2*f^-1)*(2*f*x+A*f*B^-1+B*d*A^-1)+1//5*B*c*f^-2*(d+f*x^2+x*(A*f*B^-1+B*d*A^-1))^5//2+-3//256*A^-5*B^-4*d^-1*f^-9//2*(d*B^2+-1*f*A^2)^4*(c*B^2*d^2+f*A^2*(c*d+-2*a*f))*arctanh((1/2)*f^-1//2*(d+f*x^2+x*(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b*h)))^1//3*(9*b*x+9*c*x^2+-1*c^-1*h^-2*(b*h+c*g)*(c*g+-2*b*h))^-1//3*log(f*x^2+b*f*x*c^-1+1//3*f*c^-2*h^-2*(b^2*h^2+c^2*g^2+-1*b*c*g*h))+3*h*3^1//6*f^-1*(c*h^2*(-1*b*h+2*c*g)^-2*(-9*b*x+-9*c*x^2+c^-1*h^-2*(b*h+c*g)*(c*g+-2*b*h)))^1//3*(9*b*x+9*c*x^2+-1*c^-1*h^-2*(b*h+c*g)*(c*g+-2*b*h))^-1//3*arctan(1//3*3^(1/2)+-1//3*2^2//3*3^(1/2)*(1+-3*h*(-1*b*h+2*c*g)^-1*(b+2*c*x))^2//3*(1+3*h*(-1*b*h+2*c*g)^-1*(b+2*c*x))^-1//3)+-3//2*h*3^2//3*f^-1*(c*h^2*(-1*b*h+2*c*g)^-2*(-9*b*x+-9*c*x^2+c^-1*h^-2*(b*h+c*g)*(c*g+-2*b*h)))^1//3*(9*b*x+9*c*x^2+-1*c^-1*h^-2*(b*h+c*g)*(c*g+-2*b*h))^-1//3*log((1+-3*h*(-1*b*h+2*c*g)^-1*(b+2*c*x))^2//3+2^1//3*(1+3*h*(-1*b*h+2*c*g)^-1*(b+2*c*x))^1//3))

max_stars_repo_path: test/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.6 (g+h x)^m (a+b x+c x^2)^p (d+e x+f x^2)^q.jl


text:
# # User element
# In this example, we will add support for an element that is currently not
# supported inside the package: The linear wedge element, `C3D6`, defined in
# [wedge_element.inp](wedge_element.inp)
#
# ![](wedge_element.svg)
#
# For this element, it can be defined as a specific `Ferrite.Cell` type
using Ferrite, FerriteMeshParser
LinearWedge = Ferrite.Cell{3,6,5}

# For this element to work with Ferrite, one must define a new reference shape
# e.g. Wedge and the appropriate interpolations for this shape. In doing so,
# one also chooses the node order. Following the standard Ferrite conventions,
# the node order should be the same as in Abaqus as shown above. To change this,
# it is possible to overload the function `FerriteMeshParser.create_cell` as follows

create_cell(::Type{LinearWedge}, node_numbers, ::FerriteMeshParser.AbaqusMeshFormat) = LinearWedge(ntuple(j->node_numbers[j], length(node_numbers)))

# This setup allows changing the node order for your specific element.
# It is also possible to use another type which is not a variant of `Ferrite.Cell`, but
# rather a subtype of `Ferrite.AbstractCell`. After these modifications, one can import
# the mesh by specifying that the Abaqus code `C3D6` should be interpreted as a `LinearWedge`:

grid = get_ferrite_grid("wedge_element.inp"; user_elements=Dict("C3D6"=>LinearWedge));

# Giving the following grid
println(typeof(grid))
println(unique(typeof.(getcells(grid))))    # The different cell types in the grid

#
#md # ## [Plain Program](@id user-element-plain-program)
#md #
#md # Below follows a version of the program without any comments.
#md # The file is also available here: [user_element.jl](user_element.jl)
#md #
#md # ```julia
#md # @__CODE__
#md # ```

ext: jl


text:
######################################################################
# The EllipticCurves module for Julia/Nemo
######################################################################

module EllipticCurves

######################################################################
# Conventions
######################################################################

#Polynomial rings have variables X, Y, Z, U, V...

######################################################################
# Julia/Nemo imports
######################################################################

import Nemo
import Nemo: base_ring, discriminant, degree, PolynomialRing, RingElem, order, FinField, FinFieldElem, PolyElem, FiniteField, roots, issquare, parent, convert, degree, coeff, characteristic, Integer, AbsSeriesElem, SeriesRing, PowerSeriesRing, PolyRing, PolynomialRing, PolyElem, FieldElem, shift_left, shift_right, truncate, inv, sqrt, set_prec!, divrem, compose, setcoeff!, sqrt, isprime, ZZ, Generic.Frac, Generic.MPoly, evaluate, divexact, gen, derivative, gens, zero, one, ResidueRing, ResRing, div, FieldElem, rem, FractionField, numerator, denominator, sqrt, gcd, domain, image, kernel

import Base: show, isvalid, ==, rand, *, +, -, digits
import ClassPolynomials

######################################################################
# Julia/Nemo exports
######################################################################

export EllipticCurve, AbstractWeierstrass, ProjectivePoint

######################################################################
# Abstract types
######################################################################

"""
Abstract class for elliptic curves.

Every elliptic curve concrete type inherits from this.
"""
abstract type EllipticCurve{T<:Nemo.RingElem} end

"""
Abstract class for elliptic curves in Weierstrass form.

Every concrete type for elliptic curves in Weierstrass form inherits from this.
"""
abstract type AbstractWeierstrass{T<:Nemo.RingElem} <: EllipticCurve{T} end

"""
Abstract class for elliptic curve points.

Every concrete type for points inherits from this.
"""
abstract type ProjectivePoint{T<:Nemo.RingElem} end

######################################################################
# Tools
######################################################################

include("tools.jl")

######################################################################
# Points on elliptic curves
######################################################################

include("points.jl")

######################################################################
# Weierstrass curves
######################################################################

include("weierstrass.jl")

######################################################################
# Points on Weierstrass curves
######################################################################

include("weierstrasspoints.jl")

######################################################################
# Montgomery curves
######################################################################

include("montgomery.jl")

######################################################################
# Points on Montgomery curves
######################################################################

include("montgomerypoints.jl")

#=
######################################################################
# Edwards curves
######################################################################

include("edwards.jl")

######################################################################
# Points on Edwards curves
######################################################################

include("edwardspoints.jl")
=#

######################################################################
# Isogenies
######################################################################

include("isogenies.jl")

######################################################################
# Over finite fields
######################################################################

include("finfields.jl")

end # module