• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python sympy.acoth函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中sympy.acoth函数的典型用法代码示例。如果您正苦于以下问题:Python acoth函数的具体用法?Python acoth怎么用?Python acoth使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了acoth函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_issue_10847

def test_issue_10847():
    assert manualintegrate(x**2 / (x**2 - c), x) == c*Piecewise((atan(x/sqrt(-c))/sqrt(-c), -c > 0), \
                                                                (-acoth(x/sqrt(c))/sqrt(c), And(-c < 0, x**2 > c)), \
                                                                (-atanh(x/sqrt(c))/sqrt(c), And(-c < 0, x**2 < c))) + x
    assert manualintegrate(sqrt(x - y) * log(z / x), x) == 4*y**2*Piecewise((atan(sqrt(x - y)/sqrt(y))/sqrt(y), y > 0), \
                                                                            (-acoth(sqrt(x - y)/sqrt(-y))/sqrt(-y), \
                                                                             And(x - y > -y, y < 0)), \
                                                                            (-atanh(sqrt(x - y)/sqrt(-y))/sqrt(-y), \
                                                                             And(x - y < -y, y < 0)))/3 \
                                                                             - 4*y*sqrt(x - y)/3 + 2*(x - y)**(S(3)/2)*log(z/x)/3 \
                                                                             + 4*(x - y)**(S(3)/2)/9

    assert manualintegrate(sqrt(x) * log(x), x) == 2*x**(S(3)/2)*log(x)/3 - 4*x**(S(3)/2)/9
    assert manualintegrate(sqrt(a*x + b) / x, x) == -2*b*Piecewise((-atan(sqrt(a*x + b)/sqrt(-b))/sqrt(-b), -b > 0), \
                                                               (acoth(sqrt(a*x + b)/sqrt(b))/sqrt(b), And(-b < 0, a*x + b > b)), \
                                                               (atanh(sqrt(a*x + b)/sqrt(b))/sqrt(b), And(-b < 0, a*x + b < b))) \
                                                               + 2*sqrt(a*x + b)

    assert expand(manualintegrate(sqrt(a*x + b) / (x + c), x)) == -2*a*c*Piecewise((atan(sqrt(a*x + b)/sqrt(a*c - b))/sqrt(a*c - b), \
        a*c - b > 0), (-acoth(sqrt(a*x + b)/sqrt(-a*c + b))/sqrt(-a*c + b), And(a*c - b < 0, a*x + b > -a*c + b)), \
        (-atanh(sqrt(a*x + b)/sqrt(-a*c + b))/sqrt(-a*c + b), And(a*c - b < 0, a*x + b < -a*c + b))) \
        + 2*b*Piecewise((atan(sqrt(a*x + b)/sqrt(a*c - b))/sqrt(a*c - b), a*c - b > 0), \
        (-acoth(sqrt(a*x + b)/sqrt(-a*c + b))/sqrt(-a*c + b), And(a*c - b < 0, a*x + b > -a*c + b)), \
        (-atanh(sqrt(a*x + b)/sqrt(-a*c + b))/sqrt(-a*c + b), And(a*c - b < 0, a*x + b < -a*c + b))) + 2*sqrt(a*x + b)

    assert manualintegrate((4*x**4 + 4*x**3 + 16*x**2 + 12*x + 8) \
                           / (x**6 + 2*x**5 + 3*x**4 + 4*x**3 + 3*x**2 + 2*x + 1), x) == \
                           2*x/(x**2 + 1) + 3*atan(x) - 1/(x**2 + 1) - 3/(x + 1)
    assert manualintegrate(sqrt(2*x + 3) / (x + 1), x) == 2*sqrt(2*x + 3) - log(sqrt(2*x + 3) + 1) + log(sqrt(2*x + 3) - 1)
    assert manualintegrate(sqrt(2*x + 3) / 2 * x, x) == (2*x + 3)**(S(5)/2)/20 - (2*x + 3)**(S(3)/2)/4
    assert manualintegrate(x**Rational(3,2) * log(x), x) == 2*x**Rational(5,2)*log(x)/5 - 4*x**Rational(5,2)/25
    assert manualintegrate(x**(-3) * log(x), x) == -log(x)/(2*x**2) - 1/(4*x**2)
    assert manualintegrate(log(y)/(y**2*(1 - 1/y)), y) == \
        log(y)*log(-1 + 1/y) - Integral(log(-1 + 1/y)/y, y)
开发者ID:gamechanger98,项目名称:sympy,代码行数:34,代码来源:test_manual.py


示例2: _expr_big

    def _expr_big(cls, x, n):
        from sympy import acoth, sqrt, pi, I

        if n.is_even:
            return (acoth(sqrt(x)) + I * pi / 2) / sqrt(x)
        else:
            return (acoth(sqrt(x)) - I * pi / 2) / sqrt(x)
开发者ID:ness01,项目名称:sympy,代码行数:7,代码来源:hyper.py


示例3: test_messy

def test_messy():
    from sympy import (laplace_transform, Si, Shi, Chi, atan, Piecewise,
                       acoth, E1, besselj, acosh, asin, And, re,
                       fourier_transform, sqrt)
    assert laplace_transform(Si(x), x, s) == ((-atan(s) + pi/2)/s, 0, True)

    assert laplace_transform(Shi(x), x, s) == (acoth(s)/s, 1, True)

    # where should the logs be simplified?
    assert laplace_transform(Chi(x), x, s) == \
        ((log(s**(-2)) - log((s**2 - 1)/s**2))/(2*s), 1, True)

    # TODO maybe simplify the inequalities?
    assert laplace_transform(besselj(a, x), x, s)[1:] == \
        (0, And(S(0) < re(a/2) + S(1)/2, S(0) < re(a/2) + 1))

    # NOTE s < 0 can be done, but argument reduction is not good enough yet
    assert fourier_transform(besselj(1, x)/x, x, s, noconds=False) == \
        (Piecewise((0, 4*abs(pi**2*s**2) > 1),
                   (2*sqrt(-4*pi**2*s**2 + 1), True)), s > 0)
    # TODO FT(besselj(0,x)) - conditions are messy (but for acceptable reasons)
    #                       - folding could be better

    assert integrate(E1(x)*besselj(0, x), (x, 0, oo), meijerg=True) == \
        log(1 + sqrt(2))
    assert integrate(E1(x)*besselj(1, x), (x, 0, oo), meijerg=True) == \
        log(S(1)/2 + sqrt(2)/2)

    assert integrate(1/x/sqrt(1 - x**2), x, meijerg=True) == \
        Piecewise((-acosh(1/x), 1 < abs(x**(-2))), (I*asin(1/x), True))
开发者ID:chaffra,项目名称:sympy,代码行数:30,代码来源:test_meijerint.py


示例4: test_issue_6746

def test_issue_6746():
    y = Symbol('y')
    n = Symbol('n')
    assert manualintegrate(y**x, x) == \
        Piecewise((x, Eq(log(y), 0)), (y**x/log(y), True))
    assert manualintegrate(y**(n*x), x) == \
        Piecewise(
            (x, Eq(n, 0)),
            (Piecewise(
                (n*x, Eq(log(y), 0)),
                (y**(n*x)/log(y), True))/n, True))
    assert manualintegrate(exp(n*x), x) == \
        Piecewise((x, Eq(n, 0)), (exp(n*x)/n, True))

    y = Symbol('y', positive=True)
    assert manualintegrate((y + 1)**x, x) == (y + 1)**x/log(y + 1)
    y = Symbol('y', zero=True)
    assert manualintegrate((y + 1)**x, x) == x
    y = Symbol('y')
    n = Symbol('n', nonzero=True)
    assert manualintegrate(y**(n*x), x) == \
        Piecewise((n*x, Eq(log(y), 0)), (y**(n*x)/log(y), True))/n
    y = Symbol('y', positive=True)
    assert manualintegrate((y + 1)**(n*x), x) == \
        (y + 1)**(n*x)/(n*log(y + 1))
    a = Symbol('a', negative=True)
    assert manualintegrate(1 / (a + b*x**2), x) == \
        Piecewise((atan(x/sqrt(a/b))/(b*sqrt(a/b)), a/b > 0), \
        (-acoth(x/sqrt(-a/b))/(b*sqrt(-a/b)), And(a/b < 0, x**2 > -a/b)), \
        (-atanh(x/sqrt(-a/b))/(b*sqrt(-a/b)), And(a/b < 0, x**2 < -a/b)))
开发者ID:sixpearls,项目名称:sympy,代码行数:30,代码来源:test_manual.py


示例5: test_acot

def test_acot():
    assert acot(nan) == nan

    assert acot(-oo) == 0
    assert acot(oo) == 0
    assert acot(1) == pi/4
    assert acot(0) == pi/2
    assert acot(sqrt(3)/3) == pi/3
    assert acot(1/sqrt(3)) == pi/3
    assert acot(-1/sqrt(3)) == -pi/3
    assert acot(x).diff(x) == -1/(1 + x**2)

    assert acot(r).is_real is True

    assert acot(I*pi) == -I*acoth(pi)
    assert acot(-2*I) == I*acoth(2)
开发者ID:mattpap,项目名称:sympy,代码行数:16,代码来源:test_trigonometric.py


示例6: test_hyperbolic

def test_hyperbolic():
    x = Symbol("x")
    assert sinh(x).nseries(x, 0, 6) == x + x**3/6 + x**5/120 + O(x**6)
    assert cosh(x).nseries(x, 0, 5) == 1 + x**2/2 + x**4/24 + O(x**5)
    assert tanh(x).nseries(x, 0, 6) == x - x**3/3 + 2*x**5/15 + O(x**6)
    assert coth(x).nseries(x, 0, 6) == 1/x - x**3/45 + x/3 + 2*x**5/945 + O(x**6)
    assert asinh(x).nseries(x, 0, 6) == x - x**3/6 + 3*x**5/40 + O(x**6)
    assert acosh(x).nseries(x, 0, 6) == pi*I/2 - I*x - 3*I*x**5/40 - I*x**3/6 + O(x**6)
    assert atanh(x).nseries(x, 0, 6) == x + x**3/3 + x**5/5 + O(x**6)
    assert acoth(x).nseries(x, 0, 6) == x + x**3/3 + x**5/5 + pi*I/2 + O(x**6)
开发者ID:jcockayne,项目名称:sympy-rkern,代码行数:10,代码来源:test_nseries.py


示例7: test_derivs

def test_derivs():
    x = Symbol('x')
    assert coth(x).diff(x) == -sinh(x)**(-2)
    assert sinh(x).diff(x) == cosh(x)
    assert cosh(x).diff(x) == sinh(x)
    assert tanh(x).diff(x) == -tanh(x)**2 + 1
    assert acoth(x).diff(x) == 1/(-x**2 + 1)
    assert asinh(x).diff(x) == 1/sqrt(x**2 + 1)
    assert acosh(x).diff(x) == 1/sqrt(x**2 - 1)
    assert atanh(x).diff(x) == 1/(-x**2 + 1)
开发者ID:Bercio,项目名称:sympy,代码行数:10,代码来源:test_hyperbolic.py


示例8: test_inverses

def test_inverses():
    x = Symbol('x')
    assert sinh(x).inverse() == asinh
    raises(AttributeError, lambda: cosh(x).inverse())
    assert tanh(x).inverse() == atanh
    assert coth(x).inverse() == acoth
    assert asinh(x).inverse() == sinh
    assert acosh(x).inverse() == cosh
    assert atanh(x).inverse() == tanh
    assert acoth(x).inverse() == coth
开发者ID:Bercio,项目名称:sympy,代码行数:10,代码来源:test_hyperbolic.py


示例9: test_conv12b

def test_conv12b():
    x = sympy.Symbol("x")
    y = sympy.Symbol("y")
    assert sympify(sympy.sinh(x/3)) == sinh(Symbol("x") / 3)
    assert sympify(sympy.cosh(x/3)) == cosh(Symbol("x") / 3)
    assert sympify(sympy.tanh(x/3)) == tanh(Symbol("x") / 3)
    assert sympify(sympy.coth(x/3)) == coth(Symbol("x") / 3)
    assert sympify(sympy.asinh(x/3)) == asinh(Symbol("x") / 3)
    assert sympify(sympy.acosh(x/3)) == acosh(Symbol("x") / 3)
    assert sympify(sympy.atanh(x/3)) == atanh(Symbol("x") / 3)
    assert sympify(sympy.acoth(x/3)) == acoth(Symbol("x") / 3)
开发者ID:cbehan,项目名称:symengine.py,代码行数:11,代码来源:test_sympy_conv.py


示例10: test_acot

def test_acot():
    assert acot(nan) == nan

    assert acot.nargs == FiniteSet(1)
    assert acot(-oo) == 0
    assert acot(oo) == 0
    assert acot(1) == pi/4
    assert acot(0) == pi/2
    assert acot(sqrt(3)/3) == pi/3
    assert acot(1/sqrt(3)) == pi/3
    assert acot(-1/sqrt(3)) == -pi/3
    assert acot(x).diff(x) == -1/(1 + x**2)

    assert acot(r).is_real is True

    assert acot(I*pi) == -I*acoth(pi)
    assert acot(-2*I) == I*acoth(2)
    assert acot(x).is_positive is None
    assert acot(r).is_positive is True
    assert acot(p).is_positive is True
    assert acot(I).is_positive is False
开发者ID:AdrianPotter,项目名称:sympy,代码行数:21,代码来源:test_trigonometric.py


示例11: test_simplifications

def test_simplifications():
    x = Symbol('x')
    assert sinh(asinh(x)) == x
    assert sinh(acosh(x)) == sqrt(x-1) * sqrt(x+1)
    assert sinh(atanh(x)) == x/sqrt(1-x**2)
    assert sinh(acoth(x)) == 1/(sqrt(x-1) * sqrt(x+1))

    assert cosh(asinh(x)) == sqrt(1+x**2)
    assert cosh(acosh(x)) == x
    assert cosh(atanh(x)) == 1/sqrt(1-x**2)
    assert cosh(acoth(x)) == x/(sqrt(x-1) * sqrt(x+1))

    assert tanh(asinh(x)) == x/sqrt(1+x**2)
    assert tanh(acosh(x)) == sqrt(x-1) * sqrt(x+1) / x
    assert tanh(atanh(x)) == x
    assert tanh(acoth(x)) == 1/x

    assert coth(asinh(x)) == sqrt(1+x**2)/x
    assert coth(acosh(x)) == x/(sqrt(x-1) * sqrt(x+1))
    assert coth(atanh(x)) == 1/x
    assert coth(acoth(x)) == x
开发者ID:Aang,项目名称:sympy,代码行数:21,代码来源:test_hyperbolic.py


示例12: test_leading_term

def test_leading_term():
    x = Symbol('x')
    assert cosh(x).as_leading_term(x) == 1
    assert coth(x).as_leading_term(x) == 1/x
    assert acosh(x).as_leading_term(x) == I*pi/2
    assert acoth(x).as_leading_term(x) == I*pi/2
    for func in [sinh, tanh, asinh, atanh]:
        assert func(x).as_leading_term(x) == x
    for func in [sinh, cosh, tanh, coth, asinh, acosh, atanh, acoth]:
        for arg in (1/x, S.Half):
            eq = func(arg)
            assert eq.as_leading_term(x) == eq
开发者ID:Devendra0910,项目名称:sympy,代码行数:12,代码来源:test_hyperbolic.py


示例13: test_derivs

def test_derivs():
    x = Symbol('x')
    assert coth(x).diff(x) == -sinh(x)**(-2)
    assert sinh(x).diff(x) == cosh(x)
    assert cosh(x).diff(x) == sinh(x)
    assert tanh(x).diff(x) == -tanh(x)**2 + 1
    assert csch(x).diff(x) == -coth(x)*csch(x)
    assert sech(x).diff(x) == -tanh(x)*sech(x)
    assert acoth(x).diff(x) == 1/(-x**2 + 1)
    assert asinh(x).diff(x) == 1/sqrt(x**2 + 1)
    assert acosh(x).diff(x) == 1/sqrt(x**2 - 1)
    assert atanh(x).diff(x) == 1/(-x**2 + 1)
    assert asech(x).diff(x) == -1/(x*sqrt(1 - x**2))
    assert acsch(x).diff(x) == -1/(x**2*sqrt(1 + x**(-2)))
开发者ID:certik,项目名称:sympy,代码行数:14,代码来源:test_hyperbolic.py


示例14: test_conv12

def test_conv12():
    x = Symbol("x")
    y = Symbol("y")
    assert sinh(x/3) == sinh(sympy.Symbol("x") / 3)
    assert cosh(x/3) == cosh(sympy.Symbol("x") / 3)
    assert tanh(x/3) == tanh(sympy.Symbol("x") / 3)
    assert coth(x/3) == coth(sympy.Symbol("x") / 3)
    assert asinh(x/3) == asinh(sympy.Symbol("x") / 3)
    assert acosh(x/3) == acosh(sympy.Symbol("x") / 3)
    assert atanh(x/3) == atanh(sympy.Symbol("x") / 3)
    assert acoth(x/3) == acoth(sympy.Symbol("x") / 3)

    assert sinh(x/3)._sympy_() == sympy.sinh(sympy.Symbol("x") / 3)
    assert cosh(x/3)._sympy_() == sympy.cosh(sympy.Symbol("x") / 3)
    assert tanh(x/3)._sympy_() == sympy.tanh(sympy.Symbol("x") / 3)
    assert coth(x/3)._sympy_() == sympy.coth(sympy.Symbol("x") / 3)
    assert asinh(x/3)._sympy_() == sympy.asinh(sympy.Symbol("x") / 3)
    assert acosh(x/3)._sympy_() == sympy.acosh(sympy.Symbol("x") / 3)
    assert atanh(x/3)._sympy_() == sympy.atanh(sympy.Symbol("x") / 3)
    assert acoth(x/3)._sympy_() == sympy.acoth(sympy.Symbol("x") / 3)
开发者ID:cbehan,项目名称:symengine.py,代码行数:20,代码来源:test_sympy_conv.py


示例15: test_issue_6746

def test_issue_6746():
    y = Symbol('y')
    n = Symbol('n')
    assert manualintegrate(y**x, x) == Piecewise(
        (y**x/log(y), Ne(log(y), 0)), (x, True))
    assert manualintegrate(y**(n*x), x) == Piecewise(
        (Piecewise(
            (y**(n*x)/log(y), Ne(log(y), 0)),
            (n*x, True)
        )/n, Ne(n, 0)),
        (x, True))
    assert manualintegrate(exp(n*x), x) == Piecewise(
        (exp(n*x)/n, Ne(n, 0)), (x, True))

    y = Symbol('y', positive=True)
    assert manualintegrate((y + 1)**x, x) == (y + 1)**x/log(y + 1)
    y = Symbol('y', zero=True)
    assert manualintegrate((y + 1)**x, x) == x
    y = Symbol('y')
    n = Symbol('n', nonzero=True)
    assert manualintegrate(y**(n*x), x) == Piecewise(
        (y**(n*x)/log(y), Ne(log(y), 0)), (n*x, True))/n
    y = Symbol('y', positive=True)
    assert manualintegrate((y + 1)**(n*x), x) == \
        (y + 1)**(n*x)/(n*log(y + 1))
    a = Symbol('a', negative=True)
    b = Symbol('b')
    assert manualintegrate(1/(a + b*x**2), x) == \
        Piecewise((atan(x/sqrt(a/b))/(b*sqrt(a/b)), a/b > 0), \
        (-acoth(x/sqrt(-a/b))/(b*sqrt(-a/b)), And(a/b < 0, x**2 > -a/b)), \
        (-atanh(x/sqrt(-a/b))/(b*sqrt(-a/b)), And(a/b < 0, x**2 < -a/b)))
    b = Symbol('b', negative=True)
    assert manualintegrate(1/(a + b*x**2), x) == \
        atan(x/(sqrt(-a)*sqrt(-1/b)))/(b*sqrt(-a)*sqrt(-1/b))
    assert manualintegrate(1/((x**a + y**b + 4)*sqrt(a*x**2 + 1)), x) == \
        y**(-b)*Integral(x**(-a)/(y**(-b)*sqrt(a*x**2 + 1) +
        x**(-a)*sqrt(a*x**2 + 1) + 4*x**(-a)*y**(-b)*sqrt(a*x**2 + 1)), x)
    assert manualintegrate(1/((x**2 + 4)*sqrt(4*x**2 + 1)), x) == \
        Integral(1/((x**2 + 4)*sqrt(4*x**2 + 1)), x)
    assert manualintegrate(1/(x - a**x + x*b**2), x) == \
        Integral(1/(-a**x + b**2*x + x), x)
开发者ID:gamechanger98,项目名称:sympy,代码行数:41,代码来源:test_manual.py


示例16: test_manualintegrate_rational

def test_manualintegrate_rational():
    assert manualintegrate(1/(4 - x**2), x) == Piecewise((acoth(x/2)/2, x**2 > 4), (atanh(x/2)/2, x**2 < 4))
    assert manualintegrate(1/(-1 + x**2), x) == Piecewise((-acoth(x), x**2 > 1), (-atanh(x), x**2 < 1))
开发者ID:gamechanger98,项目名称:sympy,代码行数:3,代码来源:test_manual.py


示例17: test_manualintegrate_inversetrig

def test_manualintegrate_inversetrig():
    # atan
    assert manualintegrate(exp(x) / (1 + exp(2*x)), x) == atan(exp(x))
    assert manualintegrate(1 / (4 + 9 * x**2), x) == atan(3 * x/2) / 6
    assert manualintegrate(1 / (16 + 16 * x**2), x) == atan(x) / 16
    assert manualintegrate(1 / (4 + x**2), x) == atan(x / 2) / 2
    assert manualintegrate(1 / (1 + 4 * x**2), x) == atan(2*x) / 2
    assert manualintegrate(1/(a + b*x**2), x) == \
        Piecewise((atan(x/sqrt(a/b))/(b*sqrt(a/b)), a/b > 0), \
                  (-acoth(x/sqrt(-a/b))/(b*sqrt(-a/b)), And(a/b < 0, x**2 > -a/b)), \
                  (-atanh(x/sqrt(-a/b))/(b*sqrt(-a/b)), And(a/b < 0, x**2 < -a/b)))
    assert manualintegrate(1/(4 + b*x**2), x) == \
        Piecewise((atan(x/(2*sqrt(1/b)))/(2*b*sqrt(1/b)), 4/b > 0), \
                  (-acoth(x/(2*sqrt(-1/b)))/(2*b*sqrt(-1/b)), And(4/b < 0, x**2 > -4/b)), \
                  (-atanh(x/(2*sqrt(-1/b)))/(2*b*sqrt(-1/b)), And(4/b < 0, x**2 < -4/b)))
    assert manualintegrate(1/(a + 4*x**2), x) == \
        Piecewise((atan(2*x/sqrt(a))/(2*sqrt(a)), a/4 > 0), \
                  (-acoth(2*x/sqrt(-a))/(2*sqrt(-a)), And(a/4 < 0, x**2 > -a/4)), \
                  (-atanh(2*x/sqrt(-a))/(2*sqrt(-a)), And(a/4 < 0, x**2 < -a/4)))
    assert manualintegrate(1/(4 + 4*x**2), x) == atan(x) / 4

    # asin
    assert manualintegrate(1/sqrt(1-x**2), x) == asin(x)
    assert manualintegrate(1/sqrt(4-4*x**2), x) == asin(x)/2
    assert manualintegrate(3/sqrt(1-9*x**2), x) == asin(3*x)
    assert manualintegrate(1/sqrt(4-9*x**2), x) == asin(3*x/2)/3

    # asinh
    assert manualintegrate(1/sqrt(x**2 + 1), x) == \
        asinh(x)
    assert manualintegrate(1/sqrt(x**2 + 4), x) == \
        asinh(x/2)
    assert manualintegrate(1/sqrt(4*x**2 + 4), x) == \
        asinh(x)/2
    assert manualintegrate(1/sqrt(4*x**2 + 1), x) == \
        asinh(2*x)/2
    assert manualintegrate(1/sqrt(a*x**2 + 1), x) == \
        Piecewise((sqrt(-1/a)*asin(x*sqrt(-a)), a < 0), (sqrt(1/a)*asinh(sqrt(a)*x), a > 0))
    assert manualintegrate(1/sqrt(a + x**2), x) == \
        Piecewise((asinh(x*sqrt(1/a)), a > 0), (acosh(x*sqrt(-1/a)), a < 0))

    # acosh
    assert manualintegrate(1/sqrt(x**2 - 1), x) == \
        acosh(x)
    assert manualintegrate(1/sqrt(x**2 - 4), x) == \
        acosh(x/2)
    assert manualintegrate(1/sqrt(4*x**2 - 4), x) == \
        acosh(x)/2
    assert manualintegrate(1/sqrt(9*x**2 - 1), x) == \
        acosh(3*x)/3
    assert manualintegrate(1/sqrt(a*x**2 - 4), x) == \
        Piecewise((sqrt(1/a)*acosh(sqrt(a)*x/2), a > 0))
    assert manualintegrate(1/sqrt(-a + 4*x**2), x) == \
        Piecewise((asinh(2*x*sqrt(-1/a))/2, -a > 0), (acosh(2*x*sqrt(1/a))/2, -a < 0))

    # piecewise
    assert manualintegrate(1/sqrt(a-b*x**2), x) == \
        Piecewise((sqrt(a/b)*asin(x*sqrt(b/a))/sqrt(a), And(-b < 0, a > 0)),
                  (sqrt(-a/b)*asinh(x*sqrt(-b/a))/sqrt(a), And(-b > 0, a > 0)),
                  (sqrt(a/b)*acosh(x*sqrt(b/a))/sqrt(-a), And(-b > 0, a < 0)))
    assert manualintegrate(1/sqrt(a + b*x**2), x) == \
        Piecewise((sqrt(-a/b)*asin(x*sqrt(-b/a))/sqrt(a), And(a > 0, b < 0)),
                  (sqrt(a/b)*asinh(x*sqrt(b/a))/sqrt(a), And(a > 0, b > 0)),
                  (sqrt(-a/b)*acosh(x*sqrt(-b/a))/sqrt(-a), And(a < 0, b > 0)))
开发者ID:gamechanger98,项目名称:sympy,代码行数:64,代码来源:test_manual.py


示例18: eval_arccoth

def eval_arccoth(a, b, c, integrand, symbol):
    return -a / b * 1 / sympy.sqrt(-c / b) * sympy.acoth(symbol / sympy.sqrt(-c / b))
开发者ID:latot,项目名称:sympy,代码行数:2,代码来源:manualintegrate.py


示例19: test_acoth_noimpl

def test_acoth_noimpl():
    assert acoth(I/sqrt(3)) == -I*pi/3
    assert acoth(-I/sqrt(3)) == I*pi/3
    assert acoth(I*sqrt(3)) == -I*pi/6
    assert acoth(-I*sqrt(3)) == I*pi/6
    assert acoth(I*(1+sqrt(2))) == -pi*I/8
    assert acoth(-I*(sqrt(2)+1)) == pi*I/8
    assert acoth(I*(1-sqrt(2))) == 3*pi*I/8
    assert acoth(I*(sqrt(2)-1)) == -3*pi*I/8
    assert acoth(I*sqrt(5+2*sqrt(5))) == -I*pi/10
    assert acoth(-I*sqrt(5+2*sqrt(5))) == I*pi/10
    assert acoth(I*(2+sqrt(3))) == -pi*I/12
    assert acoth(-I*(2+sqrt(3))) == pi*I/12
    assert acoth(I*(2-sqrt(3))) == -5*pi*I/12
    assert acoth(I*(sqrt(3)-2)) == 5*pi*I/12
开发者ID:Aang,项目名称:sympy,代码行数:15,代码来源:test_hyperbolic.py


示例20: test_acoth

def test_acoth():
    x = Symbol("x")
    assert acoth(0) == I * pi / 2
    assert acoth(I) == -I * pi / 4
    assert acoth(-I) == I * pi / 4
    assert acoth(-x) == -acoth(x)
开发者ID:rkern,项目名称:sympy-rkern,代码行数:6,代码来源:test_hyperbolic.py



注:本文中的sympy.acoth函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python sympy.acsc函数代码示例发布时间:2022-05-27
下一篇:
Python sympy.acot函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap