I am trying to solve the differential equation below using the following code.
deq := diff(c(x), x, x) = c(x)*exp(gamma*beta*(1-c(x))/(1+beta*(1-c(x))))
ic := (D(c))(1) = 0, c(0) = lambda
dsol := dsolve({deq, ic}, numeric, output=array([0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0]), continuation = lambda)
The original c(0) condition is c(0)=1. I have been obtaining solutions for c(x) for different beta, gamma, and x combinations. I want to use beta values from 0-10 and gamma values from 0-50. When I got to beta=3 and gamma=15, I received the following error: "Error, (in dsolve/numeric/BVPCont) continuation failed for parameter value 0.1e-1, suggest using a different continuation, or a finer mesh"
How can I use a finer mesh? Or is there a different approach to solving this problem?
Thanks
I posted this in the Student forum as well.
Very sensitive
I tried your differential equation with initial conditions c(0)=1, D(c)(0)=m for various values of m. I found the result switched very rapidly from a solution going to -infinity to one that hits the singularity at c(x) = 4/3, near m = -84.2316172. In fact, here are the solutions for m=-84.2316171 (in red) and m = -84.2316172 (in blue):
Due to roundoff error, I'm not sure how much to trust these results, but the switching point should be quite close to this. For x near 0 (before the two solutions start to diverge noticeably), the solution to your problem should agree with these, and it should be very close to 0 for larger x. Clearly the problem is extremely sensitive.