2 The general solution of a differential equation

Consider the equation y = A e 2 x where A is an arbitrary constant. If we differentiate it we obtain

d y d x = 2 A e 2 x

and so, since y = A e 2 x we obtain

d y d x = 2 y .

Thus a differential equation satisfied by y is

d y d x = 2 y .

Note that we have eliminated the arbitrary constant.

Now consider the equation

y = A cos 3 x + B sin 3 x

where A and B are arbitrary constants. Differentiating, we obtain

d y d x = 3 A sin 3 x + 3 B cos 3 x .

Differentiating a second time gives

d 2 y d x 2 = 9 A cos 3 x 9 B sin 3 x .

The right-hand side is simply ( 9 ) times the expression for y . Hence y satisfies the differential equation

d 2 y d x 2 = 9 y .

Task!

Find a differential equation satisfied by y = A cosh 2 x + B sinh 2 x where A and B are arbitrary constants.

Differentiating once we obtain    d y d x = 2 A sinh 2 x + 2 B cosh 2 x

Differentiating a second time we obtain    d 2 y d x 2 = 4 A cosh 2 x + 4 B sinh 2 x

Hence   d 2 y d x 2 = 4 y

We have seen that an expression including one arbitrary constant required one differentiation to obtain a differential equation which eliminated the arbitrary constant. Where two constants were present, two differentiations were required. Is the converse true? For example, would a differential equation involving d y d x as the only derivative have a general solution with one arbitrary constant and would a differential equation which had d 2 y d x 2 as the highest derivative produce a general solution with two arbitrary constants? The answer is, usually, yes.

Task!

Integrate twice the differential equation

d 2 y d x 2 = w 2 ( x x 2 ) ,

where w and are constants, to find a general solution for y .

Integrating once: d y d x = w 2 x 2 2 x 3 3 + A where A is an arbitrary constant (of integration).

Integrating again: y = w 2 x 3 6 x 4 12 + A x + B where B is a second arbitrary constant.

Consider the simple differential equation

d y d x = 2 x .

On integrating, we obtain the general solution

y = x 2 + C

where C is an arbitrary constant. As C varies we get different solutions, each of which belongs to the family of solutions. Figure 2 shows some examples.

Figure 2

A graph displaying several downward-opening parabolas, each representing a different value of the constant \(C\) in the equation \(y = x^2 + C\).

Long description

It can be shown that no two members of this family of graphs ever meet and that through each point in the x - y plane passes one, and only one, of these graphs. Hence if we specify the boundary condition y = 2 when x = 0 , written y ( 0 ) = 2 , then using y = x 2 + c :

2 = 0 + C so that C = 2

and y = x 2 + 2 is the unique solution.

Task!

Find the unique solution of the differential equation d y d x = 3 x 2 which satisfies the condition y ( 1 ) = 4 .

You should obtain y = x 3 + 3 since, by a single integration we have y = x 3 + C , where C is an arbitrary constant. Now when x = 1 , y = 4 so that 4 = 1 + C . Hence C = 3 and the unique solution is y = x 3 + 3.

Example 1

Solve the differential equation d 2 y d x 2 = 6 x subject to the conditions

  1. y ( 0 ) = 2 and y ( 1 ) = 3
  2. y ( 0 ) = 2 and y ( 1 ) = 5
  3. y ( 0 ) = 2 and d y d x = 1 at x = 0 .
Solution
  1. Integrating the differential equation once produces  d y d x = 3 x 2 + A .  The general solution is found by integrating a second time to give  y = x 3 + A x + B , where A and B are arbitrary constants.

    Imposing the conditions y ( 0 ) = 2 and y ( 1 ) = 3 : at x = 0 we have y = 2 = 0 + 0 + B = B so that B = 2 , and at x = 1 we have y = 3 = 1 + A + B = 1 + A + 2 . Therefore A = 0 and the solution is

    y = x 3 + 2.

  2. Here the second condition is y ( 1 ) = 5 so at x = 1

    y = 5 = 1 + A + 2 so that A = 2

    and the solution in this case is

    y = x 3 + 2 x + 2.

  3. Here the second condition is

    d y d x = 1 at x = 0 i.e. y ( 0 ) = 1

    then since d y d x = 3 x 2 + A , putting x = 0 we get:

    d y d x = 1 = 0 + A

    so that A = 1 and the solution in this case is y = x 3 + x + 2 .