1
$\begingroup$

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

$\endgroup$
  • 1
    $\begingroup$ 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. $\endgroup$ – Bill Watts Nov 23 '18 at 8:59
  • $\begingroup$ 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. $\endgroup$ – user21 Nov 23 '18 at 8:59
  • $\begingroup$ Hi user21 and Bill Watts, sorry for that. I added the parameters and some more explanation on what the boundary condition is. $\endgroup$ – Wolfgang H. Nov 23 '18 at 10:10
  • $\begingroup$ @WolfgangH. There is no definitive solution. Are you sure that there are no errors when writing equations and in the input data? $\endgroup$ – Alex Trounev Nov 23 '18 at 12:32
  • $\begingroup$ @AlexTrounev: I am pretty sure there must be a solution to it, as it seems to be a fairly standard problem in urban economics. $\endgroup$ – Wolfgang H. Nov 23 '18 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.