Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Defining family of multivariable polynomials

Brand new to Sage here and trying to define a family of polynomials indexed by natural numbers. In particular, I'd like to be able to generate then perform symbolic calculations with the family of polynomials defined for all nN and all k=0,,2n by pk={0if k=0kj=1xkif kn2nk+1j=1xjif k>n

So far the attempts that I've had are of the form:

h = lambda k:sum([var('d_%d' %(i+1)) for i in range(k)])

but I don't seem to easily perform calculations with these. Another method I was trying is by defining Q[x0,,xn] then trying to defining these polynomials using conditional statements but keep getting errors that my variables don't exist.

Would love some help or a hint.

Defining family of multivariable polynomials

Brand new to Sage here and trying to define a family of polynomials indexed by natural numbers. In particular, I'd like to be able to generate then perform symbolic calculations with the family of polynomials defined for all nN and all k=0,,2n by $$p_k=\begin{cases} $$p_{n,k}=\begin{cases} 0 & \textrm{if } k=0\newline \sum_{j=1}^k x_k&\textrm{if x_j&\textrm{if } k\leq n\newline \sum_{j=1}^{2n-k+1}x_j&\textrm{if }k>n \end{cases}$$

So far the attempts that I've had are of the form:

sage: h = lambda k:sum([var('d_%d' %(i+1)) for i in range(k)])

range(k)])

but I don't seem to easily perform calculations with these. Another method I was trying is by defining Q[x0,,xn] then trying to defining these polynomials using conditional statements but keep getting errors that my variables don't exist.

Would love some help or a hint.

Defining family of multivariable polynomials

Brand new to Sage here and trying to define a family of polynomials indexed by natural numbers. In particular, I'd like to be able to generate then perform symbolic calculations with the family of polynomials defined for all nN and all k=0,,2n by pn,k={0if k=0kj=1xjif kn2nk+1j=1xjif k>n

So far the attempts that I've had are of the form:

sage: h = lambda k:sum([var('d_%d' %(i+1)) for i in range(k)])

but I don't seem to easily perform calculations with these. Another method I was trying is by defining Q[x0,,xn] then trying to defining define these polynomials using conditional statements but statements. I seem to keep getting errors that stating my variables don't exist.

Would love some help or a hint.