Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Solving First Order Differential Equations: Separation of Variables and Exact Equations, Slides of Differential Equations

First Order. Differential Equations. 19.2. Introduction. Separation of variables is a technique commonly used to solve first order ordinary differential.

Typology: Slides

2021/2022

Uploaded on 09/12/2022

juhy
juhy 🇺🇸

4.3

(6)

246 documents

1 / 19

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
®
First Order
Differential Equations
19.2
Introduction
Separation of variables is a technique commonly used to solve first order ordinary differential
equations. It is so-called because we rearrange the equation to be solved such that all terms involving
the dependent variable appear on one side of the equation, and all terms involving the independent
variable appear on the other. Integration completes the solution. Not all first order equations can be
rearranged in this way so this technique is not always appropriate. Further, it is not always possible
to perform the integration even if the variables are separable.
In this Section you will learn how to decide whether the method is appropriate, and how to apply it
in such cases.
An exact first order differential equation is one which can be solved by simply integrating both sides.
Only very few first order differential equations are exact. You will learn how to recognise these and
solve them. Some others may be converted simply to exact equations and that is also considered
Whilst exact differential equations are few and far between an important class of differential equations
can be converted into exact equations by multiplying through by a function known as the integrating
factor for the equation. In the last part of this Section you will learn how to decide whether an
equation is capable of being transformed into an exact equation, how to determine the integrating
factor, and how to obtain the solution of the original equation.
Prerequisites
Before starting this Section you should . . .
understand what is meant by a differential
equation; (Section 19.1)
'
&
$
%
Learning Outcomes
On completion you should be able to . . .
explain what is meant by separating the
variables of a first order differential equation
determine whether a first order differential
equation is separable
solve a variety of equations using the
separation of variables technique
HELM (2008):
Section 19.2: First Order Differential Equations
11
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download Solving First Order Differential Equations: Separation of Variables and Exact Equations and more Slides Differential Equations in PDF only on Docsity!

®

First Order

Differential Equations







Introduction

Separation of variables is a technique commonly used to solve first order ordinary differential equations. It is so-called because we rearrange the equation to be solved such that all terms involving the dependent variable appear on one side of the equation, and all terms involving the independent variable appear on the other. Integration completes the solution. Not all first order equations can be rearranged in this way so this technique is not always appropriate. Further, it is not always possible to perform the integration even if the variables are separable.

In this Section you will learn how to decide whether the method is appropriate, and how to apply it in such cases.

An exact first order differential equation is one which can be solved by simply integrating both sides. Only very few first order differential equations are exact. You will learn how to recognise these and solve them. Some others may be converted simply to exact equations and that is also considered

Whilst exact differential equations are few and far between an important class of differential equations can be converted into exact equations by multiplying through by a function known as the integrating factor for the equation. In the last part of this Section you will learn how to decide whether an equation is capable of being transformed into an exact equation, how to determine the integrating factor, and how to obtain the solution of the original equation.









Prerequisites

Before starting this Section you should...

  • understand what is meant by a differential equation; (Section 19.1)

'

&

$

%

Learning Outcomes

On completion you should be able to...

  • explain what is meant by separating the variables of a first order differential equation
  • determine whether a first order differential equation is separable
  • solve a variety of equations using the separation of variables technique

HELM (2008): Section 19.2: First Order Differential Equations

1. Separating the variables in first order ODEs

In this Section we consider differential equations which can be written in the form

dy dx = f (x)g(y)

Note that the right-hand side is a product of a function of x, and a function of y. Examples of such equations are

dy dx = x^2 y^3 , dy dx = y^2 sin x and dy dx = y ln x

Not all first order equations can be written in this form. For example, it is not possible to rewrite the equation

dy dx = x^2 + y^3

in the form dy dx = f (x)g(y)

Task Determine which of the following differential equations can be written in the form dy dx

= f (x)g(y)

If possible, rewrite each equation in this form.

(a) dy dx

x^2 y^2 , (b) dy dx = 4x^2 + 2y^2 , (c) y dy dx

  • 3x = 7

Your solution

Answer (a) dy dx

= x^2

y^2

, (b) cannot be written in the stated form,

(c) Reformulating gives dy dx

= (7 − 3 x) ×

y

which is in the required form.

12 HELM (2008):

Workbook 19: Differential Equations

2. Applying the method of separation of variables to ODEs

Example 3

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

3 x^2 y

Solution The equation already has the form dy dx = f (x)g(y)

where f (x) = 3x^2 and g(y) = 1/y. Dividing both sides by g(y) we find

y dy dx = 3x^2 Integrating both sides with respect to x gives ∫ y dy dx dx =

3 x^2 dx

that is ∫ y dy =

3 x^2 dx

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 = 2x^3 + 2c so that y = ±

2 x^3 + 2c

14 HELM (2008):

Workbook 19: Differential Equations

®

Task Use the method of separation of variables to solve the differential equation dy dx

cos x sin 2y

First separate the variables so that terms involving y and dy dx

appear on the left, and terms involving

x appear on the right:

Your solution

Answer You should have obtained sin 2y dy dx = cos x

Now reformulate both sides as integrals:

Your solution

Answer ∫ sin 2y dy dx dx =

cos x dx that is

sin 2y dy =

cos x dx

Now integrate both sides:

Your solution

Answer −^12 cos 2y = sin x + c

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

Your solution

Answer y = 12 cos−^1 (D − 2 sin x) where D = − 2 c

HELM (2008): Section 19.2: First Order Differential Equations

®

3. Exact equations

Consider the differential equation

dy dx = 3x^2

By direct integration we find that the general solution of this equation is

y = x^3 + C

where C is, as usual, an arbitrary constant of integration. Next, consider the differential equation

d dx (yx) = 3x^2.

Again, by direct integration we find that the general solution is

yx = x^3 + C.

We now divide this equation by x to obtain

y = x^2 +

C

x

The differential equation d dx (yx) = 3x^2 is called an exact equation. It can effectively be solved by

integrating both sides.

Task Solve the equations (a) dy dx = 5x^4 (b) d dx (x^3 y) = 5x^4

Your solution (a) y = (b) y =

Answer (a) y = x^5 + C (b) x^3 y = x^5 + C so that y = x^2 +

C

x^3

If we consider examples of this kind in a more general setting we obtain the following Key Point:

HELM (2008): Section 19.2: First Order Differential Equations

Key Point 2

The solution of the equation d dx (f (x) · y) = g(x) is f (x) · y =

g(x) dx or y =

f (x)

g(x) dx

4. Solving exact equations

As we have seen, the differential equation d dx (yx) = 3x^2 has solution y = x^2 + C/x. In the solution,

x^2 is called the definite part and C/x is called the indefinite part (containing the arbitrary constant of integration). If we take the definite part of this solution, i.e. yd = x^2 , then

d dx (yd · x) = d dx (x^2 · x) = d dx (x^3 ) = 3x^2.

Hence yd = x^2 is a solution of the differential equation. Now if we take the indefinite part of the solution i.e. yi = C/x then

d dx (yi · x) =

d dx

C

x · x

d dx

(C) = 0.

It is always the case that the general solution of an exact equation is in two parts: a definite part yd(x) which is a solution of the differential equation and an indefinite part yi(x) which satisfies a simpler version of the differential equation in which the right-hand side is zero.

Task (a) Solve the equation d dx (y cos x) = cos x

(b) Verify that the indefinite part of the solution satisfies the equation d dx (y cos x) = 0.

(a) Integrate both sides of the first differential equation:

Your solution

18 HELM (2008):

Workbook 19: Differential Equations

Example 4

Solve the equation

x^3 dy dx

  • 3x^2 y = x

Solution Comparing this equation with the form in Key Point 3 we see that f (x) = x^3 and g(x) = x. Hence the equation can be written d dx (yx^3 ) = x which has solution

yx^3 =

x dx = 12 x^2 + C.

Therefore y =

2 x

C

x^3

Task Solve the equation sin x dy dx

  • y cos x = cos x.

Your solution

Answer You should obtain y = 1 + Ccosec x since, here f (x) = sin x and g(x) = cos x. Then d dx (y sin x) = cos x and y sin x =

cos x dx = sin x + C

Finally y = 1 + C cosec x.

20 HELM (2008):

Workbook 19: Differential Equations

®

Exercises

  1. Solve the equation d dx (yx^2 ) = x^3.
  2. Solve the equation d dx (yex) = e^2 x^ given the condition y(0) = 2.
  3. Solve the equation e^2 x^ dy dx
  • 2e^2 xy = x^2.
  1. Show that the equation x^2 dy dx + 2xy = x^3 is exact and obtain its solution.
  2. Show that the equation x^2

dy dx

  • 3xy = x^3 is not exact. Multiply the equation by x and show that the resulting equation is exact and obtain its solution. Answers
  1. y = x^2 4

C

x^2

. 2. y = 12 ex^ + 32 e−x. 3. y =

3 x

(^3) + C)^ e− 2 x. 4. y =^1 4

x^2 +

C

x^2

  1. y =

x^2 +

C

x^3

6. The integrating factor

The equation

x^2

dy dx

  • 3x y = x^3

is not exact. However, if we multiply it by x we obtain the equation

x^3 dy dx

  • 3x^2 y = x^4.

This can be re-written as

d dx (x^3 y) = x^4

which is an exact equation with solution

x^3 y =

x^4 dx

so x^3 y =

x^5 + C

and hence

y =

x^2 +

C

x^3

The function by which we multiplied the given differential equation in order to make it exact is called an integrating factor. In this example the integrating factor is simply x.

HELM (2008): Section 19.2: First Order Differential Equations

®

Comparing (1) and (2), x is replaced by t and y by i to produce di dt

  • f (t) i = g(t). The function

f (t) is the coefficient of the dependent variable in the differential equation. We shall describe the method of finding the integrating factor for (1) and then generalise it to a linear differential equation written in standard form.

Step 1 Write the differential equation in standard form i.e. with the coefficient of the derivative equal to 1. Here we need to divide through by L:

di dt

R

L

i =

E

L

cos ωt.

Step 2 Integrate the coefficient of the dependent variable (that is, f (t) = R/L) with respect to the independent variable (that is, t), and ignoring the constant of integration ∫ R L

dt =

R

L

t.

Step 3 Take the exponential of the function obtained in Step 2.

This is the integrating factor (I.F.)

I.F. = eRt/L.

This leads to the following Key Point on integrating factors:

Key Point 4

The linear differential equation (written in standard form):

dy dx

  • f (x)y = g(x) has an integrating factor I.F. = exp

[∫

f (x)dx

]

Task Find the integrating factors for the equations (a) x dy dx

  • 2x y = xe−^2 x^ (b) t di dt
  • 2t i = te−^2 t^ (c) dy dx − (tan x)y = 1.

Your solution

HELM (2008): Section 19.2: First Order Differential Equations

Answer (a) Step 1 Divide by x to obtain dy dx

  • 2y = e−^2 x

Step 2 The coefficient of the independent variable is 2 hence

2 dx = 2x

Step 3 I.F. = e^2 x (b) The only difference from (a) is that i replaces y and t replaces x. Hence I.F. = e^2 t. (c) Step 1 This is already in the standard form.

Step 2

− tan x dx =

− sin x cos x dx = ln cos x.

Step 3 I.F. = eln cos^ x^ = cos x

8. Solving equations via the integrating factor

Having found the integrating factor for a linear equation we now proceed to solve the equation. Returning to the differential equation, written in standard form:

di dt

R

L

i =

E

L

cos ωt

for which the integrating factor is

eRt/L

we multiply the equation by the integrating factor to obtain

eRt/L^ di dt

R

L

eRt/L^ i =

E

L

eRt/L^ cos ωt

At this stage the left-hand side of this equation can always be simplified as follows:

d dt (eRt/L^ i) =

E

L

eRt/L^ cos ωt.

Now this is in the form of an exact differential equation and so we can integrate both sides to obtain the solution:

eRt/L^ i =

E

L

eRt/L^ cos ωt dt.

All that remains is to complete the integral on the right-hand side. Using the method of integration by parts we find ∫ eRt/L^ cos ωt dt =

L

L^2 ω^2 + R^2 [ωL sin ωt + R cos ωt] eRt/L

Hence

eRt/L^ i =

E

L^2 ω^2 + R^2 [ωL sin ωt + R cos ωt] eRt/L^ + C.

Finally

i =

E

L^2 ω^2 + R^2 [ωL sin ωt + R cos ωt] + C e−Rt/L.

24 HELM (2008):

Workbook 19: Differential Equations

Engineering Example 1

An RC circuit with a single frequency input

Introduction

The components in RC circuits containing resistance, inductance and capacitance can be chosen so that the circuit filters out certain frequencies from the input. A particular kind of filter circuit consists of a resistor and capacitor in series and acts as a high cut (or low pass) filter. The high cut frequency is defined to be the frequency at which the magnitude of the voltage across the capacitor (the output voltage) is 1 /

2 of the magnitude of the input voltage.

Problem in words

Calculate the high cut frequency for an RC circuit is subjected to a single frequency input of angular frequency ω and magnitude vi.

(a) Find the steady state solution of the equation

R

dq dt

q C = viejωt and hence find the magnitude of

(i) the voltage across the capacitor vc = q C

(ii) the voltage across the resistor vR = R dq dt

(b) Using the impedance method of 12.6 confirm your results to part (a) by calculating

(i) the voltage across the capacitor vc (ii) the voltage across the resistor vR in response to a single frequency of angular frequency ω and magnitude vi.

(c) For the case where R = 1 kΩ and C = 1 μF, find the ratio |vc| |vi| and complete the table below

ω 10 102 103 104 105 106 |vc| |vi|

(d) Explain why the table results show that a RC circuit acts as a high-cut filter and find the value

of the high-cut frequency, defined as fhc = ωhc/ 2 π, such that |vc| |vi|

26 HELM (2008):

Workbook 19: Differential Equations

®

Mathematical statement of the problem

We need to find a particular solution to the differential equation R dq dt

q C = viejωt.

This will give us the steady state solution for the charge q. Using this we can find vc = q C and

vR = R dq dt

. These should give the same result as the values calculated by considering the impedances

in the circuit. Finally we can calculate |vc| |vi| and fill in the table of values as required and find the

high-cut frequency from |vc| |vi|

and fhc = ωhc/ 2 π.

Mathematical solution

(a) To find a particular solution, we try a function of the form q = c 0 ejωt^ which means that

dq dt

= jωc 0 ejωt.

Substituting into R dq dt

q C = viejωt^ we get

Rjωc 0 ejωt^ + c 0 ejωt C = viejωt^ ⇒ Rjωc 0 + c 0 C = vi

⇒ c 0 = vi Rjω + (^) C^1

Cvi RCjω + 1

⇒ q = Cvi RCjω + 1

ejωt

Thus

(i) vc = q C

vi RCjω + 1

ejωt^ and (ii) vR = dq dt

RCvijω RCjω + 1

ejωt

(b) We use the impedance to determine the voltage across each of the elements. The applied voltage is a single frequency of angular frequency ω and magnitude vi such that V = viejωt.

For an RC circuit, the impedance of the circuit is Z = ZR + Zc where ZR is the impedance of the

resistor R and Zc is the impedance of the capacitor Zc = − j ωC

Therefore Z = R − j ωC

The current can be found using v = Zi giving

viejωt^ =

R −

j ωC

i ⇒ i = viejωt R − (^) ωCj We can now use vc = zci and vR = zRi giving

(i) vc = q C

j ωC

×

vi R − (^) ωCj

ejωt^ = vi RCjω + 1 ejωt

(ii) vR = Rvi R − (^) ωCj

ejωt^ = RCvijω RCjω + 1

ejωt

which confirms the result in part (a) found by solving the differential equation.

(c) When R = 1000 Ω and C = 10−^6 F vc = vi RCjω + 1 ejωt^ = vi 10 −^3 jω + 1 ejωt

HELM (2008): Section 19.2: First Order Differential Equations

®

Exercises

  1. Solve the equation x^2 dy dx
  • x y = 1.
  1. Find the solution of the equation x dy dx − y = x subject to the condition y(1) = 2.
  2. Find the general solution of the equation dy dt
  • (tan t) y = cos t.
  1. Solve the equation dy dt + (cot t) y = sin t.
  2. The temperature θ (measured in degrees) of a body immersed in an atmosphere of varying

temperature is given by dθ dt

    1. 1 θ = 5 − 2. 5 t. Find the temperature at time t if θ = 60◦C when t = 0.
  1. In an LR circuit with applied voltage E = 10(1 − e−^0.^1 t) the current i is given by

L di dt

  • Ri = 10(1 − e−^0.^1 t).

If the initial current is i 0 find i subsequently. Answers

  1. y =

x ln x +

C

x

  1. y = x ln x + 2x
  2. y = (t + C) cos t
  3. y =

2 t^ −^

1 4 sin 2t^ +^ C

cosec t

  1. θ = 300 − 25 t − 240 e−^0.^1 t
  2. i =

R

10 R − L

e−^0.^1 t^ +

[

i 0 +

10 L

R(10R − L)

]

e−Rt/L

HELM (2008): Section 19.2: First Order Differential Equations