Engineering Mathematics I€¦ ·  · 2017-03-17Engineering Mathematics I_ 2017 . 2 ... This...

15
4. First-Order Differential Equations (2) Solutions by Substitutions, Numerical Method Engineering Mathematics I Dr. Rami Zakaria Engineering Mathematics I_ 2017

Transcript of Engineering Mathematics I€¦ ·  · 2017-03-17Engineering Mathematics I_ 2017 . 2 ... This...

4. First-Order Differential Equations (2)

Solutions by Substitutions, Numerical Method

Engineering Mathematics I

Dr. Rami Zakaria

Engineering Mathematics I_ 2017

2

We will discuss 3 special cases where DEs can be turned

into separable equations by variable substitution.

We will accept the following rules via experiment, without

going through proving them.

These rules will help us solving DEs if we couldn’t fit them

into one of the previous categories (separable, linear, etc …)

1. Equations with homogenous functions

3

),(),(),(),(

0),(),(

yxNttytxNandyxMttytxM

dyyxNdxyxM

If we have a DE in the form:

And:

We say that functions M(x,y) and N(x,y) are homogenous functions of the same

degree α.

In other words, we say that a first order ODE is homogeneous id it is possible to write:

Therefore, it is possible to reduce the equation into a separable equation by

substituting:

vyxy

xv

uxyx

yu

or

y

xfy

x

yfy or

4

Example 1, p.62: Solve 0222 dyxyxdxyx

Solution: M(x) and N(x) are homogenous functions of degree 2. define a function u(x) and let

y=ux, then dy=udx+xdu

x

y

cxeyxorx

y

cx

yx

x

y

c

x

x

y

cxx

y

x

y

cxuu

x

dxdu

ux

dxdu

u

u

duuxdxux

uduxduxudxxdxx

xduudxuxxdxxux

22

2

32

3322

22222

ln

ln1ln

lnln1ln2

lnln1ln2

01

210

1

1

0)1()1(

0

0

2. Bernoulli’s Equation

5

1,0;)()( nnyxfyxPdx

dy n

A DE in the form:

is called Bernoulli’s Equation

This equation can be reduced into a linear equation using a substitution u = y1-n .

Example: Solve

Solution:

This is a Bernoulli’s equation which can be reduced using a substitution:

dx

duu

dx

dyuy

yu

3

4

3

1

3

3

1,

x

x

ex

u

dx

due

ueuxdx

duu

3)3(

3

1

3

1

3

4

3

4

3

1

3

4

The equation becomes:

For simplification, multiply both sides by

Now we can solve this equation using an integration factor

Linear equation

cexe

xy

x

cexey

x

cexeudxxexuxexu

dx

d

xeex

xx

xx

xxxx

xdxx

33

3

333

)(

313

1

ln1

),0(; xfor

See also: ex2 p.63

3. Equation of the form:

6

0;)( BCByAxfdx

dy

This equation can be reduced to a separable equation using a substitution: u = Ax + By + C

Example (23.p64): Solve

Solution:

By using a substitution:

21 yxdx

dy

See also: ex3 p.63

7

Previously we have seen that the population growth can be given by the simple relationship

For a more accurate representation, let’s introduce another factor K, which represents the carrying

capacity of the environment. Then we get the relationship:

Then we can write the logistic differential equation of population growth:

Let’s find a solution for this DE.

If you rewrite the equation: We notice that this is a Bernoulli’s equation (n=2)

Pdt

dP

K

PP

dt

dP1

Basically it means, the growth slows

down when P is getting closer to K

bPaPdt

dPor

K

PaP

dt

dP

1 a and b are positive constants.

2bPaPdt

dP

The logistic model of population growth Application

8

9

Previously we have seen that a simple equation that describes the acceleration of a falling object is

given by:

g

dt

sd

2

2

The velocity of a falling object with air resistance Application

Fr = -bv

W =mg

To improve the model, we add an air resistance force that is proportional to the

velocity Fr = -bv ; b is a positive constant called the drag coefficient.

According to Newton’s second law :

Now, let’s solve this DE:

Rewrite:

dt

dvmbvmgmaF

tm

b

tm

b

ceb

mgv

ecvm

bg

ctvm

bg

b

mdtdv

vm

bg

m

b

b

m

dt

vm

bg

dv

dt

dvv

m

bg

2

1ln

variables theseperate

Exercise: Solve the previous equation for the IC : v(0)=0

10

tm

b

tm

b

eb

mgv

b

mgcc

b

mg

vceb

mgv

1

:IVP theofsolution particularA

0

0)0(;

Example for m=20, g=9.8, b=0.75

Euler’s Numerical Method

11

So far, we are learning a solution procedure for each different type of equations. The

problem is there will be always different differential equations that we don’t have a

method to solve. Even when we find a solution, we may not be able to write it in an

explicit form.

Also, there are some differential equations that are not easy to graph their direction fields.

In these cases we can use numerical methods that allow us to approximate solutions to

differential equations. There are different methods that can be used, but we are going to

look at one specific method called Euler’s Method.

A first order IVP looks like:

Now we need to approximate the solution of this IVP near t=t0

We know two things here; we know the value of the solution at t=t0 , and we know the

value of the derivative at t=t0 ;

This means that the equation of the tangent line to the solution at t=t0 is:

12

If t1 is close enough to t0 then the point

y1 on the tangent line should be very

close to the actual value of the solution

at y(t1)

plug t1 in the equation for the tangent line

Here, we don’t have the value of the solution at y1 and so we won’t know the slope of

the tangent line to the solution at this point. But, as y1 is an approximation to the

solution at t1 , we can use that to estimate the slope of the tangent line at t1 : f(t1, y1).

Therefore the tangent line at t1, can be approximated by:

We take another nearby point t = t2 ; then:

And so on …

Or simply:

13

Often, we assume that the step sizes between the points t0 , t1 , t2 , … are of

a uniform size of h. So we can assume that :

Then, the formula for the next approximation becomes:

Example: For the IVP

Use Euler’s Method with a step size of h = 0.1 to

find approximate values of the solution at t = 0.1,

0.2, 0.3, 0.4, and 0.5. Compare them to the exact

values of the solution as these points.

Note: This is a simple linear differential

equation, and you can check that the solution is

Solution:

For Euler’s Method, we rewrite the differential equation into the form:

note that t0 = 0 and y0 = 1

14

So, the approximation to the solution at t1 = 0.1 is y1 = 0.9.

At the next step we have

Therefore, the approximation to the solution at t2 = 0.2 is y2 = 0.852967995.

you can check the remainder of these computations:

15

tn Approximation yn Actual Value Error

0 1 1 0 %

0.1 0.9 0.925794646 2.79 %

0.2 0.852967995 0.889504459 4.11 %

0.3 0.837441500 0.876191288 4.42 %

0.4 0.839833779 0.876283777 4.16 %

0.5 0.851677371 0.883727921 3.63 %

Note: for more accurate approximation, we can take a smaller step h

See also Ex1. P67