I need to create a large number of equations in different variations, and
they involve symbols such as
E1m1 = symbols('E_{1\,-1}')
Since subst() does not work for symbols, I create the string 'E1m1' as
('E'+str(1)+str(-1)).replace('-', 'm')
and then use symbols(str). This is working fine for most cases, but not
all. Specifically, E11 and E10 work fine, but E1m1 fails. Here is the
output of the expression and its latex variant.
Eq(0, E10*a0*am1 + E11*a0*a1 + E1m1*am1*am2 + F1*a0**2 + 2*F1*a1*am1 + G1*a0
*am2 + G1*a1*am3 + G1*am1**2)
0 = E_{10} a_{0} am_{1} + E_{11} a_{0} a_{1} + E1m1 am_{1} am_{2} + F_{1} a_
{0}^{2} + 2 F_{1} a_{1} am_{1} + G_{1} a_{0} am_{2} + G_{1} a_{1} am_{3} +
G_{1} am_{1}^{2}
I have attached a test program in hopes that it will make things clearer.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/31739234-3903-4308-b528-5655ab6c32e2%40googlegroups.com.