Question: how to mixed calculation of integrate and sum

here is an equation

eq := I*`ℏ`*(sum((diff(c[n](t), t))*f[n](r)*exp(-I*omega[n]*t), n = l .. k)) = (1/2)*E[0](e_.r_)*e*(sum(c[n](t)*f[n](r)*omega[n]*(exp(I*t*(-omega[n]+Omega))+exp(-I*t*(omega[n]+Omega))), n = l .. k))

req := Int(conjugate(f[m](r))*rhs(eq), r)

leq := Int(conjugate(f[m](r))*lhs(eq), r)

sup:=Int(conjugate(f[m](r))*f[n](r), r) = delta[m, n]

ans:=applyrule(sup,leq=req)

how can get the result as

ans := I*`ℏ`*(diff(c[m](t), t))*exp(-I*omega[m]*t) = sum((int(Typesetting[delayDotProduct](conjugate(f[m](r)), e_.r_, true)*f[n](r)*dr, r))*omega[n](exp(I*t*(-omega[n]+Omega))+exp(-I*t*(omega[n]+Omega))), n = l .. k)

Please Wait...