# Solve a system of ordinary differential equations

I have the following set of ordinary differential equations: $$\begin{cases} x_1'(s) &= -e^{-s} (1-x_1(s)) - x_2(s) + x_1(s) x_3(s)\\ x_2'(s) &= -x_2(s) + x_1(s)^2\\ x_3'(s) &= -x_3(s) + x_1(s), \end{cases}$$ with boundary condition $$x_2(0)=x_3(0)=0$$.

I am looking for a method to find an exact solution for this type of ODE. In particular I am interested in finding a solution for $$x_1$$ which satisfies $$x_1(\infty) = 0$$, but it already excelent if the solution of $$x_1$$ is simply given in function of a general boundary condition $$x_1(0) = a$$.

EDIT I have found this link of methods for solving this type of problems, but my problem does not seem to fit in any of the suggested methods.

• We can always count on the numerical method... Commented Sep 18, 2018 at 15:27
• Yes I know, I can of course solve it numerically. Commented Sep 19, 2018 at 6:52

Some terms where missing in the first edition of the question. The wording becomes clear with the original integro-differential equation from which the system of ODEs is derived. $$x'(s)=e^{-s}(1-x(s))+\int_0^se^{-(s-u)}x^2(u)du-\int_0^se^{-(s-u)}x(u)x(s)du$$ $$\begin{cases} x_1=x(s)\\ x_2=\int_0^se^{-(s-u)}x^2(u)du \\ x_3=\int_0^se^{-(s-u)}x(u)du\ \end{cases}$$ $$\begin{cases} x_1'(s) &= e^{-s} (1-x_1(s)) + x_2(s) - x_1(s) x_3(s)\\ x_2'(s) &= -x_2(s) + x_1(s)^2\\ x_3'(s) &= -x_3(s) + x_1(s) \end{cases}$$ We express $$x_1$$ and $$x_2$$ as functions of $$x_3$$. For simplification let : $$x_3=X$$ From the third equation : $$x_1=X'+X$$

From the first equation $$x_2 =(X''+X') -e^{-s} (1-X'-X) + (X'+X)X$$

From the second equation : $$(X'''+X'')+e^{-s}(1-X'-X)-e^{-s}(-X''-X')+(X''°X')X+(X'+X) = -(X''+X')+e^{-s}(1-X'-X)-(X'+X)X+(X'+X)^2$$ Now we have a third order ODE with only one function $$X(s)$$, after simplification : $$X'''+(2+X+e^{-s})X'' +(1+X+e^{-s})X' =0$$ This is a non-linear third order ODE. It can be simplified with the change : $$t=e^{-s}\quad;\quad X(s)=Y(t)$$ $$X'(s)=Y'(t)\frac{dt}{ds}=Y'(t)(-t)=-tY'(t)$$

$$X''(s)=(-Y'(t)-tY''(t))(-t)=tY'(t)+t^2Y''(t)$$

$$X'''(s)=(Y'(t)+3tY''(t)+t^2Y'''(t))(-t)= -tY'(t)-3t^2Y''(t)-t^3Y'''(t)$$

$$(-tY'-3t^2Y''-t^3Y''')+(2+Y+t)(tY'+t^2Y'') +(1+Y+t)(-tY') =0$$

After simplification : $$tY'''+(-Y-t+1)Y''=0$$

The general solution seems arduous to find. But we don't need it to find some particular solutions. Obviously $$Y''=0$$ leads to solutions of the form : $$Y(t)=c_1t+c_2$$ where $$c_1$$ and $$c_2$$ are arbitrary constants. $$X(s)=c_1\;e^{-s}+c_2$$ Putting it into the above equations for $$x_1$$ and $$x_2$$ leads to $$\begin{cases} x_1=c_2 \\ x_2=c_1\;e^{-s}+c_2\\ x_3=c_1\;e^{-s}+c_2 \end{cases}$$ The conditions $$x_2(0)=x_3(0)=0$$ leads to $$c_1+c_2=0$$. Then putting it into the integro-differential equation shows that $$c_2=1$$. Thus the answer is $$\begin{cases} x_1(s)=1 \\ x_2(s)=1-e^{-s}\\ x_3(s)=1-e^{-s} \end{cases}$$ This is a very simple solution.

This rightly answers to the question insofar the third condition is $$x_1(0)=1$$. No condition on $$x_1$$ was specified in the wording of the problem.

Note : If there was a third specified condition $$x_1(0)\neq 1$$ the above very simple solution would be no longer convenient. In this case we have to fully solve the ODE $$\:tY'''+(-Y-t+1)Y''=0$$ in order to have the general solution which must involve three arbitrary constants $$c_1$$ , $$c_2$$ and $$c_3$$ to be determined according to the boundary conditions. This would be more arduous.

• The original problem statement is as follows: $x'(s) = e^{-s}(1-x(s)) + \int_0^s e^{-(s-u)} x^2(u) du - \int_0^s e^{-(s-u)} x(u) du x(s)$ I then defined $x_1(s)=x(s)$, $x_2(s) = \int_0^s e^{-(s-u)} x_1^2(u) du$ and $x_3(s)=\int_0^s e^{-(s-u)} x(u) du$, which allows to reduce the given integro differential equation to an ordinary differential equation. Commented Sep 28, 2018 at 10:24
• OK, the integro-differential equation is solvable. Tomorrow I will re-edit my answer: A very simple solution. Commented Sep 28, 2018 at 21:43
• That is very good news! If you can just give me a hint (or several hints) such that I can derive the solution myself, I would be very happy! You can of course simply edit your answer and give the whole solution if you prefer to do that. Commented Sep 29, 2018 at 5:57
• In order to avoid mismatch of signs in the first equation, I prefer to re-start all from the integro-differential equation. See my updated answer. Commented Sep 29, 2018 at 8:20
• I am sorry but you made a mistake in the IDE: the last term should read $\int _0^s e^{-(s-u)} x(u) du x(s)$. I Think you neglected the $x(s)$ Commented Sep 29, 2018 at 8:37

$$\begin{cases} x_1'(s) &= x_2(s) - x_1(s) x_3(s)\\ x_2'(s) &= -x_2(s) + x_1(s)^2\\ x_3'(s) &= -x_3(s) + x_1(s), \end{cases}$$ We express $$x_1$$ and $$x_2$$ as functions of $$x_3$$. For simplification let : $$x_3=X$$ From the third equation : $$x_1=X'-X$$ From the first equation $$x_2=X''-X'+(X'-X)X$$ From the second equation : $$X'''-X''+(X''-X')X+(X'-X)X'=-(X''-X'+(X'-X)X)+(X'-X)^2$$ Now we have a third order ODE with only one function $$X(s)$$. $$X'''+X''X+(-X'+X-1)X'-X^2=0$$ This is an autonomous ODE. The change of function is : $$X'(s)=F(X) \quad;\quad X''(s)=F'(X)F(X) \quad;\quad X'''(s)=F''F^2+F'^2F$$ $$F''F^2+F'^2F+XF'F+(-F+X-1)F-X^2=0$$ This is a second order non-linear ODE difficult to solve. Probably there is no closed form general solution with the standard functions.

Some particular solutions might be found. For example $$F(X)=X$$ is a particular solution. But this solution which is not compatible with the boundary condition $$x_3(0)=0$$ must be rejected.

If the question comes from an academic exercise, a typo might be suspected in the given equations. Especially the third equation is doubtful. Are you sure that nothing is missing or wrong in the third equation ?

• Thank you for this very nice answer! I had indeed forgotten a term, see my edited question. Also I added some more information : I would mainly like to find the solution for $x_1$ and $x_1$ can have a general boundary condition not necessarily $x_1(0)=1/2$ (Of course, I think that if you can solve it for $x_1(0)=1/2$ I can continue from there..) I am sorry that I have edited the question. If no answer is given in the coming 5 days which are better than yours I will give you the bounty. Commented Sep 27, 2018 at 22:08
• The corrections were made in the equation for $x_1$. This equation should have read: $x_1'(s)= - e^{-s} (1-x_1(s)) - x_2(s) +x_1(s) x_3(s)$ Commented Sep 27, 2018 at 22:11

Just a beginning, you can eliminate $x_3$ $$\begin{cases} x_1' &= x_2 - x_1 x_3\\ x_2' &= -x_2 + x_1^2\\ x_3' &= -x_3 + x_1, \end{cases}$$

Sum the first and the second: $$x_1'+x_2'=x_1^2-x_1 x_3=x_1(x_1-x_3)$$

So we have

$$\begin{cases} x_3' &= {x_1' +x_2' \over x_1} \\ x_3 &= x_1 - {x_1' +x_2' \over x_1} , \end{cases}$$

• This is indeed a nice start, I will see if I can build on this! Commented Sep 19, 2018 at 6:52
• After taking a second look, I don't see how this eliminates $x_3$, if we substitute the found expression for $x_3$ into the equation for $x_1'$ I simply obtain the equation $x_2'=-x_2+x_1^2$? Commented Sep 19, 2018 at 11:07
• As the system is autonomous this is expected. You should first differentiate one of the other two expressions and then substitute. Differentiating the second I arrived at $\sqrt {x_2'+x_2}={x_2''+x_2' \over x_2-x_2'}$ but I'm not sure of this result.
– N74
Commented Sep 19, 2018 at 11:13
• But then the order of the ODE increases by one, which is classically resolved by introducing a new function $x_3=x_2'$? Commented Sep 19, 2018 at 11:18
• It is one way to solve it, but there are also methods to solve higher order equations directly. For your system I think that is the best way.
– N74
Commented Sep 19, 2018 at 11:41