Ask Your Question

LBLB's profile - activity

2020-04-03 16:55:22 +0200 commented question Problem using Taylor several times

Sorry, it does not changes the result...

2020-04-03 16:34:25 +0200 commented question Problem using Taylor several times

I'm using 8.0 The problem is that the false result does not occurs directly. If I run the function, it gives me the expansion as well. But after running more cells, then it starts to mess up completely. In fact I see where the problem comes from: the matrices are defined over "Symbolic Ring" (with formal variable m and y) Then I run a function that uses matrices with some other variables (and after that it starts to mess up). At some point, my guess is that Sage doesn't know anymore that my matrices coeffs are functions of m, and so the taylor command is kind of empty for him. Any idea how to fix that?

2020-04-03 16:04:51 +0200 received badge  Student (source)
2020-04-03 16:01:35 +0200 commented question Problem using Taylor several times

For example, first it gave the correct result, and now: Applying the function vMatrix to the following matrix: [ (m^3 + my - m)/(m^2 - 1) -(m^4 + m^2y - 2m^2 + 1)/(m^5 - 2m^3 + m)] [ my -(m^2y - m^2 + 1)/(m^3 - m)]

It gives: [ -m^5/(m^2 - 1) (m^6 + m^2 - 1)/(m^5 - 2*m^3 + m)] [ -m^5 - m^3 + m (m^6 + m^4 - 1)/(m^3 - m)] which is just the result of the substitution.

2020-04-03 15:55:43 +0200 commented question Problem using Taylor several times

Why? I wish it gives a Taylor expansion in any case.

2020-04-03 15:52:25 +0200 received badge  Editor (source)
2020-04-03 15:21:51 +0200 asked a question Problem using Taylor several times

I have a sage worksheet using small functions such as

def vMatrix(M):
    Lmat=[]
    for i in [0..1]: 
        for j in [0..1]:
            Lmat.append(M.subs(y==1-m^2-m^4)[i,j].taylor(m,0,4))
    return Matrix(2,Lmat)

At the beginning, it works perfectly (computing approximations of matrices with parameters) but after using it several times, it stops computing the Taylor expansion of the coefficients, and simply returns the matrix.

I'm getting crazy with that :(

Does someone has an idea on what's happening?

Thx Leo