If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Separable equations example (old)

An old worked example video of solving separable equations. Created by Sal Khan.

## Want to join the conversation?

• At - Why the absolute value of y in ln is necessary ? •   That is an interesting question. In this particular case, the absolute value is not really necessary (Sal explains why from to ). However, in general, when you integrate the function 1/x, it is a good idea to use the absolute value in the result, hence ln|x|.

Think about it: the original function 1/x has what domain? It is all real numbers except 0. So if you were to say, the antiderivative of 1/x is ln(x) (no absolute value), you're walking into a function that has a more restricted domain (ln is defined only for positive numbers).

So, by saying that the antiderivative of 1/x is ln|x| (with absolute value), you end up with two functions that share the same domain (you can calculate ln|x| for negative numbers as well).

You might now ask yourself, is 1/x really the derivative of ln|x| (with the absolute value)? Well, the answer is yes, and you can verify this for yourself. One way is to separate the problem in two: evaluate the derivative of ln(x) for x>0. Then evaluate the derivative of ln(-x) for x<0.

If you don't know how to evaluate those derivatives, see Sal's excellent video called "Proof: d/dx(ln x) = 1/x", from the Calculus playlist. Have fun!
• How do I know whether a differential equation is separable? • DEFINITION: A differential equation is separable if it is of the form y'=f(x,y) in which f(x,y) splits into a product of two factors, one depending on x alone and the other depending of y alone. Thus each separable equation can be expressed in the form y'=Q(x)R(y), where Q and R are given functions. When R(y)<>0 we can divide by R(y) and rewrite this in the form A(y)y'=Q(x) where A(y)=1/R(y). Thus A(y)dy = Q(x)dx can be implicitly integrated to hopefully solve the equation. Note that this method is presented here to solve "first-order" ordinary differential equations. A more complex treatment is probably needed to solve higher order equations. Just for example try to imagine how to solve a "2nd-order" separable ordinary differential equation of the form y"=f(x,y) after the separation this equation looks like A(y)y" = Q(x). Which "hopefully" can be solved using double integrals.

SPECIAL CASE #1: Homogeneous first-order equations that are not separable can be converted to separable first-order equations with variable substitution. Let me explain how it works. A special kind of first-order equations of the form y'=f(x,y) in which the right-hand side has the property that f(tx,ty)=f(x,y) for all x, y, and all t<>0 are called homogeneous. In other words, replacement of x by tx and y by ty has no effect on the value of f(x,y). If we substitute t by t=1/x, the initial equation becomes y'=f(1,y/x). The appareance of the quotient y/x on the right suggests that we introduce a new unknown function v where v=y/x. Then y=vx, and so y'=xv'+v and this substitution transforms y'=f(1,y/x) into xv'+v = f(1,v) or x(dv/dx) = f(1,v)-v. This last equation is a first-order separable equation for v and so solvable by the separate method too.
Example: y'=(y-x)/(y+x)
Solution: We rewrite the equation as y'=(y/x-1)/(y/x+1) then we substitute v=y/x to transform this into x(dv/dx) = [(v-1)/(v+1)]-v = -(1+v^2)/(v+1), or (v+1)/(1+v^2)dv = -(1/x)dx. now we can integrate both sides of the equation to obtain a solution on terms of v and x. Lastly, we replace v by y/x to obtain the solution in terms of x and y.

SPECIAL CASE #2: A first-order differential equation of the form y'=f(ax+by+c) where b<>0, can always be reduced to a separable first-order equation by means of the substitution v=ax+by+c.
Example: y'=1/(x+y+1)
Solution: If we let v=x+y+1, then dv/dx=1+dy/dx, so the differential equation is transformed into (dv/dx)-1=1/v or dv/dx=(1+v)/v, so [v/(1+v)]dv = dx which is integrable in both sides. Finally, we replace v by x+y+1 to obtain the solution in terms of x and y.
• What if you had a differential equation where you couldn't immediately separate them by division? What happens if you have an equation like dy/dx = y-10? Do you multiply by a conjugate?? Please help.... • Why is the integral of cos(x) not -sin(x) at ? • I enjoyed this video but I'm running into a problem solving a seperable differential equation.

It's this one:
dy/dx = 2x + 1. The problem i run into is that you can't get a proper seperation for dy and y's on the left side, and dx and x's on the right side. How do I go about solving this?
(1 vote) • what is the derivative of tan^3(x)?
(1 vote) • how does one go about integrating both sides in an equation like this:
xdy-ydx=0
integral(x/dx)=integral(y/dy)
where the dx and dy's are in the denominator? • What is the solution of the differential equation dy/dx+y/x=yx
(1 vote) • how to solve dy/dx=sin square y
(1 vote) • As following:
Step 1 : separate dy with independent y variable and the same method with dx.
`1/ sin²(y) dy = dx`
Step 2: integrate the both sides
` ∫ 1/ sin²(y) dy = ∫ dx `
you could write it as ` ∫ csc²y dy = ∫ dx `
Step 3: the home stretch
-cot(y) = x+C or - cos(y)/sin(y) = x or ` y = arccot(-x+C)`
`C= -cot(y)-x` input your initial condition there.
If you want to know how intgrating csc²(y) is equal to -cot(y), try to derive `y=cot(x)`
cot is 1/tan where tan = sin/cos, thus, cot= cos/sin.
• Can anyone give an example of taking an equation and through implicit differentiation get a differential equation? I just can't visualize what master Khan is talking about when he says that a separable differential equation was implicitly derived.
(1 vote) • Here is a super simple example.
x+y=5 -> d(x)/dx + d(y)/dx=d(5)/dx
1+dy/dx=0 You may be inclined to think dy/dx=0, but it's not because y is a function of x
dy/dx=-1. There you go. Differential equation!
How about a more complex example.
x^2-y^2=sinx
2x-2y*dy/dx=cosx remember, we do chain rule on d/dx (y^2)
dy/dx=(cosx-2x)/-2y=(2x-cosx)/2y. Another differential equation. This one looks more complicated, but it is still straightforward to solve as a separable diffyq.