from sympy import (
    limit,
    Symbol,
    oo,
    sqrt,
    Rational,
    log,
    exp,
    cos,
    sin,
    tan,
    pi,
    asin,
    together,
    root,
    S,
)

# Numbers listed with the tests refer to problem numbers in the book
# "Anti-demidovich, problemas resueltos, Ed. URSS"

x = Symbol("x")


def test_leadterm():
    assert (3 + 2 * x ** (log(3) / log(2) - 1)).leadterm(x) == (3, 0)


def root3(x):
    return root(x, 3)


def root4(x):
    return root(x, 4)


def test_Limits_simple_0():
    assert limit((2 ** (x + 1) + 3 ** (x + 1)) / (2 ** x + 3 ** x), x, oo) == 3  # 175


def test_Limits_simple_1():
    assert limit((x + 1) * (x + 2) * (x + 3) / x ** 3, x, oo) == 1  # 172
    assert limit(sqrt(x + 1) - sqrt(x), x, oo) == 0  # 179
    assert (
        limit((2 * x - 3) * (3 * x + 5) * (4 * x - 6) / (3 * x ** 3 + x - 1), x, oo)
        == 8
    )  # Primjer 1
    assert limit(x / root3(x ** 3 + 10), x, oo) == 1  # Primjer 2
    assert limit((x + 1) ** 2 / (x ** 2 + 1), x, oo) == 1  # 181


def test_Limits_simple_2():
    assert limit(1000 * x / (x ** 2 - 1), x, oo) == 0  # 182
    assert limit((x ** 2 - 5 * x + 1) / (3 * x + 7), x, oo) is oo  # 183
    assert limit((2 * x ** 2 - x + 3) / (x ** 3 - 8 * x + 5), x, oo) == 0  # 184
    assert limit((2 * x ** 2 - 3 * x - 4) / sqrt(x ** 4 + 1), x, oo) == 2  # 186
    assert limit((2 * x + 3) / (x + root3(x)), x, oo) == 2  # 187
    assert limit(x ** 2 / (10 + x * sqrt(x)), x, oo) is oo  # 188
    assert limit(root3(x ** 2 + 1) / (x + 1), x, oo) == 0  # 189
    assert limit(sqrt(x) / sqrt(x + sqrt(x + sqrt(x))), x, oo) == 1  # 190


def test_Limits_simple_3a():
    a = Symbol("a")
    # issue 3513
    assert together(limit((x ** 2 - (a + 1) * x + a) / (x ** 3 - a ** 3), x, a)) == (
        a - 1
    ) / (
        3 * a ** 2
    )  # 196


def test_Limits_simple_3b():
    h = Symbol("h")
    assert limit(((x + h) ** 3 - x ** 3) / h, h, 0) == 3 * x ** 2  # 197
    assert limit((1 / (1 - x) - 3 / (1 - x ** 3)), x, 1) == -1  # 198
    assert (
        limit((sqrt(1 + x) - 1) / (root3(1 + x) - 1), x, 0) == Rational(3) / 2
    )  # Primer 4
    assert limit((sqrt(x) - 1) / (x - 1), x, 1) == Rational(1) / 2  # 199
    assert limit((sqrt(x) - 8) / (root3(x) - 4), x, 64) == 3  # 200
    assert limit((root3(x) - 1) / (root4(x) - 1), x, 1) == Rational(4) / 3  # 201
    assert (
        limit((root3(x ** 2) - 2 * root3(x) + 1) / (x - 1) ** 2, x, 1)
        == Rational(1) / 9
    )  # 202


def test_Limits_simple_4a():
    a = Symbol("a")
    assert limit((sqrt(x) - sqrt(a)) / (x - a), x, a) == 1 / (2 * sqrt(a))  # Primer 5
    assert limit((sqrt(x) - 1) / (root3(x) - 1), x, 1) == Rational(3, 2)  # 205
    assert limit((sqrt(1 + x) - sqrt(1 - x)) / x, x, 0) == 1  # 207
    assert limit(sqrt(x ** 2 - 5 * x + 6) - x, x, oo) == Rational(-5, 2)  # 213


def test_limits_simple_4aa():
    assert limit(x * (sqrt(x ** 2 + 1) - x), x, oo) == Rational(1) / 2  # 214


def test_Limits_simple_4b():
    # issue 3511
    assert limit(x - root3(x ** 3 - 1), x, oo) == 0  # 215


def test_Limits_simple_4c():
    assert limit(log(1 + exp(x)) / x, x, -oo) == 0  # 267a
    assert limit(log(1 + exp(x)) / x, x, oo) == 1  # 267b


def test_bounded():
    assert limit(sin(x) / x, x, oo) == 0  # 216b
    assert limit(x * sin(1 / x), x, 0) == 0  # 227a


def test_f1a():
    # issue 3508:
    assert limit((sin(2 * x) / x) ** (1 + x), x, 0) == 2  # Primer 7


def test_f1a2():
    # issue 3509:
    assert limit(((x - 1) / (x + 1)) ** x, x, oo) == exp(-2)  # Primer 9


def test_f1b():
    m = Symbol("m")
    n = Symbol("n")
    h = Symbol("h")
    a = Symbol("a")
    assert limit(sin(x) / x, x, 2) == sin(2) / 2  # 216a
    assert limit(sin(3 * x) / x, x, 0) == 3  # 217
    assert limit(sin(5 * x) / sin(2 * x), x, 0) == Rational(5, 2)  # 218
    assert limit(sin(pi * x) / sin(3 * pi * x), x, 0) == Rational(1, 3)  # 219
    assert limit(x * sin(pi / x), x, oo) == pi  # 220
    assert limit((1 - cos(x)) / x ** 2, x, 0) == S.Half  # 221
    assert limit(x * sin(1 / x), x, oo) == 1  # 227b
    assert limit((cos(m * x) - cos(n * x)) / x ** 2, x, 0) == (
        (n ** 2 - m ** 2) / 2
    )  # 232
    assert limit((tan(x) - sin(x)) / x ** 3, x, 0) == S.Half  # 233
    assert limit((x - sin(2 * x)) / (x + sin(3 * x)), x, 0) == -Rational(1, 4)  # 237
    assert limit((1 - sqrt(cos(x))) / x ** 2, x, 0) == Rational(1, 4)  # 239
    assert limit((sqrt(1 + sin(x)) - sqrt(1 - sin(x))) / x, x, 0) == 1  # 240

    assert limit((1 + h / x) ** x, x, oo) == exp(h)  # Primer 9
    assert limit((sin(x) - sin(a)) / (x - a), x, a) == cos(a)  # 222, *176
    assert limit((cos(x) - cos(a)) / (x - a), x, a) == -sin(a)  # 223
    assert limit((sin(x + h) - sin(x)) / h, h, 0) == cos(x)  # 225


def test_f2a():
    assert limit(((x + 1) / (2 * x + 1)) ** (x ** 2), x, oo) == 0  # Primer 8


def test_f2():
    assert limit((sqrt(cos(x)) - root3(cos(x))) / (sin(x) ** 2), x, 0) == -Rational(
        1, 12
    )  # *184


def test_f3():
    a = Symbol("a")
    # issue 3504
    assert limit(asin(a * x) / x, x, 0) == a

[((22, 4, 22, 15), 'sympy.Symbol', 'Symbol', ({(22, 11, 22, 14): '"""x"""'}, {}), "('x')", False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((30, 11, 30, 21), 'sympy.root', 'root', ({(30, 16, 30, 17): 'x', (30, 19, 30, 20): '(3)'}, {}), '(x, 3)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((34, 11, 34, 21), 'sympy.root', 'root', ({(34, 16, 34, 17): 'x', (34, 19, 34, 20): '(4)'}, {}), '(x, 4)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((64, 8, 64, 19), 'sympy.Symbol', 'Symbol', ({(64, 15, 64, 18): '"""a"""'}, {}), "('a')", False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((74, 8, 74, 19), 'sympy.Symbol', 'Symbol', ({(74, 15, 74, 18): '"""h"""'}, {}), "('h')", False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((90, 8, 90, 19), 'sympy.Symbol', 'Symbol', ({(90, 15, 90, 18): '"""a"""'}, {}), "('a')", False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((127, 8, 127, 19), 'sympy.Symbol', 'Symbol', ({(127, 15, 127, 18): '"""m"""'}, {}), "('m')", False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((128, 8, 128, 19), 'sympy.Symbol', 'Symbol', ({(128, 15, 128, 18): '"""n"""'}, {}), "('n')", False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((129, 8, 129, 19), 'sympy.Symbol', 'Symbol', ({(129, 15, 129, 18): '"""h"""'}, {}), "('h')", False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((130, 8, 130, 19), 'sympy.Symbol', 'Symbol', ({(130, 15, 130, 18): '"""a"""'}, {}), "('a')", False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((163, 8, 163, 19), 'sympy.Symbol', 'Symbol', ({(163, 15, 163, 18): '"""a"""'}, {}), "('a')", False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((38, 11, 38, 74), 'sympy.limit', 'limit', ({(38, 17, 38, 66): '((2 ** (x + 1) + 3 ** (x + 1)) / (2 ** x + 3 ** x))', (38, 68, 38, 69): 'x', (38, 71, 38, 73): 'oo'}, {}), '((2 ** (x + 1) + 3 ** (x + 1)) / (2 ** x + 3 ** x), x, oo)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((42, 11, 42, 61), 'sympy.limit', 'limit', ({(42, 17, 42, 53): '((x + 1) * (x + 2) * (x + 3) / x ** 3)', (42, 55, 42, 56): 'x', (42, 58, 42, 60): 'oo'}, {}), '((x + 1) * (x + 2) * (x + 3) / x ** 3, x, oo)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((45, 8, 45, 84), 'sympy.limit', 'limit', ({(45, 14, 45, 76): '((2 * x - 3) * (3 * x + 5) * (4 * x - 6) / (3 * x ** 3 + x - 1))', (45, 78, 45, 79): 'x', (45, 81, 45, 83): 'oo'}, {}), '((2 * x - 3) * (3 * x + 5) * (4 * x - 6) / (3 * x ** 3 + x - 1), x, oo)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((49, 11, 49, 52), 'sympy.limit', 'limit', ({(49, 17, 49, 44): '((x + 1) ** 2 / (x ** 2 + 1))', (49, 46, 49, 47): 'x', (49, 49, 49, 51): 'oo'}, {}), '((x + 1) ** 2 / (x ** 2 + 1), x, oo)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((53, 11, 53, 48), 'sympy.limit', 'limit', ({(53, 17, 53, 40): '(1000 * x / (x ** 2 - 1))', (53, 42, 53, 43): 'x', (53, 45, 53, 47): 'oo'}, {}), '(1000 * x / (x ** 2 - 1), x, oo)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((54, 11, 54, 59), 'sympy.limit', 'limit', ({(54, 17, 54, 51): '((x ** 2 - 5 * x + 1) / (3 * x + 7))', (54, 53, 54, 54): 'x', (54, 56, 54, 58): 'oo'}, {}), '((x ** 2 - 5 * x + 1) / (3 * x + 7), x, oo)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((55, 11, 55, 68), 'sympy.limit', 'limit', ({(55, 17, 55, 60): '((2 * x ** 2 - x + 3) / (x ** 3 - 8 * x + 5))', (55, 62, 55, 63): 'x', (55, 65, 55, 67): 'oo'}, {}), '((2 * x ** 2 - x + 3) / (x ** 3 - 8 * x + 5), x, oo)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((75, 11, 75, 51), 'sympy.limit', 'limit', ({(75, 17, 75, 44): '(((x + h) ** 3 - x ** 3) / h)', (75, 46, 75, 47): 'h', (75, 49, 75, 50): '(0)'}, {}), '(((x + h) ** 3 - x ** 3) / h, h, 0)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((76, 11, 76, 56), 'sympy.limit', 'limit', ({(76, 18, 76, 48): '(1 / (1 - x) - 3 / (1 - x ** 3))', (76, 51, 76, 52): 'x', (76, 54, 76, 55): '(1)'}, {}), '(1 / (1 - x) - 3 / (1 - x ** 3), x, 1)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((92, 58, 92, 72), 'sympy.Rational', 'Rational', ({(92, 67, 92, 68): '(3)', (92, 70, 92, 71): '(2)'}, {}), '(3, 2)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((94, 57, 94, 72), 'sympy.Rational', 'Rational', ({(94, 66, 94, 68): '(-5)', (94, 70, 94, 71): '(2)'}, {}), '(-5, 2)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((123, 11, 123, 49), 'sympy.limit', 'limit', ({(123, 17, 123, 41): '(((x - 1) / (x + 1)) ** x)', (123, 43, 123, 44): 'x', (123, 46, 123, 48): 'oo'}, {}), '(((x - 1) / (x + 1)) ** x, x, oo)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((123, 53, 123, 60), 'sympy.exp', 'exp', ({(123, 57, 123, 59): '(-2)'}, {}), '(-2)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((133, 51, 133, 65), 'sympy.Rational', 'Rational', ({(133, 60, 133, 61): '(5)', (133, 63, 133, 64): '(2)'}, {}), '(5, 2)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((134, 57, 134, 71), 'sympy.Rational', 'Rational', ({(134, 66, 134, 67): '(1)', (134, 69, 134, 70): '(3)'}, {}), '(1, 3)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((143, 55, 143, 69), 'sympy.Rational', 'Rational', ({(143, 64, 143, 65): '(1)', (143, 67, 143, 68): '(4)'}, {}), '(1, 4)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((146, 11, 146, 41), 'sympy.limit', 'limit', ({(146, 17, 146, 33): '((1 + h / x) ** x)', (146, 35, 146, 36): 'x', (146, 38, 146, 40): 'oo'}, {}), '((1 + h / x) ** x, x, oo)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((146, 45, 146, 51), 'sympy.exp', 'exp', ({(146, 49, 146, 50): 'h'}, {}), '(h)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((147, 55, 147, 61), 'sympy.cos', 'cos', ({(147, 59, 147, 60): 'a'}, {}), '(a)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((149, 53, 149, 59), 'sympy.cos', 'cos', ({(149, 57, 149, 58): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((153, 11, 153, 60), 'sympy.limit', 'limit', ({(153, 17, 153, 52): '(((x + 1) / (2 * x + 1)) ** x ** 2)', (153, 54, 153, 55): 'x', (153, 57, 153, 59): 'oo'}, {}), '(((x + 1) / (2 * x + 1)) ** x ** 2, x, oo)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((66, 20, 66, 79), 'sympy.limit', 'limit', ({(66, 26, 66, 72): '((x ** 2 - (a + 1) * x + a) / (x ** 3 - a ** 3))', (66, 74, 66, 75): 'x', (66, 77, 66, 78): 'a'}, {}), '((x ** 2 - (a + 1) * x + a) / (x ** 3 - a ** 3), x, a)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((78, 63, 78, 74), 'sympy.Rational', 'Rational', ({(78, 72, 78, 73): '(3)'}, {}), '(3)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((80, 51, 80, 62), 'sympy.Rational', 'Rational', ({(80, 60, 80, 61): '(1)'}, {}), '(1)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((82, 59, 82, 70), 'sympy.Rational', 'Rational', ({(82, 68, 82, 69): '(4)'}, {}), '(4)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((85, 11, 85, 22), 'sympy.Rational', 'Rational', ({(85, 20, 85, 21): '(1)'}, {}), '(1)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((98, 55, 98, 66), 'sympy.Rational', 'Rational', ({(98, 64, 98, 65): '(1)'}, {}), '(1)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((131, 38, 131, 44), 'sympy.sin', 'sin', ({(131, 42, 131, 43): '(2)'}, {}), '(2)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((142, 64, 142, 78), 'sympy.Rational', 'Rational', ({(142, 73, 142, 74): '(1)', (142, 76, 142, 77): '(4)'}, {}), '(1, 4)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((148, 56, 148, 62), 'sympy.sin', 'sin', ({(148, 60, 148, 61): 'a'}, {}), '(a)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((157, 75, 159, 5), 'sympy.Rational', 'Rational', ({(158, 8, 158, 9): '(1)', (158, 11, 158, 13): '(12)'}, {}), '(1, 12)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((43, 17, 43, 28), 'sympy.sqrt', 'sqrt', ({(43, 22, 43, 27): '(x + 1)'}, {}), '(x + 1)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((43, 31, 43, 38), 'sympy.sqrt', 'sqrt', ({(43, 36, 43, 37): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((56, 44, 56, 60), 'sympy.sqrt', 'sqrt', ({(56, 49, 56, 59): '(x ** 4 + 1)'}, {}), '(x ** 4 + 1)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((60, 17, 60, 24), 'sympy.sqrt', 'sqrt', ({(60, 22, 60, 23): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((91, 66, 91, 73), 'sympy.sqrt', 'sqrt', ({(91, 71, 91, 72): 'a'}, {}), '(a)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((94, 17, 94, 41), 'sympy.sqrt', 'sqrt', ({(94, 22, 94, 40): '(x ** 2 - 5 * x + 6)'}, {}), '(x ** 2 - 5 * x + 6)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((112, 17, 112, 23), 'sympy.sin', 'sin', ({(112, 21, 112, 22): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((113, 21, 113, 31), 'sympy.sin', 'sin', ({(113, 25, 113, 30): '(1 / x)'}, {}), '(1 / x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((131, 17, 131, 23), 'sympy.sin', 'sin', ({(131, 21, 131, 22): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((132, 17, 132, 27), 'sympy.sin', 'sin', ({(132, 21, 132, 26): '(3 * x)'}, {}), '(3 * x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((133, 17, 133, 27), 'sympy.sin', 'sin', ({(133, 21, 133, 26): '(5 * x)'}, {}), '(5 * x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((133, 30, 133, 40), 'sympy.sin', 'sin', ({(133, 34, 133, 39): '(2 * x)'}, {}), '(2 * x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((134, 17, 134, 28), 'sympy.sin', 'sin', ({(134, 21, 134, 27): '(pi * x)'}, {}), '(pi * x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((134, 31, 134, 46), 'sympy.sin', 'sin', ({(134, 35, 134, 45): '(3 * pi * x)'}, {}), '(3 * pi * x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((135, 21, 135, 32), 'sympy.sin', 'sin', ({(135, 25, 135, 31): '(pi / x)'}, {}), '(pi / x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((137, 21, 137, 31), 'sympy.sin', 'sin', ({(137, 25, 137, 30): '(1 / x)'}, {}), '(1 / x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((165, 17, 165, 28), 'sympy.asin', 'asin', ({(165, 22, 165, 27): '(a * x)'}, {}), '(a * x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((78, 15, 78, 26), 'sympy.sqrt', 'sqrt', ({(78, 20, 78, 25): '(1 + x)'}, {}), '(1 + x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((80, 18, 80, 25), 'sympy.sqrt', 'sqrt', ({(80, 23, 80, 24): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((81, 18, 81, 25), 'sympy.sqrt', 'sqrt', ({(81, 23, 81, 24): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((91, 18, 91, 25), 'sympy.sqrt', 'sqrt', ({(91, 23, 91, 24): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((91, 28, 91, 35), 'sympy.sqrt', 'sqrt', ({(91, 33, 91, 34): 'a'}, {}), '(a)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((92, 18, 92, 25), 'sympy.sqrt', 'sqrt', ({(92, 23, 92, 24): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((93, 18, 93, 29), 'sympy.sqrt', 'sqrt', ({(93, 23, 93, 28): '(1 + x)'}, {}), '(1 + x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((93, 32, 93, 43), 'sympy.sqrt', 'sqrt', ({(93, 37, 93, 42): '(1 - x)'}, {}), '(1 - x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((98, 22, 98, 38), 'sympy.sqrt', 'sqrt', ({(98, 27, 98, 37): '(x ** 2 + 1)'}, {}), '(x ** 2 + 1)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((118, 18, 118, 28), 'sympy.sin', 'sin', ({(118, 22, 118, 27): '(2 * x)'}, {}), '(2 * x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((136, 22, 136, 28), 'sympy.cos', 'cos', ({(136, 26, 136, 27): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((138, 18, 138, 28), 'sympy.cos', 'cos', ({(138, 22, 138, 27): '(m * x)'}, {}), '(m * x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((138, 31, 138, 41), 'sympy.cos', 'cos', ({(138, 35, 138, 40): '(n * x)'}, {}), '(n * x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((141, 18, 141, 24), 'sympy.tan', 'tan', ({(141, 22, 141, 23): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((141, 27, 141, 33), 'sympy.sin', 'sin', ({(141, 31, 141, 32): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((142, 22, 142, 32), 'sympy.sin', 'sin', ({(142, 26, 142, 31): '(2 * x)'}, {}), '(2 * x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((142, 41, 142, 51), 'sympy.sin', 'sin', ({(142, 45, 142, 50): '(3 * x)'}, {}), '(3 * x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((147, 18, 147, 24), 'sympy.sin', 'sin', ({(147, 22, 147, 23): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((147, 27, 147, 33), 'sympy.sin', 'sin', ({(147, 31, 147, 32): 'a'}, {}), '(a)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((148, 18, 148, 24), 'sympy.cos', 'cos', ({(148, 22, 148, 23): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((148, 27, 148, 33), 'sympy.cos', 'cos', ({(148, 31, 148, 32): 'a'}, {}), '(a)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((149, 18, 149, 28), 'sympy.sin', 'sin', ({(149, 22, 149, 27): '(x + h)'}, {}), '(x + h)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((149, 31, 149, 37), 'sympy.sin', 'sin', ({(149, 35, 149, 36): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((157, 51, 157, 57), 'sympy.sin', 'sin', ({(157, 55, 157, 56): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((58, 36, 58, 43), 'sympy.sqrt', 'sqrt', ({(58, 41, 58, 42): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((107, 25, 107, 31), 'sympy.exp', 'exp', ({(107, 29, 107, 30): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((108, 25, 108, 31), 'sympy.exp', 'exp', ({(108, 29, 108, 30): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((143, 27, 143, 33), 'sympy.cos', 'cos', ({(143, 31, 143, 32): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((157, 23, 157, 29), 'sympy.cos', 'cos', ({(157, 27, 157, 28): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((157, 39, 157, 45), 'sympy.cos', 'cos', ({(157, 43, 157, 44): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((144, 27, 144, 33), 'sympy.sin', 'sin', ({(144, 31, 144, 32): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((144, 46, 144, 52), 'sympy.sin', 'sin', ({(144, 50, 144, 51): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((60, 45, 60, 52), 'sympy.sqrt', 'sqrt', ({(60, 50, 60, 51): 'x'}, {}), '(x)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((26, 26, 26, 32), 'sympy.log', 'log', ({(26, 30, 26, 31): '(3)'}, {}), '(3)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n'), ((26, 35, 26, 41), 'sympy.log', 'log', ({(26, 39, 26, 40): '(2)'}, {}), '(2)', False, 'from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, pi, asin, together, root, S\n')]