Warning: This site may not display properly on devices or windows with a small amount of screen width. While everthing is still accessible, be aware that sometimes parts will be hidden and require scrolling horizontally. It is recommended you view this in a larger window or in landscape mode

First order separable ordinary differential equations

For a first order ODE to be considered separable, the form it has to be in is

dydx=P(x)Q(y)

What this means is that the differential (dydx) needs to be equal to two separate functions that are multiplied together with one of the functions containing all of the y's and the other containing all of the x's.

dydx=P(x)Q(y)

In order to solve this, we will first separate the two functions, putting the one containing the variable we are differentiating on the left side

1Q(y)(dydx=P(x)Q(y))

Multiplying this into both sides of our equation will cancel out the Q(y) on the right side and give us

1Q(y)dydx=P(x)

Now we will integrate both sides with respect to x

1Q(y)dydxdx=P(x)dx

Remembering back to the change of variables integration method (and that the y's were working with can be seen as functions of x), we have the substitution

u=y(x)du=dydxdx

which when substituted in will give us...

1Q(u)du=P(x)dx

From here we can solve each side as though they were their own integrals (don't forget the +c). After integrating, and once we do substitute the y(x) back in for u, we will have found the general solution to our separable differential equation

Now that we have seen the "correct" way to solve this, take note that (with the exception of the substitution, which we would substitute back to y anyway) we could get the same end result by treating the differential as a fraction.

dydx=P(x)Q(y)

Multiplying the equation by dx

dx(dydx=P(x)G(y))

The dx's on the left cancel giving us

dy=P(x)Q(y)dx

Dividing by the function associated with y

(dy=P(x)Q(y)dx)1Q(y)

The Q(y)'s cancel leaving us with

dyQ(y)=P(x)dx

at which point we can integrate both sides

dyQ(y)=P(x)dx

and same as before after integrating, we find the same solution as what we did above.

While "technically" we can't treat dydx as a fraction1. In most cases, and at least all cases that we'll be seeing in these lessons, treating dydx as a fraction and thinking of it as a ratio will yield the same results. Just know that technically when we are doing these manipulations, some other stuff is going on in the background to make it work. So for all intents and purposes, treat it as a fraction.

Links in this dropdown if you want to dig more into it.

In no particular order...
detaching dy and dx

when not to treat dy dx as a fraction

differentials as fractions

why can't dy dx be used as a fraction

is dy dx not a ratio?

how to treat differntials and infinitesimals


Now that we have the generalized walkthrough on solving it, lets look at a few examples of figuring out the P(x) and Q(y)
1.

The simplest would be something like

dydx=x4y
P(x)=x4Q(y)=y

With this you can see that P(x) times Q(y) is indeed x4y.

2.

Sometimes you will have to play around with it a little to get it into the seperable form

dydt=2xet+2x
dydt=2xete2x
dydt=2et1xe2x
P(t)=2e2tQ(y)=1xe2x

In this case, we have dydt and P(t) instead of P(x) nothing changes, its just a variable letter thats swapped. Also note that P(t) was given the 2 on top, this was arbitrarily chosen and could just as easily been on the Q(y) feel free to put the constants anywhere, all that matters is the variables.

3.

Sometimes you will have to play around with it alot to get it into the separable form, so feel free to manipulate and pull apart/put together the differentials

(x4+8x4y4)dx+ex5y3dy=0
(x4+8x4y4)dx=ex5y3dy
dxdy=ex5y3x4+8x4y4
dxdy=ex5y3x4(1+8y4)dxdy=ex5x4y31+8y4
P(x)=ex5x4Q(y)=y31+8y4

The thing to note here is that when I finished manipulating I went with dxdy instead of dydx this also doesn't matter, and once separated and solved will yield the same results. All we care about is getting the differentials on one side, and splitting the variables into 2 separate functions

4.

One final simple example

dϕdω=ϕ3
P(ω)=1Q(ϕ)=ϕ3

When you only have 1 of the variables in the equation you can just set the other function to 1, we don't need both variables given in the differential to solve using this method


The hard part is recognizing that it is a separable differential equation, and manipulating it into the correct form. Let's take a quick look at solving one of these both with and without a given initial condition.


We find our P(x) and Q(y)

dydx=x4y
P(x)=x4Q(y)=y

Multiply and Divide the equation to get all the y's with dy and all the x's with dx alone then integrate both sides

dyy=x4dxdyy=x4dx

This leaves us with

ln|y|+c=x55+c

one constant eats the other

ln|y|=x55+c

and now lets solve for y

eln|y|=ex55+c
y=ex55ecy=cex55

This is the final answer assuming they don't give us an initial condition and are looking for it in explicit form.

Lets do one with an initial condition

x2dydx=5x2x2(x+1)(y+1);y(1)=4
dydx=5x2x2x2(x+1)(y+1)
P(x)=5x2x2x2(x+1)Q(y)=1y+1

Multiply the equation by dx and divide by Q(y)

y+1dy=5x2x2x2(x+1)dx

Integrate both sides

y22+y+c=5x2x2x2(x+1)dx

partial fractions

y22+y+c=1x2x2+4x+1dx
y22+y+c=ln|x|+2x+4ln(x+1)+c

1 c eats the other and then subtract to solve for c

c=ln|x|+2x+4ln|x+1|y22y

plug in the initial condition of x=1 and y=4 to solve for c

c=ln|1|+21+4ln|1+1|4224
c=0+2+4ln(2)84
c=10+4ln(2)

now we just substitute what we solved for c into the original equation to give us the final answer in explicit form

y22+y10+4ln(2)=ln|x|+2x+4ln|x+1|

--> Linear Equations

Differential Equation Index
Home


  1. If we aren't supposed to treat dydx as a fraction, then why do we type it in LaTeX as \frac{dy}{dx}? Checkmate mathematicians