Question: Error using int command

I am trying to evaluate integral (-1/rho)*del (p)/del (x) dy within the limits y=0 to y=delta (x). For that I first evaluated (-1/rho)*del (p)/del (x) and stored it in res2. Then I tried to integrate it w.r.t dy within limits 0 to delta (x). I wrote the following Maple lines for the purpose:

Te := proc (x, y) options operator, arrow; T[inf]+(T[w]-T[inf])*(1-y/delta[t](x))^2/(1+2*A*H/delta[t](x)) end proc

PDE := diff(P(x, y), y)-rho*g*beta*(Te(x, y)-T[inf]) = 0

bc := P(x, delta(x)) = P[inf]

general := pdsolve(PDE)

subs(y = delta(x), bc, general)

solve(%, {_F1(x)})

sol := subs(%, general)

res2 = -(diff(sol, x))/rho

Res2 := int(res2(x, y), y = 0 .. delta(x))

But maple says:

Error, (in int) wrong number (or type) of arguments: for an operator integrand a range without a variable of integration is expected, got y = 0 .. delta(x). The actual code is quite lengthy and this is only a part of it. The actual code is attached herewith.
I request earnestly for help.
Please Wait...