Which I get:
def sumAN(theta,CoefAN,n_cl):
# this function give us the sumatory in the right side of the formula
Sumatorio = np.array([])
for count,i in enumerate(theta):
sumatorio = 0
for count2,j in enumerate(n_cl):
sumatorio = sumatorio +CoefAN[count2]*sin(int(count2+1)*i)
Sumatorio = np.append(Sumatorio,sumatorio)
return Sumatorio
cl= 4*((np.radians(alpha)+A0)*tan(theta/2)+sumAN(theta,CoefAN,n_cl))
To explain a little bit this:
- Alpha: constant
- A0: constant
- AN : np.array([])(n values)
- theta: independent variable
After this, I need to calculate the next integral:
Here is where Im having the problems:
ch = integrate.quad(lambda theta:(4*((alpha_char+A0)*tan(theta/2)+sumAN(theta,CoefAN,n_charl)))*(cos(theta)-cos(xa))*sin(theta),0,xa)[0]
I have all the limits and everything. But I get the next error:
'float' object is not iterable
I dont know how to continue. So my question is: how can I integrate this function using the integrate.quad method? Maybe I shall change the way the sumatorie is made? How I can write the function in other way that this works? Thanks in advance
