# Thread: First order differential equation

1. ## First order differential equation

Having trouble solving this differential equation:

$\displaystyle \frac{\partial \Phi}{\partial x} - K\Phi(x) = -g(x)$

The answer I have so far is:
$\displaystyle \int_0^{\tau} \frac{\partial \Phi}{\partial x} dx = K\int_0^{\tau}\Phi(x)dx - \int_0^{\tau}g(x) dx$
$\displaystyle \Phi = K\int_0^{\tau} \Phi (x)dx - \int_0^{\tau} g(x) dx$

However it seems strange that I get an expression for $\displaystyle \Phi$ in terms of an integral of $\displaystyle \Phi$.

Any help would be much appreciated.

P.S. mr fantastic, seeing as this message had to come all the way from Neverland it took a little time to arrive fully! lol!

2. Originally Posted by peterpan
$\displaystyle \frac{\partial \Psi}{\partial t}$
I assume the rest of the question is in Neverland ....?

3. Hello, peterpan!

$\displaystyle \frac{d\Phi}{dx} - K\Phi \:=\: -g(x)$

You need an integrating factor: .$\displaystyle I \;=\;e^{\int(-K)dx} \;=\;e^{-Kx}$

Then we have: . $\displaystyle e^{-Kx}\frac{d\Phi}{dx} - Ke^{-Kx}\Phi \;=\;-e^{-Kx}g(x)$

. . . $\displaystyle \frac{d}{dx}\left(e^{-Kx}\Phi\right) \;=\;-e^{-Kx}g(x)$

Integrate . $\displaystyle e^{-Kx}\Phi \;=\;-\int e^{-Kt}g(x)\,dx \quad\hdots\quad \text{etc.}$

4. I thought that you only normally use an intergrating factor method when you have a differential equation of the form:

y' + P(x)y = Q(x)

Which is different to what we have here isnt it ?

5. Hello,

P(x) is only a polynomial. And a constant is a polynomial (degree : 0) !

6. Originally Posted by peterpan
I thought that you only normally use an intergrating factor method when you have a differential equation of the form:

y' + P(x)y = Q(x)

Which is different to what we have here isnt it ?
In your case, P(x) = -K and Q(x) = -g(x).

7. I see, thanks for the help. I think the reason I went wrong was because I believed that P(x) _had_ to be a function of x. In general terms is it valid to say P(x) = K?

8. Originally Posted by peterpan
I see, thanks for the help. I think the reason I went wrong was because I believed that P(x) _had_ to be a function of x. In general terms is it valid to say P(x) = K?

Originally Posted by Moo
[snip]

P(x) is only a polynomial. And a constant is a polynomial (degree : 0) !

9. Originally Posted by Soroban
Hello, peterpan!

You need an integrating factor: .$\displaystyle I \;=\;e^{\int(-K)dx} \;=\;e^{-Kx}$

Then we have: . $\displaystyle e^{-Kx}\frac{d\Phi}{dx} - Ke^{-Kx}\Phi \;=\;-e^{-Kx}g(x)$

. . . $\displaystyle \frac{d}{dx}\left(e^{-Kx}\Phi\right) \;=\;-e^{-Kx}g(x)$

Integrate . $\displaystyle e^{-Kx}\Phi \;=\;-\int e^{-Kt}g(x)\,dx \quad\hdots\quad \text{etc.}$

Is there a way that you can integrate the right had side such that the $\displaystyle e^{(-Kx)}$ dissapears?

10. Originally Posted by peterpan
Is there a way that you can integrate the right had side such that the $\displaystyle e^{(-Kx)}$ dissapears?
No. You'll need to have a specific function for g(x) before you can do anything useful with the right hand side.