コード例 #1
0
def test_constant_system():
    A = Matrix([[-(x + 3) / (x - 1), (x + 1) / (x - 1), 1],
                [-x - 3, x + 1, x - 1], [2 * (x + 3) / (x - 1), 0, 0]])
    u = Matrix([(x + 1) / (x - 1), x + 1, 0])
    DE = DifferentialExtension(extension={'D': [Poly(1, x)]})
    assert constant_system(A, u, DE) == \
        (Matrix([[1, 0, 0],
                 [0, 1, 0],
                 [0, 0, 0],
                 [0, 0, 1]]), Matrix([0, 1, 0, 0]))
コード例 #2
0
ファイル: test_prde.py プロジェクト: A-turing-machine/sympy
def test_constant_system():
    A = Matrix([[-(x + 3)/(x - 1), (x + 1)/(x - 1), 1],
                [-x - 3, x + 1, x - 1],
                [2*(x + 3)/(x - 1), 0, 0]])
    u = Matrix([(x + 1)/(x - 1), x + 1, 0])
    DE = DifferentialExtension(extension={'D': [Poly(1, x)]})
    assert constant_system(A, u, DE) == \
        (Matrix([[1, 0, 0],
                 [0, 1, 0],
                 [0, 0, 0],
                 [0, 0, 1]]), Matrix([0, 1, 0, 0]))
コード例 #3
0
ファイル: test_prde.py プロジェクト: vishalbelsare/sympy
def test_constant_system():
    A = Matrix([[-(x + 3) / (x - 1), (x + 1) / (x - 1), 1],
                [-x - 3, x + 1, x - 1], [2 * (x + 3) / (x - 1), 0, 0]], t)
    u = Matrix([[(x + 1) / (x - 1)], [x + 1], [0]], t)
    DE = DifferentialExtension(extension={'D': [Poly(1, x)]})
    R = QQ.frac_field(x)[t]
    assert constant_system(A, u, DE) == \
        (Matrix([[1, 0, 0],
                 [0, 1, 0],
                 [0, 0, 0],
                 [0, 0, 1]], ring=R), Matrix([0, 1, 0, 0], ring=R))