2 Applying the method of separation of variables to ODEs

Example 3

Use the method of separation of variables to solve the differential equation

d y d x = 3 x 2 y

Solution

The equation already has the form

d y d x = f ( x ) g ( y )

where

f ( x ) = 3 x 2 and g ( y ) = 1 y .

Dividing both sides by g ( y ) we find

y d y d x = 3 x 2

Integrating both sides with respect to x gives

y d y d x d x = 3 x 2 d x

that is

y d y = 3 x 2 d x

Note that the left-hand side is an integral involving just y ; the right-hand side is an integral involving just x . After integrating both sides with respect to the stated variables we find

1 2 y 2 = x 3 + c

where c is a constant of integration. (You might think that there would be a constant on the left-hand side too. You are quite right but the two constants can be combined into a single constant and so we need only write one.)

We now have a relationship between y and x as required. Often it is sufficient to leave your answer in this form but you may also be required to obtain an explicit relation for y in terms of x . In this particular case

y 2 = 2 x 3 + 2 c

so that

y = ± 2 x 3 + 2 c

Task!

Use the method of separation of variables to solve the differential equation

d y d x = cos x sin 2 y

First separate the variables so that terms involving y and d y d x appear on the left, and terms involving x appear on the right:

You should have obtained

sin 2 y d y d x = cos x

Now reformulate both sides as integrals:

sin 2 y d y d x d x = cos x d x that is sin 2 y d y = cos x d x

Now integrate both sides:

1 2 cos 2 y = sin x + c

Finally, rearrange to obtain an expression for y in terms of x :

y = 1 2 cos 1 ( D 2 sin x )  where  D = 2 c

Exercises
  1. Solve the equation

    d y d x = e x y .

  2. Solve the following equation subject to the condition y ( 0 ) = 1 :

    d y d x = 3 x 2 e y

  3. Find the general solution of the following equations:
    1. d y d x = 3 ,
    2. d y d x = 6 sin x y
    1. Find the general solution of the equation

      d x d t = t ( x 2 ) .

    2. Find the particular solution which satisfies the condition x ( 0 ) = 5 .
  4. Some equations which do not appear to be separable can be made so by means of a suitable

    substitution. By means of the substitution z = y x solve the equation

    d y d x = y 2 x 2 + y x + 1

  5. The equation

    i R + L d i d t = E

    where R , L and E are constants arises in electrical circuit theory. This equation can be

    solved by separation of variables. Find the solution which satisfies the condition i ( 0 ) = 0 .

  1. y = ± D 2 e x .
  2. y = ln ( x 3 + e ) .
    1. y = 3 x + C ,
    2. 1 2 y 2 = C 6 cos x .
    1. x = 2 + A e t 2 2 ,
    2. x = 2 + 3 e t 2 2 .
  3. z = tan ( ln D x )   so that   y = x tan ( ln D x ) .
  4. i = E R ( 1 e t τ ) where τ = L R .