You are on page 1of 39

A Guide to Ordinary Differential Equations

(first and second order)

dy
f (x) + g(y) dx = 0;

dy
dx = f ( xy ), and others

d2 y d2 y dy
dx2
= f (x); a dx2
+b dx + cy = 0, among others.

by

kirk r. morgan

2010

Department of Mathematics

Faculty of Pure and Applied Sciences

The University of the West Indies

Mona Campus
Preface

This guide, first and second order Ordinary Differential equations, is to assist

second and third year students with any courses that involve forms of differential

equations. Furthermore, students who are taking Partial Differential equations can

also benefit from this book.

The material used was taken from my notes for Advanced level Mathematics and

several questions were drafted by me.

After each subtopic, examples are used to illustrate the concept of the application.

Each section also includes an exercise set for your practice with solutions. Please

note that the solution number will not, however, correspond to the example number.

Ignore this, as the solution is immediately below the example.

Students should recognize that once you have done one of the questions, it is as if

you have done them all.

It is my intention that after using this book, you will grow five feet taller in

knowledge.

I must express thanks to my brothers Daniel and Samuel and also to my colleagues

Sam and Peter for inspiring me to prepare this workbook for UWI students.

God bless you all!

i
Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i

0.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

0.1.1 Formation of differential equations . . . . . . . . . . . . . . . 1

0.2 First Order differential equations . . . . . . . . . . . . . . . . . . . . 2

0.2.1 Differential equations of the first order and first degree . . . . 2

0.2.2 Variable separable . . . . . . . . . . . . . . . . . . . . . . . . 3

0.2.3 Homogeneous . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

0.2.4 Linear equations . . . . . . . . . . . . . . . . . . . . . . . . . 6

0.3 Second Order differential equations . . . . . . . . . . . . . . . . . . . 11

0.3.1 Differential equations of the second order . . . . . . . . . . . . 11


d2 y
0.3.2 Equations of the form dx2
= f (x) . . . . . . . . . . . . . . . . 11
d2 y
0.3.3 Equations of the form dx2
= f (y) . . . . . . . . . . . . . . . . 14

0.3.4 Linear Equations with constants coefficients . . . . . . . . . . 16

0.3.5 Case 1 - Roots of auxiliary equation real and different . . . . . 16

0.3.6 Case 2 - Roots of auxiliary equation real and equal . . . . . . 18

0.3.7 Case 3 - Roots of auxiliary equation imaginary . . . . . . . . . 19


2
0.3.8 Linear equations with constant coefficients of the form a ddxy2 + b dy
dx
+ cy = f (x) 20

0.3.9 Determination of particular integrals - Case (i) [f (x) =

a polynomial of degree n ] . . . . . . . . . . . . . . . . . . . . 22

0.3.10 Case (ii) - f (x) = kemx where k and m are constants . . . . . 24

ii
0.3.11 Case (iii) - f (x) = k cos rx or k sin rx where k and r are

constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

0.3.12 Case (iv) - f (x) = the sum or difference of functions of the

types already discussed . . . . . . . . . . . . . . . . . . . . . . 29

Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

iii
Chapter 0, Section 1 Introduction

0.1 Introduction

0.1.1 Formation of differential equations

A differential equation is a relationship between an independent variable x, a de-

pendent variable y and one or more of the derivatives of y with respect to

dy d2 y
x, , ,
dx dx2

etc.

For example,
dy d2 y
x − y 2 = 0; xy 2 − y 2 sin x = 0
dx dx

are differential equations.

Before considering methods of solution of the simplest types of differential equa-

tion, it is of importance to see how a differential equation is formed. We will find

that a differential equation of the first order (i.e. an equation in which the high-
dy
est derivative appearing is the first, ) always results from the elimination of an
dx
arbitrary constant A from an equation containing x, y and A.

For example, the equation

y = x + A,

leads to the differential equation


dy
= 1.
dx

More generally, a differential equation of the second order (i.e. an equation in


d2 y
which the highest derivative is ) will always be obtained by the elimination of
dx2
two arbitrary constants A, B from an equation containing x, y, A, B, and so on for

higher order differential equations.

1
Chapter 0, Section 2 Introduction

For example, if

y = A sin x + B cos x,

dy
= A cos x − B sin x,
dx
d2 y
= −A sin x − B cos x = −y.
dx2

Hence, if
d2 y
y = A sin x + B cos x, + y = 0.
dx2

y = A sin x + B cos x,

where A and B are any constants, is called the complete primitive or general solution

of the differential equation.

0.2 First Order differential equations

0.2.1 Differential equations of the first order and first degree

The complete primitive or general solution of an equation of the first order will

contain one arbitrary constant.

Standard types of the first order equations:

(i) Variable separable;

(ii) Homogeneous equations;

(iii) Linear equations.

2
Chapter 0, Section 2 Introduction

0.2.2 Variable separable

The standard forms of such equations will be of the form

dy
f (x) + g(y) = 0,
dx

and
dy
f (x) + g(y) = 0.
dx

Example 0.2.1.

Solve the equation


dy x2
=
dx y

Solution 0.2.2.

Separating the variables and integrating, we have

dy
y = x2
dx

So,
∫ ∫
y dy = x2 dx

Therefore,
y2 x3 2
= + c ⇒ y 2 = x3 + c.
2 3 3

School is over!

Exercise 0.2.3.

Solve the following equations:

3
Chapter 0, Section 2 Introduction

(i) (x2 + 1)dx = dy

dy
(ii) cos2 x = cos2 y
dx
dy
(iii) ex+y =1
dx
x2 − 1 dy
(iv) = xy
y−1 dx

0.2.3 Homogeneous

A homogeneous equation of the first order is one which can be written in the form

dy (y)
=f .
dx x

To test whether a function of x and y can be written in the form

(y)
f ,
x

substitute y = vx and the function should reduce to one of v only.

To solve a homogeneous equation we use the substitution y = vx, giving

dy dv
=v+x
dx dx

(that is, applying the product rule).

The resulting equation in v and x can be solved by separating the variables.

Example 0.2.4.

Solve the equation


dy x+y
=
dx x

4
Chapter 0, Section 2 Introduction

Solution 0.2.5.

Let y = vx to give:

dy x + vx x(1 + v)
= = = 1 + v.
dx x x

So,
dv
v+x = 1 + v;
dx

that is,
dv dv
x =1+v−v ⇒x = 1.
dx dx

Therefore, separating the variables, we have:

1
dx = dv.
x

Integrating, we obtain
∫ ∫
1
dx = dv.
x

So, we get

ln x = v + c;

that is,

ln x = v + ln A,

where

c = ln A.

Therefore,
x
v = ln x − ln A = ln .
A

But,
y
v= .
x
5
Chapter 0, Section 2 Introduction

So,
y x
= ln .
x A

Therefore,
y x
ex = .
A

School is over!

Exercise 0.2.6.

Solve the following differential equations:

dy x − 2y
(i) =
dx x
dy x2 + y 2
(ii) =
dx x2
dy √
(iii) x = y + x2 − y 2
dx

0.2.4 Linear equations

An equation of the form


dy
+ P y = Q,
dx

where P and Q are functions of x, but not of y, is said to be linear of the first order.

They are solved by multiplying throughout by the function


P dx
e ,

known as the integrating factor.

This gives:
∫ dy ∫ ∫
P dx
e + P ye P dx = Qe P dx .
dx

6
Chapter 0, Section 2 Introduction

But, the left hand side is an exact differential coefficient being equal to

d ( ∫ P dx )
ye .
dx

Therefore,
d ( ∫ P dx ) ∫
ye = Qe P dx .
dx

Hence,

∫ ∫
P dx P dx
ye = Qe dx + c.

Example 0.2.7.

Solve the equation


dy
− y = x.
dx

Solution 0.2.8.

Now, we have that

P = −1, Q = x.

Now, multiplying throughout by


−dx
e = e−x

(integrating factor), we get

dy
e−x − y e−x = x e−x .
dx

So,
dy
(y e−x ) = x e−x .
dx

Integrating, we have:

−x
ye = x e−x dx.

7
Chapter 0, Section 2 Introduction

Now, integrating the right hand side by parts, we let

u=x

and

dv = e−x dx.

So,

du = 1dx

and

v = −e−x .

So, we have:

∫ ∫
−x −x −x −x
ye = −x e − −e dx = −x e + e−x dx = −x e−x − e−x + c.

Therefore,
−x e−x − e−x + c
y= = −x − 1 + cex .
e−x

Therefore,

y = cex − x − 1.

School is over!

Example 0.2.9.

A particle falls freely from rest under gravity in a resisting medium, the resistance

varying as the velocity. Find the velocity after it has fallen for t seconds. At time

t after the start, let the velocity be v. The forces acting on the particle are mg

8
Chapter 0, Section 2 Introduction

downwards and the resistance kmv upwards (the resistance per unit mass being

taken as kv where k is a fixed constant ).

Solution 0.2.10.

The acceleration of the particle,

dv
= g − kv.
dt

That is,
dv
+ kv = g,
dt

a linear equation. Multiply by



k dt
e = ekt .

Therefore,

kt g kt
ve = gekt dt + c = e + c.
k

That is,
g
v= + c e−kt ,
k

where c is an arbitrary constant.

But as the particle starts at rest, v = 0 when t = 0.

Therefore,
g −g
0= + c; c = .
k k

Therefore,
g( )
v= 1 − e−kt .
k

As

e−kt → 0

9
Chapter 0, Section 2 Introduction

as

t → ∞,

the velocity approaches a fixed or terminal value

g
,
k

as t increases.

School is over!

Exercise 0.2.11.

Solve the following differential equations:

1.

dy y 1
(i) + =
dx x x
dy
(ii) x − y = x2
dx
dy
(iii) + 3y = e2x
dx
dy π
2. If + 2y tan x = sin x and y = 0 when x = ,
dx 3
find y in terms of x.

10
Chapter 0, Section 3 Introduction

0.3 Second Order differential equations

0.3.1 Differential equations of the second order

The following types of equation will be considered:

d2 y
(i) = f (x);
dx2
d2 y
(ii) = f (y);
dx2
d2 y dy
(iii) a 2
+b + cy = 0 or f (x), where a, b, c are constants and f (x) is some
dx dx
simple function of x.

d2 y
0.3.2 Equations of the form dx2 = f (x)

Such equations are immediately solved by integrating twice with respect to x.

Example 0.3.1.

Solve the following equation


d2 y
= 3x2 .
dx2

Solution 0.3.2.

Integrating the first time, we have:


∫ ∫
d2 y
= 3x2 dx,
dx2

that is,
dy
= x3 + A,
dx

where A is an arbitrary constant. Integrating the second time, we have:


∫ ∫
dy
= (x3 + A) dx,
dx

11
Chapter 0, Section 3 Introduction

so we obtain
x4
y= + Ax + B,
4

where B is an arbitrary constant.

Example 0.3.3.

Solve the equation


d2 y
B − w(l − x) = 0,
dx2

subject to the conditions that

y=0

and
dy
=0
dx

when x = 0; B, w, and l being given constants.

Solution 0.3.4.

Now, we have
d2 y
B = w(l − x).
dx2

Integrating, we have
dy wx2
B = wlx − + c.
dx 2

But
dy
=0
dx

when

x = 0,

12
Chapter 0, Section 3 Introduction

hence,

c = 0.

Therefore,
dy wx2
B = wlx − .
dx 2

Integrating, we have
wlx2 wx3
By = − + D.
2 6

But y = 0 when x = 0, hence D = 0.

Therefore,
wx2
y= (3l − x).
6B

School is over!

Exercise 0.3.5.

Solve the following equations:

d2 y
(i) x2 =1
dx2
d2 y
(ii) 2
cos2 x = 1
dx
d2 y
(iii) = −g(a constant)
dx2
d2 y
(iv) = f sin nt
dx2

13
Chapter 0, Section 3 Introduction

d2 y
0.3.3 Equations of the form dx2 = f (y)

The first integration is obtained by multiplying both sides of the equation by

dy
2 ,
dx

giving
dy d2 y dy
2 = 2f (y) .
dx dx2 dx

But
( )2
dy d2 y d dy
2 2
= ,
dx dx dx dx

so, integrating both sides with respect to x, we get


( )2 ∫ ∫
dy dy
= 2f (y) dx + c = 2 f (y) dy + c.
dx dx

When this integration is performed, the second integration is accomplished by sep-

arating the variables.

Example 0.3.6. Find the general solution of the equation

d2 y 1
= .
dx2 y3

Solution 0.3.7. Multiplying both sides of the equation by

dy
2
dx

and integrate with respect to x we have:


( )2 ∫
dy 2 1
= dy = − + A.
dx y3 y2

Therefore,

dy Ay 2 − 1
=+ .
dx y

14
Chapter 0, Section 3 Introduction

That is,
y
√ = ± dx.
Ay 2 − 1

Integrating, we have
1√ 2
Ay − 1 = ± x + B;
A

that is,

Ay 2 − 1 = A2 (B ± x)2 ,

where A, B are arbitrary constants.

School is over!

Exercise 0.3.8.

Solve the following equations:

1.

d2 y dy dy
(i) 2
=2 ( let = p)
dx dx dx
d2 v 1 dv
(ii) + =0
dr2 r dr
d2 y dy √
(iii) = y 3
− y, giving that = 0 when y = 1 and y = 2 when x = 2.
dx2 dx

2. The general equation of motion of a particle describing an orbit under a force of


d2 u P
attraction P towards the origin is 2
+ u = 2 2 , where h is a given constant and
dθ hu
u is the reciprocal of the distance of the particle from the origin.

Solve the equation in the case where P = µu2 .

15
Chapter 0, Section 3 Introduction

0.3.4 Linear Equations with constants coefficients

The general form is given by

d2 y dy
a 2
+b + cy = 0,
dx dx

where a, b, c are constants.

This equation has a solution

y = emx

if

am2 + bm + c = 0 (0.3.1)

There are three cases to consider according as the roots of (0.3.1) are real and

different, real and equal or imaginary. The equation (0.3.1) is usually called the

auxiliary equation.

0.3.5 Case 1 - Roots of auxiliary equation real and different

Let the roots be

m = m1 , m 2 .

Then

y = em1 x , y = em2 x

are solutions of the differential equation and the general solution will be

y = Aem1 x + Bem2 x ,

where A and B are arbitrary constants.

16
Chapter 0, Section 3 Introduction

Example 0.3.9. Find the general solution of the equation

d2 y dy
2 2
+5 + 2y = 0.
dx dx

Solution 0.3.10. The auxiliary equation is

2m2 + 5m + 2 = 0.

So, we have

(2m + 1) (m + 2) = 0;

that is,
1
m = − , −2.
2

Therefore, the general solution is


x

y = A e 2 + B e−2x .

School is over!

Exercise 0.3.11.

Find the general solution of the equations given below:

d2 y
(i) − 4y = 0
dx2
d2 y dy
(ii) 2
− − 2y = 0
dx dx
d2 y dy
(iii) 3 + 2 −y =0
dx2 dx
d2 y dy
(iv) 3 2
−4 +y =0
dx dx

17
Chapter 0, Section 3 Introduction

0.3.6 Case 2 - Roots of auxiliary equation real and equal

Let the roots of the auxiliary equation be

m = m1 , m 1 .

In this case it can be shown that the general solution is

y = A x em1 x + Bem1 x = em1 x (A x + B),

where A and B are arbitrary constants.

Example 0.3.12. Solve the equation

d2 y dy
2
−4 + 4y = 0.
dx dx

Solution 0.3.13. The auxiliary equation is

m2 − 4m + 4 = 0.

So, we have

(m − 2) (m − 2) = 0;

that is,

m = 2, 2.

Therefore, the general solution is

y = e2x (Ax + B).

School is over!

18
Chapter 0, Section 3 Introduction

Exercise 0.3.14.

Find the general solution of the equations given below:

d2 y dy
(i) 2
− 2y +y =0
dx dx
d2 y dy
(ii) 4 2 + 4 +y =0
dx dx
d2 y dy
(iii) a2 2
− 2a +y =0
dx dx

0.3.7 Case 3 - Roots of auxiliary equation imaginary

The roots of the auxiliary equation will be of the form,

m = p ± iq,


where i is the complex number −1 and p and q are real numbers.

In this case, the general solution of the differential equation can be shown to be

y = epx (A cos qx + B sin qx),

where A and B are arbitrary constants.

Example 0.3.15. Solve the equation

d2 y dy
− 2 + 4y = 0.
dx2 dx

Solution 0.3.16. The auxiliary equation is given by

m2 − 2m + 4 = 0.

So, we have, using the quadratic formula:


2± −12 √
m= = 1 ± i 3.
2
19
Chapter 0, Section 3 Introduction

So, the general solution is

√ √
y = ex (A cos 3x + B sin 3x).

School is over!

Exercise 0.3.17.

Find the general solution of the equations given below:

d2 y
(i) + 9y = 0
dx2
d2 y
(ii) = −y
dx2
d2 y dy
(iii) 2
+ +y =0
dx dx
d2 y
(iv) + m2 y = 0
dx2

0.3.8 Linear equations with constant coefficients of the form


2
a ddxy2 + b dy
dx + cy = f (x)

Linear equations with constant coefficients of the form

d2 y dy
a 2
+b + cy = f (x),
dx dx

where a, b and c are constants and f (x) is a simple function of x, has various de-

compositions.

Suppose that

y = u(x)

is the general solution of this equation when f (x) is replaced by 0 and that

y = v(x)

20
Chapter 0, Section 3 Introduction

is any particular solution of the given equation obtained, for example, by inspection.

Then it can readily be proved by substitution that

y = u(x) + v(x)

is also a solution of the given equation.

Moreover, as

y = u(x),

is the general solution of a second order differential equation, the function u(x) will

contain two arbitrary constants. Consequently, the solution

y = u(x) + v(x)

of the given equation will contain two arbitrary constants and hence it will be the

general solution.

It follows that the general solution of the equation

d2 y dy
a + b + cy = f (x)
dx2 dx

is made up of the sum of two parts, one being the general solution of the allied

equation
d2 y dy
a 2
+b + cy = 0,
dx dx

usually called the complementary function, and the other being any particular so-

lution of the given equation, usually called the particular integral.

The method used for the determination of the complementary function has already

been discussed and the method of determining particular integrals in a few simple

special cases will now be illustrated.

21
Chapter 0, Section 3 Introduction

0.3.9 Determination of particular integrals - Case (i)

[f (x) = a polynomial of degree n ]

A particular integral can be found by substituting

y = a0 xn + a1 xn−1 + a2 xn−2 + ... + an ;

the constants

a0 , a1 , a2 , ..., an

being determined by equating coefficients.

Example 0.3.18. Find a particular integral of the equation

d2 y
+ 4y = x2 + 2
dx2

and hence write down the general solution.

Solution 0.3.19.

Let

y = a0 x2 + a1 x + a2 .

Then
dy d2 y
= 2a0 x + a1 ; = 2a0 .
dx dx2

Substituting in the given equation,

2a0 + 4(a0 x2 + a1 x + a2 ) = x2 + 2.

Equating coefficients,
1
4a0 = 1; a0 = .
4

22
Chapter 0, Section 3 Introduction

Therefore,

4a1 = 0;

so,

a1 = 0.

Also,

2a0 + 4a2 = 2;

so,
3
a2 = .
8

Therefore, a particular integral is

1 3
y = x2 + .
4 8

The complementary function is the general solution of the equation

d2 y
+ 4y = 0,
dx2

and is

y = A cos 2x + B sin 2x.

Hence the general solution of the given equation is

1 3
y = A cos 2x + B sin 2x + x2 + ,
4 8

where A, B are arbitrary constants.

School is over!

Exercise 0.3.20.

Solve the following below:

23
Chapter 0, Section 3 Introduction

d2 y
(i) 4 − y = x2 − 3x
dx2
d2 y dy
(ii) 2
−2 + 2y = 1 − x2
dx dx
d2 y dy
(iii) 2 2
− = 4x + 1
dx dx

0.3.10 Case (ii) - f (x) = kemx where k and m are constants

In general, a particular integral can be found by substituting

y = p emx ;

the constant p being determined by equating coefficients. If the function

emx

occurs in the complementary function, p will be indeterminate and it will be neces-

sary to try

y = p x emx

or possibly

y = px2 emx .

Example 0.3.21. Find the general solutions of the equations

d2 x dx
(i) − − 2x = e3t ;
dt2 dt
d2 x dx
(ii) − − 2x = e2t .
dt2 dt

Solution 0.3.22.

In both cases, the complementary function is the general solution of the equation

d2 x dx
− − 2x = 0;
dt2 dt
24
Chapter 0, Section 3 Introduction

that is,

x = A e2t + B e−t .

To find a particular integral of equation(i), let

x = p e3t .

This is a solution of the equation if

9p e3t − 3p e3t − 2p e3t = e3t ;

that is,

4p = 1.

So,
1
p= .
4

Hence, a particular integral is


1 3t
x= e ,
4

and the general solution is

1 3t
x = A e2t + B e−t + e .
4

To find a particular integral of equation (ii), where the function e2t is already

included in the complementary function, we let

x = p t e2t .

So,
dx d2 x
= p e2t + 2p t e2t ; = 4p e2t + 4p t e2t .
dt dt2

25
Chapter 0, Section 3 Introduction

Substituting in the equation we get:

4p e2t + 4p t e2t − p e2t − 2p t e2t − 2p t e2t = e2t .

That is,
1
3p = 1; p = .
3

Therefore, a particular integral is

1 2t
x= te ,
3

and the general solution is

1 2t
x = A e2t + B e−t + te .
3

School is over!

Exercise 0.3.23.

Find the general solution of the equations given below:

d2 y dy
(i) 2
−2 + 5y = 80 e3x
dx dx
d2 y
(ii) 2
− 9y = 2 ex
dx
d2 y dy
(iii) − 6 − 16y = e−x
dx2 dx

26
Chapter 0, Section 3 Introduction

0.3.11 Case (iii) - f (x) = k cos rx or k sin rx where k and r

are constants

In general, a particular integral can be found by substituting

y = p cos rx + q sin rx;

the constants p and q being determined by equating coefficients. If the functions

cos rx

and

sin rx

occur in the complementary function it will be necessary to try

y = x(p cos rx + q sin rx).

Example 0.3.24. Solve the equation

d2 y
+ y = 12 sin 2x.
dx2

Solution 0.3.25.

The complementary function is

y = A cos x + B sin x.

Assume a particular integral of the form

y = p cos 2x + q sin 2x.

So,
dy d2 y
= −2p sin 2x + 2q cos 2x; = −4p cos 2x − 4q sin 2x.
dx dx2
27
Chapter 0, Section 3 Introduction

Therefore,

−4p cos 2x − 4q sin 2x + p cos 2x + q sin 2x = 12 sin 2x.

Equating coefficients of cos 2x and sin 2x, we have:

−3p = 0; p = 0. − 3q = 12; q = −4.

A particular integral is

y = −4 sin 2x,

and the general solution is

y = A cos x + B sin x − 4 sin 2x.

School is over!

Exercise 0.3.26.

Find the general solution of the equations given below:

d2 y
(i) + 9y = 3 cos 2x − sin 2x
dx2
d2 y
(ii) + 16y = 3 sin 4x
dx2

28
Chapter 0, Section 3 Introduction

0.3.12 Case (iv) - f (x) = the sum or difference of functions

of the types already discussed

A particular integral will be the sum or difference of the particular integrals of the

separate functions.

Example 0.3.27. Obtain the solution of the equation

d2 y dy
2
− 2 + y = x2 − 3x + 2 sin x,
dx dx
dy
for which y = 0, = 1 when x = 0.
dx

Solution 0.3.28.

The complementary function is

y = ex (Ax + B).

For a particular integral assume

y = a0 x2 + a1 x + a2 + p cos x + q sin x.

So
dy d2 y
= 2a0 x + a1 − p sin x + q cos x; = 2a0 − p cos x − q sin x.
dx dx2

Substituting in the equation, we have:

2a0 −p cos x−q sin x−2(2a0 x+a1 −p sin x+q cos x)+a0 x2 +a1 x+a2 +p cos x+q sin x = x2 −3x+2 sin x.

Therefore,

2a0 − 2a1 + a2 = 0.

So,

−4a0 + a1 = −3,

29
Chapter 0, Section 3 Introduction

that is,

a0 = 1.

Also,

−p − 2q + p = 0

and

−q + 2p + q = 2.

That is,

a0 = 1, a1 = 1, a2 = 0, q = 0, p = 1.

Hence, a particular integral is

y = x2 + x + cos x,

and the general solution is

y = ex (Ax + B) + x2 + x + cos x.

But when

x = 0, y = 0

and
dy
= 1,
dx

we have

0=B+1

and

1 = A + B + 1.

30
Chapter 0, Section 3 Introduction

That is,

A=1

and

B = −1.

Therefore, the required solution is

y = ex (x − 1) + x2 + x + cos x.

School is over!

31
Chapter 0, Section 3 Introduction

Solutions

Exercise 0.2.3

(i) x3 + 3x = 3y + c

(ii) tan y = tan x + c

(iii) ey = A − e−x

x2 y3 y2
(iv) − ln x = − +c
2 3 2

Exercise 0.2.6

(i) x3 − 3yx2 = c

2 2y − x
(ii) √ tan−1 √ = ln x + c
3 3x
y
(iii) sin−1 = ln x + c
x

Exercise 0.2.11

1.

(i) xy = x + c

(ii) y = x2 + cx

(iii) 5ye3x = e5x + c

2. y = cos x − 2 cos2 x

32
Chapter 0, Section 3 Introduction

Exercise 0.3.5

(i) y + ln x = Ax + B

(ii) y = ln sec x + Ax + B

1
(iii) x = − gt2 + At + B
2
f
(iv) x = − sin nt + At + B
n2

Exercise 0.3.8

1.

(i) y = Ae2x + B

(ii) v = A ln r + B
( )
1 3(y − 1) x
(iii) ln =± √ −1
2 y+1 2
µ
2. u = ± A sin(θ + B)
h2
Exercise 0.3.11

(i) y = Ae2x + Be−2x

(ii) y = Ae2x + Be−x

(iii) y = Ae 3 + Be−x
x

x
(iv) y = Aex + Be 3

33
Chapter 0, Section 3 Introduction

Exercise 0.3.14

(i) y = ex (Ax + B)

−x
(ii) y = e 2 (Ax + B)

x
(iii) y = e a (Ax + B)

Exercise 0.3.17

(i) y = A cos 3x + B sin 3x

(ii) y = A cos x + B sin x

−x
√ √
3x 3x
(iii) y = e 2 (A cos 2
+ B sin 2
)

(iv) y = A cos mx + B sin mx

Exercise 0.3.20

x −x
(i) y = Ae 2 + Be 2 − x2 + 3x − 8

1 1 1
(ii) y = ex (A cos x + sin x) − x2 − x +
2 2 2
x
(iii) y = A + Be 2 − 2x2 − 9x

Exercise 0.3.23

(i) y = ex (A cos 2x + B sin 2x) + 10e3x

2 2x
(ii) y = Ae3x + Be−3x − e
5
1 −x
(iii) y = Ae8x + Be−2x − e
9

34
Chapter 0, Section 3 Introduction

Exercise 0.3.26

3 1
(i) y = A cos 3x + B sin 3x + cos 2x − sin 2x
5 5
3
(ii) y = A cos 4x + B sin 4x − x cos 4x
8

35

You might also like