Ask Your Question

truncated exponential series over ring of matrices over symbolic ring

asked 2017-12-19 22:33:44 +0200

charleslebarron gravatar image

I want to do the following:


I then want to define a function as the first several terms of the exponential series exp(gamma). Something like


This will return an error like: 'too many values to unpack'

I only want to work with this function formally until I need to specify a value of n and eventually solve for the value f(i), g(i) in terms of some other parameters (yet to be defined in this code). What are some ways to clean this up so I can work with the truncated power series with matrix coefficients?

A possibly simpler but related question is how does one build a function that will sum several powers of a matrix?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-12-19 23:16:06 +0200

tmonteil gravatar image

updated 2017-12-20 11:40:08 +0200

I am not sure about your request, is the following sufficient for you ?

sage: Gamma = lambda n: sum(gamma^i/factorial(i) for i in range(n))
sage: Gamma(2)
[                     1 sum(z^i*f(i), i, 1, n)]
[sum(z^i*g(i), i, 1, n)                      1]

sage: Gamma(3)
[1/2*sum(z^i*f(i), i, 1, n)*sum(z^i*g(i), i, 1, n) + 1                                sum(z^i*f(i), i, 1, n)]
[                               sum(z^i*g(i), i, 1, n) 1/2*sum(z^i*f(i), i, 1, n)*sum(z^i*g(i), i, 1, n) + 1]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-12-19 22:33:44 +0200

Seen: 176 times

Last updated: Dec 20 '17