PDA

View Full Version : First order differential equation, solving for y


comiconor
Jun 10, 2014, 12:40 PM
If I have an equation in the form: dy/dx + f(x)y = g(x)

How can it be solved as y = e^-w * (integral (g(x)*e^w dx) + k) ?

To make it simpler, g(x) = 0, which would make it:

y = e^-w * k

But I still don't see how you arrive at this formula.

comiconor
Jun 10, 2014, 12:41 PM
Just to be clear, w = integral f(x) dx

ebaines
Jun 10, 2014, 12:58 PM
Seems to work. If g(x) = 0 then:

\frac{dy}{dx}+f(x)y=0

If y(x)=Ke^{-w(x)}, then substituting in the above yields:

-Ke^{-w(x)}\frac{dw}{dx}+f(x)Ke^{-w(x)}

We can substitute for \frac{dw}{dx}=\frac{d(int(f(x))dx}{dx}=f(x) to get:

-Ke^{-w(x)}f(x)+f(x)Ke^{-w(x)}=0, as expected.