Dy/dx=f(y)+g(x)


By Brad Rodgers (P1930) on Tuesday, November 7, 2000 - 02:55 am :

I am having a bit of trouble finding a method of solving the differential equation of

dy/dx=f(y)+g(x)

How do we solve these sorts of equations?

Thanks,

Brad


By Brad Rodgers (P1930) on Tuesday, November 7, 2000 - 07:49 pm :

Thanks,

I had originally wished to solve the equation of

dy/dx=y+x

I just can't seem to do this methodically (I think that a solution is y=-x-1, but there most probably are other solutions). Any help would be greatly appreciated.

Brad


By Michael Doré (Md285) on Tuesday, November 7, 2000 - 08:01 pm :

Ah well that's much easier than the general case. The nice thing with your example is that the differential equation is linear in y.

You have already found one solution: y = -x - 1 (to see this works just plug in y = -x - 1 to both sides and make sure they balance).

So if you let y1 = -x - 1 then:

dy1 /dx = y1 + x [equation 1]

Now suppose there exists another solution, y such that

dy/dx = y + x [equation 2]

Subtract [1] from [2]:

dy/dx - dy1 /dx = y - y1 + x - x

So:

d(y - y1 )/dx = (y - y1 )

So the function u = y - y1 satisfies:

du/dx = u

Therefore u = Aex , y - y1 = Aex

y = - x - 1 + Aex

And remember that this holds for any y that satisfies the differential equation, so the general solution is:

y = -x - 1 + Aex

where A is an arbitrary constant.

Hope this helps,

Michael


By Tom Hardcastle (P2477) on Tuesday, November 7, 2000 - 10:05 pm :

There is also an alternative method which can be used to solve the more general dy/dx = y.f(x) + g(x) which you might be interested in.

If dy/dx + Py = Q where P and Q are functions of x
dy/dx + Py = Q

Now multiply through by R=eòP dx which gives you
R dy/dx + RPy = RQ
Now d(Ry)/dx = R dy/dx + RPy.
So d(Ry)/dx = RQ
So Ry=ò(R Q) dx.
So in this case, Q = x and P = -1, so R = e-x
y e-x=ò(x e-x) dx=-x e-x-e-x+A y = -x - 1 + Aex

Clearly, for this case, the method outlined by Michael is much simpler. But when P is not a constant and the differential equation is linear, this method actually becomes useful.

Tom.
By Kerwin Hui (Kwkh2) on Wednesday, November 8, 2000 - 02:11 pm :
So the general solution to the differential equation dy/dx+P(x)y=Q(x) is

y=e-òP(x) dxò(Q(x)eòP(x ' )dx ' dx

Kerwin