I am trying to solve the following problem in Mathematica. However, the problem is that R0 is an equation itself, an integral, to be more specific. So I always get the above error message.
An alternative how to solve this would be to assume an exogenous value for R0, say R0=1, and then write a loop that calculates R0 after each iteration and computes until convergence is reached. But I think there must be a more elegant solution to this.
\[Alpha]h = 0.2; \[Alpha]z = 0.2; \[Gamma] = 0.5; ph = 0.01; pf = \
0.1; FC = 0.1; tC = 0; TC = 0; w = 1;
\[Rho] = 0.2; \[Sigma] = 1/(1 - \[Rho]); L = 1; RA = 0.25;
G = 1; S = 1;
R0 = NIntegrate[RC[s] - RA, {s, 0, S}];
eq1 = P'[s] == -((\[Alpha]h/\[Alpha]z)^(-(\[Rho]/\[Sigma])) + (RC[s] +
ph)^(-(\[Rho]/\[Sigma])) )/((RC[s] + ph)^-\[Sigma] (w +
G + R0/L - (pf + tC) s - FC - TC));
V = \[Alpha]h ((RC[s] +
ph)^(-(\[Rho]/\[Sigma])) + (\[Alpha]h/\[Alpha]z)^(-(\[Rho]/\
\[Sigma])))^((
1 - \[Rho])/\[Rho]) (w + G + R0/L - (pf + tC) s - FC -
TC) - \[Gamma] P[s] ;
eq2 = D[V, s] == 0;
rc = NDSolveValue[{eq1, eq2, P[S] == 0, RC[S] == RA}, RC, {s, 0, S}];
Plot[rc[s], {s, 0, S}, AxesLabel -> {s, "bid rent curve"}]
Maybe the problem is that I specify R0 with NIntegrate but it does not numerically integrate at that point? But I don't know what else to do.