NDsolve with endogenous boundary condition

I would like to solve a differential equation with a boundary that is implicitly determined by another equation (second equation in the NDsolve command below). The boundary is at s=S and determined by the equation that RC[S]==RA (where RA is a constant). Unfortunately, I cannot get the following code to work:

    \[Alpha]h = 0.2;
\[Alpha]z = 0.2;
\[Gamma] = 1;
ph = 2;
pf = 1;
tC = 0;
TC = 0;
Tw = 0;
FC = 0.3;
G = 0;
w = 1;
\[Rho] = 0.2;
\[Sigma] = 1/(1 - \[Rho]);
L = 1;
R0 = 1;
RA = 0.5;

NDSolve[{RC'[s] == (\[Sigma] (ph + RC[s])^((\[Rho] + \[Sigma])/\[Sigma])\((\[Alpha]h/\[Alpha]z)^(-(\[Rho]/\[Sigma])) + (ph +RC[s])^(-(\[Rho]/\[Sigma]))) (((pf + tC) (-R0 + L (FC - G + s (pf + tC) + TC + Tw - w)))/L + (\[Gamma] (ph + RC[s])^\[Sigma] \((\[Alpha]h/\[Alpha]z)^(-(\[Rho]/\[Sigma])) + (ph + RC[s])^(-(\[Rho]/\[Sigma])))^(2 - 1/\[Rho]))/\[Alpha]h))/((FC - G - R0/L + s (pf + tC) + TC + Tw - w)^2 (1 - \[Rho])), RC[S] == RA},RC[s], {s, 0, 10}, {S, 0, 10000}]


It produces the following error message:

NDSolve: The arguments should be ordered consistently.


I have tried other codes as well but haven't managed to get a solution. Help would be greatly appreciated. I am not sure whether I specify the boundary condition in the right way, and answers to similar questions on boundary conditions that I browsed through haven't helped either.

Thanks,

Wolfgang

• For NDSolve all constants have to be defined numerically. Also, you have RC as a function of s, but you are varying S as well. After setting values for all your constants, you could possibly make a Table of solutions with varying S values, but for 10000 of them that may take awhile assuming the problem can be solved at all. – Bill Watts Nov 23 '18 at 8:59
• Weclome Wolfgang. With out the constants like FC, RA, etc.. we can not solve the problem. You'd need to specify everything such that people here can potentially solve the problem. Use the 'edit' button for that under your question. – user21 Nov 23 '18 at 8:59
• Hi user21 and Bill Watts, sorry for that. I added the parameters and some more explanation on what the boundary condition is. – Wolfgang H. Nov 23 '18 at 10:10
• @WolfgangH. There is no definitive solution. Are you sure that there are no errors when writing equations and in the input data? – Alex Trounev Nov 23 '18 at 12:32
• @AlexTrounev: I am pretty sure there must be a solution to it, as it seems to be a fairly standard problem in urban economics. – Wolfgang H. Nov 23 '18 at 17:02