0

I have a system of non-linear first order differential equations I want to solve in the interval $[0,100]$ with NDSolve to get a numerical solution:

NDSolve[{X'[r]==-2r X[r]Y[r],X'[r]+Y'[r]==-(2/3r)X[r]-(10/3r)Y[r]},{X[r],Y[r]},{r,0.,100.}].

Everytime I try to solve the above system using NDSolve, as output it returns the same input and no solutions are given. What is wrong with the above code?

If it is the case of intial conditions not provided, I only know that $X[+\infty]=0=Y[+\infty].$ However, to put that in the above numerical solution method could be a bit tricky. Instead, I need to fit the solutions $X[r]$ and $Y[r]$ to a specific data.

How could I implement the code in such a way that with the two initial conditions $X[100.]=X0,Y[100.]=Y0$, say, writing

NDSolve[{X'[r]==-2r X[r]Y[r],X'[r]+Y'[r]==-(2/3r)X[r]-(10/3r)Y[r],X[100.]==X0,Y[100.]==Y0},{X[r],Y[r]},{r,0.,100.}]

I could find the solutions $X[r,X0,Y0],\;Y[r,X0,Y0]$ such that I could do the fittings to obtain the values of $X0$ and $Y0$ that suits the best the experimental data?

1 Answers1

1

This is not really an answer, but I use this format to be able to give a hyperlink.

If you, at least, know (say, from the experiment) a numerical interval, in which the values X0 and Y0 may lie (say, both from 0 to 1), you can theoretically make a table of solutions, such as

lst = Table[
  NDSolve[{X'[r] == -2 r X[r] Y[r], 
    X'[r] + Y'[r] == -(2/3 r) X[r] - (10/3 r) Y[r], X[100] == X0, 
    Y[100] == 0}, {X[r], Y[r]}, {r, 0., 100.}], {X0, 0, 1, 0.1}, {Y0, 
   0, 1, 0.1}]

Then you may think of comparing these solutions with some experimental data. However, you did not write what type of the data do you have, so it is impossible to tell more.

On the other hand, there is an interesting approach recently formulated by @bbgodfrey of how to cope with the boundary conditions in infinity during the numerical solution. You may find it here. Probably it will solve your problem without going to the table.

Glorfindel
  • 547
  • 1
  • 8
  • 14
Alexei Boulbitch
  • 39,397
  • 2
  • 47
  • 96