# Desperate with this ODE!

1. Jul 25, 2006

### Stefania

I have trouble solving this first order nonlinear ODE :

[TEX] f'(x) = \frac{af(x)[f(x)-bx]}{(1-c+bdx)f(x)+bcx-df(x)^2}[/TEX]

where [TEX]a,b,c,d\in\Re_+[/TEX] are parameters and [TEX]x\in\Re_+[/TEX].

The particular solution I am looking for should be such that:
[TEX] f'(x) &>& 0\\
\lim_{x\rightarrow 0}f(x) &=&0\\
f(x)&\geq & bx[/TEX]

Also, the solution should lie above the line [TEX]bx[/TEX] and below the following function [TEX]g(x)[/TEX]:

[TEX]g(x)=\frac{-(c-1-bdx)+ \sqrt{(c-1-bdx)^2+4bcdx}}{2d}[/TEX]

This problem is driving me nut! Any help/suggestion would be greatly appreciated!!!

Last edited: Jul 25, 2006
2. Jul 26, 2006

### J77

Your LaTex apparently hasn't worked...

3. Jul 27, 2006

### Stefania

Well, I see... how do I make it work by the way? I just followed the codes in other postings...

4. Jul 27, 2006

You need to have $$in lower case. 5. Jul 27, 2006 ### Stefania Ok I try again, but it really looks that it does not work. Anyways: the problem is the following: [tex]f'(x)=\frac{af(x)[f(x)-bx]}{(1-c+bdx)f(x)+bcx-df(x)^2}$$

where $$a,b,c,d\in\Re_+$$ and $$x\in\Re_+$$.

I look for a solution such that:
$$f'(x) > 0;\lim_{x\rightarrow 0}f(x) =0;f(x)\geq bx$$

The solution should lie above the straight line bx and below the following function g(x):

$$g(x)=\frac{-(c-1-bdx)+ \sqrt{(c-1-bdx)^2+4bcdx}}{2d}$$

As I said above, any help would be appreciated.
(nad if this still does not work, I will just send the code)

6. Jul 27, 2006

### eljose

I only see a direct solution with b=0 of the form:

$$x=Blogf(x)-dBf(x)$$ $$B=(1-c)a^{-1}$$

or a=0 then f(x)=C=constant.... but due to the NOn-linearity i think there's no analytic solution...

7. Jul 27, 2006

### Stefania

The parameters are all non-zero and positive, so the above does not solve my problem

I am happy with an approximated solution as well (power series type), I just don't manage to compute it!

8. Jul 27, 2006

### ObsessiveMathsFreak

Hopefully, my calculations are right here.

The original equation, with y=f(x), "simplifies" to:

$$\frac{dy}{dx} = \frac{ay(y-bx)}{y - (dy+c)(y-bx)}$$

If you try and flip the problem by seeking the inverse function you can try and solve

$$\frac{dx}{dy} = \frac{y - (dy+c)(y-bx)}{ay(y-bx)}$$
$$\frac{dx}{dy} = \frac{1}{a(y-bx)} - \frac{dy+c}{ay}$$
$$\frac{dx}{dy} = \frac{1}{a(y-bx)} - \frac{c}{ay} - \frac{d}{a}$$

Or if you prefer more "canonical" notation, let x->v, y->x:
$$\frac{dv}{dx} = \frac{1}{a(x-bv)} - \frac{c}{ax} - \frac{d}{a}$$

This may be a easier to solve, or perhaps a little easier on the numerical method. i really don't know. Hopefully it may be of some use. Then again it could be a dead end.

P.S. Where did you find this equation?!

P.P.S

In the above, taking the first factor, assuming it to be the most relevant, dv/dx = 1/(a*(x-bv)), flipping "again" to give:

$$dy^{~}/dx = a(y^{~}-bx)$$
solves to give
$$y^{~}=bx + \frac{b}{a} + C_1 e^{ax}$$

Interesting to note the presence of the bx term here already. Could be a good sign that the first term was dominant?

Last edited: Jul 27, 2006
9. Jul 27, 2006

### Stefania

Well, little story of the equation.

I am a PhD student in Economics, I am writing a model of multinational production and international trade. That equation is a pricing rule that comes from my model.

Actually, your transformed equation is the one that I get straight from the model, and I got stuck there.

Your idea of the dominant term seems interesting, and gives me a function which is above the straight line bx, which is what I want. Nonetheless, your solution does not respect my initial condition for the $$\lim_{x\rightarrow 0}=0$$, and the exponential term also makes it increase faster than the reference function g(x).

Do you have any idea of how I could approximate it around zero with a power series?

Thanks anyways

10. Jul 28, 2006

### J77

Do you need to find all unknowns a,b,c,d or do you know their values in cetain situations?

11. Jul 28, 2006

### Stefania

I know their values. I need an (approximated?) solution to the f(x) function in terms of the a,b,c,d coefficients. My ultimate goal is to study how f vary when I let the coefficients vary, and this is why I need a solution also in terms of the coefficients.

12. Jul 28, 2006

### desA

Judging from the form of that answer - roots to a polynomial, & working backwards, it could come from a quadratic form of the ODE. Something 'like':

$$A*(g(x))^2+B*g(x)+C=0$$

$$A=d$$

$$B=(c-1-bdx)$$

$$C=-(bcx)$$

It also appears that the 'dx' terms could actually be 'd*x'... A few thoughts...

desA

13. Jul 28, 2006

### Stefania

Sorry, I do not understand your answer. Yes, g(x) comes from that quadratic expression, but not f. I do not understand what your answer is telling me about f...

And yes: dx is actually d*x (here d is a parameter, like a,b,c)

Last edited: Jul 28, 2006
14. Jul 28, 2006

### StatusX

The two functions you mentioned which f(x) is everywhere in between are both asymptotic to y=bx, so f(x) must also be. I'd suggest defining f(x)=bx g(x), and then deriving a differential equation for g(x). Factoring out the asymptotic behavior of functions often simplifies the DE.

15. Jul 28, 2006

### Stefania

sorry, I am a little slow on this...

I agree g(x) is asymptotic to bx, then how can the product bx*g(x) be also asymptotic to b(x)?

Also, I do not understand your suggestion completely: you suggest to use f'(x) and the equality f(x)=bx g(x) to derive a DE for g. Ok, but how does that make me factor out the asymptotic behavior from f?

16. Jul 28, 2006

### StatusX

I am saying that if f(x)~bx, then defining g(x)=f(x)/bx, we have g(x)~1, which is easier to deal with. You can find an ODE for g(x), and if you can solve this one, you can get f(x). In some cases this ODE would be simpler, but I'm not sure if that will be the case here. In any case, it will probably give you better results if you solve for g(x) numerically than if you try to directly solve for f(x) numerically.

Last edited: Jul 28, 2006
17. Jul 28, 2006

### Stefania

Ok, the function that you call g(x) is another function, is not my function g(x), the one I gave the expression above.

Ok I'll try this way, thanks.

18. Jul 28, 2006

### desA

You may want to look into using a numeric solution to allow you to scope the behaviour of your function. This could give you some clues as to whether an analytic solution does indeed exist. Many times, it simply does not.

A numeric solution using a 'shooting method' is easily written in Matlab.

Engineers use this technique to solve non-linear ODE's where no analytic solution currently exists.

desA

19. Jul 29, 2006

### Stefania

Thank you desA. I tried with numerical methods, but the problem that I have with shooting is that at the initial condition $$\lim_{x\rightarrow 0}f(x)=0$$, the function is ill-defined.

How do I scope the behaviour of my function? I believe numerical methods allow me to use the conditions I know (about f(x) being increasing and between bx and g(x)), but I do not know how!

20. Jul 30, 2006

### Stefania

Answering to StatusX: I followed your suggestion, but the equation does not get easier even factoring out the asymptotic behavior.

Everything seems to suggest that there is no exact solution to this equation.
Does anybody have a suggestion on how I could approximate the solution?