Professional Documents
Culture Documents
Separation of Variables
Separation of Variables
2 Separation of Variables
Sometimes we must manipulate an equation algebraically before we can integrate both
sides. For example, in the equation
−y 0 3x 2 e y
the right side cannot be integrated, since it involves y but not y 0. However, if we divide
through by e y , we get
−e −y y 0 3x 2 .
This equation can be integrated, yielding
e −y x 3 + C.
f ( y ) y0 g ( x )
for some functions f and g, then we can try to solve it by integrating both sides. This
technique is called separation of variables, since it involves moving all of the y’s to
one side of the equation and all of the x’s to the other side.
Separation of Variables
A differential equation is called separable if it can be put in the form
f ( y ) y0 g ( x ) ,
for some functions f and g. In this case, the solutions are given by
Z Z
f ( y ) dy g ( x ) dx.
EXAMPLE 1
Find the general solution to the differential equation x 2 y y 0 1.
y y 0 x −2 .
Integrating yields
1 2
y −x −1 + C.
2
We must now solve for y. Multiplying through by 2 gives
y 2 −2x −1 + A,
EXAMPLE 2
Solve the following initial value problem:
y 0 cos2 x e 3y , y (0) 0.
SOLUTION To separate the variables, we must divide through by both cos2 x and e 3y . This
gives
e −3y y 0 sec2 x.
Then the solutions are given by
Z Z
−3y
e dy sec2 x dx.
Integrating yields
1 −3y
− e tan x + C.
3
For an initial value problem, it is usually Instead of solving for y, we plug in the initial condition y (0) 0 immediately, which tells us
easiest to solve for C immediately after that C −1/3. Substituting in −1/3 for C and then solving for y yields the final answer:
integrating.
1
y − ln (1 − 3 tan x )
3
Autonomous Equations
One of the most common types of differential equations are those that involve y and y 0
but not x, e.g. differential equations of the form
y0 f ( y ) .
EXAMPLE 3
Find the general solution to the differential equation y 0 y 2 + 1
1
y 0 1.
y2 + 1
Integrating gives
tan−1 y x + C,
so
y tan ( x + C ) .
Dividing by Zero
It is important when separating variables to be careful about dividing by zero. When
you divide through by a function that could be the constant zero function, it is possible
that you will lose one of the solutions to the differential equation.
For example, consider the equation
y 0 3x 2 y 2 .
y −2 y 0 3x 2 .
However, this ignores the possibility that y 2 might be zero, and indeed y 0 is a
solution to the given equation. If we proceed with the separation of variables, we get
Z Z
y −2 dy 3x 2 dx
so
−y −1 x 3 + C,
and solving for y gives
1
y −.
Note that missing solutions only occur
+C x3
when we divide through by an Note that y 0 does not correspond to any value for C, so it is a missing solution,
expression involving y. Dividing by a
which we lost when we divided through by y 2 . The general solution to this differential
function of x does not result in missing
solutions, since we know we are not equation consists of the formula above together with the missing solution y 0.
dividing by the zero function.
EXAMPLE 4
Find the general solution to the differential equation y y 0 e −2x y 2 − 1 2 .
However, this ignores the possibility that y 2 − 1 2 0. This occurs if y 1 or y −1, and
these are both solutions to the original differential equation. The remaining solutions are
given by Z Z
y
dy e −2x dx.
y2 − 1 2
1 2 1
y − 1 −1 − e −2x + C,
−
2 2
and solving for y yields
r
1
y ± 1 + −2x ,
e +A
where A −2C. So the general solution is this together with the missing solutions y −1
and y 1.
SEPARATION OF VARIABLES 4
There is a nice way of viewing separation of variables using differentials, which looks a little
bit different from our method. Given an equation like
−y 0 3x 2 e y ,
we can write it as
dy
− 3x 2 e y ,
dx
To separate variables, we now divide through by e y and multiply through by dx:
−e −y dy 3x 2 dx.
Really the differentials dx and dy Here, the dx and dy by themselves are differentials, which represent small changes in the values
represent infinitesimal changes in the of x and y as we travel along a solution curve. We can integrate both sides of this equation to
values of x and y. Infinitesimals are not get the solution:
often used in mathematics, since they are Z Z
not part of the real number system, but −e −y dy 3x 2 dx.
reasoning using infinitesimals is common
in the sciences. This method is presented in many textbooks, and you should feel free to use it if you prefer it.
It always yields the same results as our reverse implicit differentiation method.
EXERCISES
1–6 Use separation of variables to find the general solution to the given equation.
Make sure to note any missing solutions.
1. e −2x y 0 2y 2 2. y 0 e y ln x
3. y 0 3y 2/3 4. y 0 ( y − 2) 2
5. y 0 e x+y 6. y 0 − x y 2 x
π
7. e x y 0 x y 2 , y (0) −1 8. y 0 2x sec y, y (0)
6