Пример #1
0
def test6():
    exp6 = finitesum('2x^3+1y')
    assert (exp6.simplify() == '2x^3+y')
Пример #2
0
def test1():
    exp = finitesum('1')
    assert (exp.derive('x') == '0')
    assert (exp.getString() == '1')
Пример #3
0
def test4():
    exp4 = finitesum('2x^3+4y^2+5x^3')
    assert (exp4.simplify() == '7x^3+4y^2')
Пример #4
0
def test5():
    exp5 = finitesum('2x^3-4y^2-5x^3')
    assert (exp5.simplify() == '-3x^3+-4y^2')
Пример #5
0
def test2():
    exp2 = finitesum('2x^7')
    assert (exp2.derive('x') == '14x^6')
Пример #6
0
def test3():
    exp3 = finitesum('2x+5y^7')
    exp3.setString('3y^2+82z')
    assert (exp3.getString() == '3y^2+82z')
Пример #7
0
def test2_9():
    exp9 = finitesum('0')
    assert (exp9.simplify() == '0')
Пример #8
0
def test2_1():
    exp = finitesum('2x^3y^4z^7')
    assert (exp.derive('y') == '8x^3y^3z^7')
Пример #9
0
def test2_7():
    exp7 = finitesum('y^-4')
    assert (exp7.simplify() == 'y^-4')
Пример #10
0
def test2_8():
    exp8 = finitesum('2x^-7-2y^-5')
    assert (exp8.derive('y') == '10y^-6')
Пример #11
0
def test2_6():
    exp6 = finitesum('y^-4')
    assert (exp6.derive('y') == '-4y^-5')
Пример #12
0
def test2_5():
    exp5 = finitesum('-y^6x^7')
    assert (exp5.derive('y') == '-6y^5x^7')
Пример #13
0
def test2_4():
    exp4 = finitesum('0+x')
    assert (exp4.simplify() == 'x')
Пример #14
0
def test2_3():
    exp3 = finitesum('y^3+2y')
    assert (exp3.derive('y') == '2+3y^2')
Пример #15
0
def test2_2():
    exp2 = finitesum('2x^2yz^3')
    assert (exp2.derive('y') == '2x^2z^3')