| 1 | initial version |
You should create the list res_coef from symbolic expressions, not directly from the coordinate functions representing the coefficients. To get the symbolic expression of the coordinate function res[ind], use the method expr(). Hence if you replace res[ind]**2 in your input In[5] by res[ind].expr()**2, everything works, as you can see on
https://cloud.sagemath.com/projects/551a1e1d-9360-47bf-89ba-91603e96c7fe/files/Ask+sage.html
For more details about the difference between symbolic expressions and coordinate functions see http://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/coord_func_symb.html
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.