I want to find b[x] and c[x] in the interval 0

b'[x] - d[x] = 0,
c[x] - e[x] = 0,
lambda* d'[x] + b[x] (theta - k c[x]/(s+c[x])) = 0,
e'[x]-c[x]b[x]/(s+c[x]) = 0,

which b'[x] is first derivative of b[x] respect to x and constants of equations are:


and boundary conditions are:

c[1]=1, e[0]=0, d[0]=0, d[1]=0

The code I used is:


sol=NDSolve[{D[b[x],x] -d[x]==0,D[c[x],x] -e[x]==0,lambda*D[d[x],x]      
+b[x] (theta - k c[x]/(s+c[x]))==0,
 D[e[x],x] -c[x]b[x]/(s+c[x])==0,
c[1]==1,e[0] == 0,d[0]==0,d[1]==0},{b,c,d,e}, {x, 0, 1}]

p1=Plot[b[x] /. sol,{x, 0, 1},PlotStyle ->Red]
p2=Plot[c[x] /. sol,{x, 0, 1}]

but it returns just trivial solution:

c[x]=1, b[x]=0

What can I do to get nontrivial solutions of these equations? Could anyone help me? And one more question, I need answers which are in the interval 0<c[x]<1 and 0<b[x]<1. How can I consider these in solving equations?


Shooting method:


sols = Map[First[
       D[b[x],x] -d[x]==0,D[c[x],x] -e[x]==0,
       lambda D[d[x],x]+b[x] (theta - k c[x]/(s+c[x]))==0,
       D[e[x],x] -c[x]b[x]/(s+c[x])==0,
       c[1]==1,e[0] == 0,d[0]==0,d[1]==0},{b,c,d,e}, {x, 0, 0.5},
        Method ->  "BoundaryValues" ->
         {"Shooting",  "StartingInitialConditions" -> {c[0] == #}}]] &, Range[0,0.2, 0.1]];


enter image description here


NDSolve's output ignores multiple valid solutions

  • $\begingroup$ Could you please let me know what is Range[-5, 0, 1] in your code? And also I have another question: Is there any way to get answers for b[x] and c[x] which are positive in all interval 0<x<1? $\endgroup$ – sara nj Aug 8 '16 at 5:31
  • $\begingroup$ Range[-5,0,1] is the list{-5,-4,-3,-2,-1,0} for starting values of b[0] $\endgroup$ – Young Aug 8 '16 at 5:35
  • $\begingroup$ Does the first graph show 3 different answers for c? Does your code show all the answers available for c[x] and b[x]? $\endgroup$ – sara nj Aug 8 '16 at 5:36
  • $\begingroup$ So changing the range to another range would change the solutions, right?Actually I know that answers are in the interval 0<b[x]<1 and 0<c[x]<1. So should I change the range regarding to these information? $\endgroup$ – sara nj Aug 8 '16 at 5:38
  • $\begingroup$ It doesn't show all the answers ... changing the range could reveal more "solutions" $\endgroup$ – Young Aug 8 '16 at 5:40

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.