# Thread: how to determine separable & linear?

1. ## how to determine separable & linear?

for separable, is it something that u can put all x to one side, and all y to another side ,then integrat both side?

what about linear?
and sometime it could be both linear and separable

they keep confusing me...

here i got a few examples, can someone explain?

(1+x^2)dy/dx = 1 -2xy

(1+x^2)dy/dx = y - 2xy

x/2 dy/dx = x^2 -y

dy/dx = [(2x)(sqrt y)]/sqrt(1+x^2)

thank you

2. The way I distinct them is by trying to get them into the two basic forms for separable and linear differential equations; that is

$y' +f(x)y = g(x)$ for linear and
$f(y)y' = g(x)x'$ for separable

For instance, in your examples;

The first,
$(1+x^2)\frac{dy}{dx} = 1 -2xy$ [(1) say]
can be rewritten as
$\frac{dy}{dx} +\frac{2x}{1+x^2}y = \frac{1}{1+x^2}$ (assuming 1+x^2 can never be zero, in other words, no complex roots)
thus is of form
$y' + f(x)y = g(x)$
where
$f(x)=\frac{2x}{1+x^2}$ and
$g(x)=\frac{1}{1+x^2}$
and so example (1) can be considered a linear differential equation.

The second,
$(1+x^2)\frac{dy}{dx} = y - 2xy$ [(2) say]
is much like (1) but, by writing y - 2xy as y(1-2x) you have a product of x terms and y terms (this is often - not always - a *hint* that the problem has a separable solution)
So, lets consider than the problem is separable, then the form should be like
$f(y)y' = g(x)x'$
that is
$(1+x^2)\frac{dy}{dx} = y(1 - 2x)$
which then (by dividing by y and (1+x^2) - now watch since you're dividing by y there may be a singular solution at y=0 (or the general solution may include it) ) gives
$\frac{1}{y}\frac{dy}{dx} = \frac{1 - 2x}{1+x^2}$
then taking the integral of both sides with respect to x (you can think of this as multiplying each side by 'dx' and putting an integral sign on the front if its easier to remember - often it is) you get
$\int\!\frac{1}{y}\,dy = \int\!\frac{1 - 2x}{1+x^2}\,dx$
thus (2) can be considered a separable differential equation.

Your third,
$\frac{x}{2} \frac{dy}{dx} = x^2 -y$ [3]
looks like it'd be a separable (mainly because of that x/2 factor) however quickly thinking over it would give a y/x term which could add more work than the alternative - which would be to rewrite this in linear form)
Now [3] can be written as
$\frac{x}{2} \frac{dy}{dx} +y = x^2$ (taking y to the other side) and then,
$\frac{dy}{dx} +\frac{2}{x}y = \frac{2}{x}(x^2)$ (dividing by x/2, in other words multiplying by 2/x and not letting x be 0)
Now the above is in the general form for a linear differential equation where our f(x) and g(x) are
$f(x)=\frac{2}{x}$ and
$g(x)=\frac{2}{x}x^2$
thus [3] can be solved as a linear differential equation

Finally [4],
$\frac{dy}{dx} = \frac{2x\sqrt{y}}{\sqrt{1+x^2}}$
well, right away (if you can notice that the entire right hand side is a product of x and y terms and the left hand side has only y' ) theres a great this differential equation is separable. So, take sqrt(y) over to the left to get (meaning there could (and likely is) a singular solution at y = 0 not in the general solution)
$\frac{1}{\sqrt{y}}\frac{dy}{dx} = \frac{2x}{\sqrt{1+x^2}}$
then integrating with respect to x on both sides gives
$\int\!\frac{1}{\sqrt{y}}\,dy = \int\!\frac{2x}{\sqrt{1+x^2}}\,dx$
and so [4] can be solved by separating out the x-terms and y-terms.

Generally, in practice, with a lot of math, the best method tends to come from thinking about the problem because more often than not you'll get a differential equation that isn't in standard form and you'll need to look for the best method to use. Sometimes - though unwise - it's still a good idea to plough through the equation assuming it can be linear (for example) and you hit a dead end or a really hard equation in which case, turn back and assume it is separable - and hopefully you'll find a nicer looking expression to solve.

I hope some ideas of how make quicker deductions about an equation being separable or linear came from the above.

Edit:
Also, I though I might mention that there are occasions that even if you do get a nice looking, say separable, equation at the end - it may be impossible to solve in which case, the solution might lay with the linear equation - even if it looks incredibly 'horrible' and difficult to solve compared to the separable one at first.

3. thx for your PERFECT reply :P

just one more question, for the second equation (1+x^2)dy/dx = y - 2xy, the answer in my book says that its both linear and separable, what does it mean?

4. [tex](1 + x^2)\frac{dy}{dx} = y - 2xy

If you rearrange it like this:

$(1 + x^2)\frac{dy}{dx} = y(1 - 2x)$

$\frac{1}{y}\frac{dy}{dx} = \frac{1 - 2x}{1 + x^2}$

You can see it is a separable DE (though the integral on the RHS will be difficult...)

If you rearrange it like this:

$(1 + x^2)\frac{dy}{dx} = (1 - 2x)y$

$(1 + x^2)\frac{dy}{dx} + (2x - 1)y = 0$

$\frac{dy}{dx} + \frac{2x - 1}{1 + x^2}y = 0$

You can see that it is a first-order linear DE (though finding the integrating factor will be difficult...)

So this DE is BOTH separable AND first order linear.