# First order differential equation

• Apr 5th 2008, 01:55 PM
peterpan
First order differential equation
Having trouble solving this differential equation:

$

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

$

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

$
\Phi = K\int_0^{\tau} \Phi (x)dx - \int_0^{\tau} g(x) dx

$

However it seems strange that I get an expression for $\Phi$ in terms of an integral of $\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!
• Apr 5th 2008, 02:04 PM
mr fantastic
Quote:

Originally Posted by peterpan
$
\frac{\partial \Psi}{\partial t}
$

I assume the rest of the question is in Neverland ....?
• Apr 5th 2008, 02:25 PM
Soroban
Hello, peterpan!

Quote:

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

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

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

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

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

• Apr 5th 2008, 02:30 PM
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 ?
• Apr 5th 2008, 02:38 PM
Moo
Hello,

P(x) is only a polynomial. And a constant is a polynomial (degree : 0) ! ;)
• Apr 5th 2008, 02:41 PM
mr fantastic
Quote:

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).
• Apr 5th 2008, 02:45 PM
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?
• Apr 5th 2008, 03:02 PM
mr fantastic
Quote:

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?

Quote:

Originally Posted by Moo
[snip]

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

• Apr 5th 2008, 03:02 PM
peterpan
Quote:

Originally Posted by Soroban
Hello, peterpan!

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

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

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

Integrate . $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 $e^{(-Kx)}$ dissapears?
• Apr 5th 2008, 03:08 PM
mr fantastic
Quote:

Originally Posted by peterpan
Is there a way that you can integrate the right had side such that the $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.