# Solving a pair of nonlinear coupled DEs

1. Apr 23, 2013

### zeroseven

Hi everyone, new member zeroseven here. First, I want to say that it's great to have a forum like this! Looking forward to participating in the discussion.

Anyway, I need to solve a pair of differential equations for an initial value problem, but am not sure if an analytical solution exists. I have been able to solve a special case as I explain below, but remain stumped with the more general form.

The equations are as follows:
dx/dt=-ax-cxy
dy/dt=-bx-cxy
Where a, b, and c are constants (all >0 in the problem I am trying to solve) and x and y the functions I need to solve.

I can solve the special case when a=b by substracting the 2nd eq. from the 1st. Then I get
d(x-y)/dy=-a(x-y) which is easy to solve for x-y, and the rest is pretty easy too. But this doesn't work for the general form where a and b are different.

Anyone have any ideas? Ultimately, what I really need is x*y, so if there is a way to get that without solving for x and y first, that is fine too.

They look deceptively simple, I hope a solution exists!

Cheers,
zeroseven

Last edited: Apr 23, 2013
2. Apr 24, 2013

### zeroseven

Just wanted to add a bit more detail about what I need to do:

The end result that I want is the integral
$\int^{∞}_{0}$cx(t)y(t)dt

So again, if it is possible to obtain this without having analytical solutions for x(t) and y(t) separately, that is fine. I don't even need x(t)y(t) like I misleadingly wrote in my original post, the definite integral is enough.
The initial values x(0) and y(0) are positive constants.

This is for some research I am doing, and really the only step that I haven't got figured out. Any suggestions would be much appreciated!

3. Apr 25, 2013

### haruspex

Yes, they look simple, but have you tried eliminating y to obtain a second order DE in x? That doesn't look so nice.

4. Apr 25, 2013

### Staff: Mentor

Divide the second equation by the first equation and see what you get.

5. Apr 26, 2013

### the_wolfman

These equations are very similar to the Lotka-Volterra equations. To my knowledge the L-V equations do not have a simple known solution, but studying them might give you some hints about how to solve your equation.

Also do you know the time asymptotic solutions for x(t) and y(t)?

You can rewrite your equations as
$cxy=-ax- d_t x$
$cxy=-bx- d_t y$

Integrating these two equations over time gives
$\int cxy dt=-a\int x dt-x(\infty)+x(0)$
$\int cxy dt=-b\int x dt-y(\infty)+y(0)$

If you know that your integrals are well behaved and if you know the initial values of x and y and their time asymptotic solutions, then with a little bit of algebra you can solve for $\int cxy dt$

6. Apr 26, 2013

### Staff: Mentor

$$\frac{dy}{dx}=\frac{a+cy}{b+cy}$$

$$dx=\frac{(b+cy)dy}{a+cy}=(\frac{b-a}{a+cy}+1)dy$$

$$x=y+\frac{(b-a)}{c}\ln(a+cy) + C$$

7. Apr 27, 2013

### zeroseven

First, thanks for the replies everyone!

Second, I need to apologize.. Seems I made a small type in my first post ... the equations should be
dx/dt=-ax-cxy
dy/dt=-by-cxy
(so bx in the first post should be by)

But the good news is, the replies didn't go to waste anyway. They pointed me in the right direction in that I should aim to eliminate dt completely from the equations. That way even this correct form of the equations becomes separable:

(b+cx)/x dx = (a+cy)/y dy

The solution cannot be expressed in elementary functions (as far as I know). It involves the Lambert w function. Luckily matlab and mathematica can deal with this easily.
Asumptotically, x(t) and y(t) go from a positive value to zero, so the integral $\int^{∞}_{0}$cx(t)y(t)dt can be evaluated numerically.

So this is pretty much solved despite the typo!

Very interesting connection to the Lotka-Volterra equations wolfman, I need to look into that...

8. Apr 27, 2013

### zeroseven

Interestingly (and frustratingly) I am unable to obtain the elementary function solution even for the special case a=b if I do it by eliminating dt. If I use the method I described in the first post, I can get a fairly simple elementary function for the integral that I need. But if I start by eliminating dt, then I keep running into equations with Lambert's w in them, and don't know how to get back to elementary functions from there.

This makes me wonder whether there is a solution with elementary functions for the general case (a and b unequal).

9. Apr 28, 2013

### zeroseven

Another update: Lotka-Volterra equations was a great tip. They are almost identical in form to my equations, and cannot be solved with elementary functions, which convinces me that my equations can't be either. Lambert's W works in both cases, though.
Anyone interested, have a look here:
http://www.emis.de/journals/DM/v13-2/art3.pdf