# Simple-looking 1st order DE, solution anyone?

1. Apr 15, 2013

### Irid

I have a differential equation
$$\frac{dx}{dt} = \frac{a-x}{b-t} - cx$$
but no idea if there is an analytical solution :(
I tried the integrating factor method, but I run into a e^(-x)/x^2 kind of integral, which I think doesn't have an analytical expression.. Help, please?

2. Apr 15, 2013

### ShayanJ

With some manipulation,your equation can get the form below:
$-(t-b)(\dot{x}+cx)+x=a$
Now take a solution like:
$x=\sum_0^{\infty}a_n(t-b)^{n+r}$
We have:
$\dot{x}=\sum_0^{\infty}a_n (n+r) (t-b)^{n+r-1}$
If you substitute the x and $\dot{x}$ in the homogenous DE,you will find:
$-\sum_0^{\infty}a_n(n+r)(t-b)^{n+r}+\sum_0^{\infty}a_n(t-b)^{n+r}-\sum_1^{\infty}ca_{n-1}(t-b)^{n+r}=0$
Where I have changed the summation index in the third term from n to n-1 to make the powers of (t-b) the same in all summations.
Now to make the summations start from a common n,I get the n=0 terms out of the first two summations:
$-a_0r(t-b)^r+a_0(t-b)^r=0$
Which gives $r=1$
Then you can take all the terms in one summation and equate the coefficient of $(t-b)^{n+r}$ to zero to get a recursion relation which determines the series solution.
Then you should add a/(c+1) to get the solution to the in-homogenous equation.

Last edited: Apr 15, 2013
3. Apr 15, 2013

### Irid

so you mean to say that there is no solution in terms of elementary functions?

4. Apr 15, 2013

### ShayanJ

The series you find may come out to be the power series corresponding to an elementary function.But it only may.

5. Apr 15, 2013

### Irid

argh :(
better integrate numerically then...

6. Apr 15, 2013

### ShayanJ

I just used www.wolframalpha.com to solve your equation and this is the result:
With $x \rightarrow t$ and $y \rightarrow x$
And Ei(x) is the exponential integral which you can find its values in some tables of functions.

Last edited by a moderator: May 6, 2017
7. Apr 15, 2013

### HallsofIvy

That is a linear differential equation.
$$\frac{dx}{dt}+ (\frac{1}{b- t}+ c)x= \frac{a}{b- t}$$
An "integrating factor" is a function u(t) such that
$$\frac{dux}{dt}= u\frac{dx}{dt}+ u(\frac{1}{b- t}+ c)x$$
Since
$$\frac{dux}{dt}= u\frac{dx}{dt}+ \frac{du}{dt}x$$
that means we must have
$$\frac{du}{dt}= \frac{1}{b- t}+ c$$
$$du= \left(\frac{1}{b- t}+ c\right)dt$$

u(t)= -ln|b-t|+ ct

That is, the original differential equation is
$$\frac{d}{dt}\left(x(t)(-ln|b- t|+ c\right)= (-ln|b- t|+ ct)\frac{a}{b- t}$$
so that
$$x(t)(-ln|b- t|+ c)= \int (-ln|b-t|+ ct)\frac{a}{b- t} dt$$

Let u= b- t so that du= dt and the right side becomes
$$b\int \frac{ln|u|}{u}du- ac\int \frac{b- u}{u}du$$
In the first integral let v= ln|u| so that dv= du/u and that integral becomes
$$\int v dv= (1/2)v^2= (1/2)(ln|u|)^2= (1/2)(ln|b- t|)^2$$
In the second integral (b-u)/u= (b/u)- 1 and its integral bln|u|- u= b ln|b- t|- |b- t|.
putting those together
$$x(t)(-ln|b- t|+ c)= (1/2)(ln|b-t|)^2+ b ln|b- t|- |b- t|)$$

Finally,
$$x(t)= \frac{ln|b-t|)^2+ b ln|b- t|- |b- t|}{2(-ln|b- t|+ c)}$$

Last edited by a moderator: Apr 15, 2013
8. Apr 15, 2013

### Irid

This can't be right. If you set c=0, the solution is simply x= at/b, and your equation doesn't reduce to that. Also, if b -> infinity, the solution tends to x = Ae(-ct), which I see no trace of in your calculations.

Last edited: Apr 15, 2013
9. Apr 15, 2013

### ShayanJ

Here's the problem:
We should have:
$\frac{du}{dt}=u(\frac{1}{b-t}+c)$
Which gives an integrating factor of:
$u=\frac{e^{ct}}{b-t}$
And we will have:
$\frac{xe^{ct}}{b-t}=\int \frac{ae^{ct}}{(b-t)^2}dt$
And this gives the answer that I tried to present in the post #6 but it seems that its image is deleted from the server of the wolframalpha.
$-{{\rm e}^{-ct}}a \left( -{{\rm e}^{ct}}+{{\rm e}^{cb}}{\it Ei} \left( 1,cb-ct \right) cb-{{\rm e}^{cb}}{\it Ei} \left( 1,cb-ct \right) ct \right)$
Where:
$Ei(a,z)=\int_1^{\infty} e^{-tz}t^{-a}dt$
is the exponential integral and you can find its values in some mathematical tables.

Last edited: Apr 15, 2013
10. Apr 23, 2013

### maistral

Just trying :|

Isn't it a linear DE? I'm not really good at these kinds of things, but here's my try:

I'm not sure, I don't really go for analytic solutions :|

EDIT: I looked at how wolframalpha would integrate the right-hand integral and it generated an Ei(-c(t-b)) o-o

#### Attached Files:

• ###### ithink.png
File size:
5.4 KB
Views:
62
Last edited: Apr 23, 2013