Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
0 answers
60 views

How can I create an indexed function in SymPy?

What I want is to create an indexed function. Something of the form: Where i is an integer and x is real. The idea is then to be able to integrate or take the x derivative: I've been looking ...
immortal's user avatar
1 vote
1 answer
530 views

Summing vector products in SymPy

The following code computes $\sum_{i=1}^3 x_i y_i$ symbolically first, and then substitutes specific numeric values into the expression to yield a single number. (I've added some lines to show ...
CharV's user avatar
  • 13
0 votes
1 answer
289 views

SymPy: Derivatives of KroneckerDelta and indices

Please refer to the following MWE: import sympy as s x = s.IndexedBase('x') y = s.IndexedBase('y') i,j,k = map(s.Idx,['i','j','k']) a = s.exp(x[i]*y[j]*s.KroneckerDelta(i,j)) b = a.diff(x[j]) The ...
user avatar
0 votes
2 answers
319 views

Storing original indices in Sympy indexed objects

I want to be able to take an Indexed object, substitute values for its indices but still remember its original indices. from sympy.tensor import IndexedBase, Idx C = IndexedBase("C") i,j = Idx("i"), ...
mohamedmoussa's user avatar