symbolic variables and +=
When I substitute symbolic variables into a function, the sum notation "+=" does not allow them because it only accepts reals. I need to substitute symbolic variables into the function. Is there any workaround? (I have tried sum(), but that breaks my function.)
Here's my attempt to sub in symbolic variables:
x1,x2 = var('x1 x2')
A2 = Afunction(2, [x1,x2])
Please define
Afunction
.