20
KXEX 2244: Ordinary Differential Equations Teoh Wen Hui (Week 1 - 7) [email protected] Block V, 201-6 Chem Eng Dept Yap Hwa Jen (Week 8 - 14) [email protected] Mech Eng Dept

ode intro

Embed Size (px)

DESCRIPTION

introduction to ode

Citation preview

Page 1: ode intro

KXEX 2244: Ordinary

Differential Equations

Teoh Wen Hui

(Week 1 - 7)

[email protected]

Block V, 201-6

Chem Eng Dept

Yap Hwa Jen

(Week 8 - 14)

[email protected]

Mech Eng Dept

Page 2: ode intro

Independent & dependent variables

ODE – only 1 independent variable

PDE – 2 or more independent variables

���

��� − ����

��= �����

Independent variable

dependent variable

Ordinary Differential Eq(ODE) – 1 independent

variable

��

��+

��

��= ��� + ��

dependent variable

Independent variables

Partial Differential Eq(PDE) – 2 independent

variables

2

TWH KXEX2244

Page 3: ode intro

ODE

Usually have 1 independent variable and 1

dependent variable

However, you can also have 1 independent

variable and multiple dependent variables

Where you have multiple dependent variables,

you must have sets of coupled ODEs that allow

you to solve the equations simultaneously

���

��+ �

��

��− � + �� = cos�

���

��− �

��

��− �� + � = sin�

Independent variable: t

Dependent variable: x, y

To solve for x & y, must solve both

equations simultaneously

3

TWH KXEX2244

Page 4: ode intro

Order of a differential equation…is the degree of the highest derivative that occurs in the equation

1st order ODE

2nd order ODE

1st order ODE���

��+ �

��

��− � + �� = cos�

���

���− ��

��

��= �����

��

��

+ ���

��= �

3rd order PDE

1st order PDE��

��+

��

��= ��� + ��

���

�����+

���

��� −��

��= ��� + ��

4

TWH KXEX2244

Page 5: ode intro

Linear & non-linear differential equations

An equation is considered linear when the

dependent variables do not occur as

products, raised to powers or in non-linear

functions

5

TWH KXEX2244

Page 6: ode intro

���

���− ��

��

��= �����

���

���− ��

��

��= �����

Linear. Why?x is the independent variable.

Non-linear. Why?f is the dependent variable.cos 2f is not a linear function.

���

���− ��

��

��= �����

���

���− ��

��

��= �����

Non-linear. Why?

����

��is the product between the

dependent variable f and its derivative.

���

���− �

��

��= �

��

��

− ���

��= �

Non-linear. Why?��

��

�is not a linear function.

Linear. Why?x is the independent variable.

Linear. Why?2nd order derivative.

6

TWH KXEX2244

Page 7: ode intro

Standard equation writing

���

���+ �

��

��+ �� = �sin�+ ��+ �

All dependent variables on left-

hand side of equation

All non-dependent variables (including constants) on right-

hand side of equation

7

TWH KXEX2244

Page 8: ode intro

Homogeneous & non-homogeneous equations

Homogeneous

��

��+ �� = �

���

��+ sin� � = �

Non-homogeneous

��

��+ �� = � ����

���

��� − ����

��= �����

Only applied to linear equations

If right-hand side is zero If right-hand side is non-zero

8

TWH KXEX2244

Page 9: ode intro

Solving differential equations

The solution to a differential equation is not of a single value (or one from a set of values).

Rather, the solution to a differential equation is of a function (or a family of functions).

9

TWH KXEX2244

Page 10: ode intro

General solutionsThe most general function that will satisfy the differential equation which contain one or more arbitrary constants.

10

TWH KXEX2244

Page 11: ode intro

Consider and solve for: ��

��+ �� = �

To solve for x:

∫�

��� = ∫−���

��� = −��+ �

� = �(�����)

� = ��(���)

• These are solutions to the differential equation.• A & B are arbitrary constants• Can also be known as general solutions of the

differential equation

11

TWH KXEX2244

Page 12: ode intro

Particular solution

If a particular numerical value is assigned to a general solution, it then becomes a particular solution

From our previous example, we obtained

� = ��(���) …general solution

If we obtained

� = ��(���) …it becomes a particular solution

12

TWH KXEX2244

Page 13: ode intro

Solving differential equationsAs a rule, seek the most general solution that is compatible with the constraints imposed by the problem

13

TWH KXEX2244

Page 14: ode intro

How do you change a general solution into a

particular solution?

14

TWH KXEX2244

Page 15: ode intro

Boundary & initial conditions To turn a general solution to a particular solution, we

usually require the application of other conditions

(such as boundary conditions).

For example:

Find the function x(t) that satisfies the differential

equation ��

��+ �� = � and that has the value 2 when t = 0

We know that: �(�)= ����� and � � = �

Hence: � = ��(�) = � � = �

Therefore, the solution that satisfies the boundary

condition is �(�)= ����� TWH KXEX2244

15

Boundary condition

Page 16: ode intro

Initial conditions

Initial conditions is a special case whereby all

boundary conditions are given at the same value

of the independent variable

Example:

Find the function of x(t) that satisfies the initial-value

problem: �� ��

��=

�given that, � � = �

TWH KXEX2244

16

Page 17: ode intro

Note:

1st order ODE has only ONE arbitrary constant.

Hence, need only 1 boundary condition.

Boundary conditions can be treated as initial value

conditions

For higher order equations (and for sets of coupled

first-order equations), the distinction between

initial-value and boundary value problems is

important

Why? Initial value problems are easier to solve than

boundary value-problems.TWH KXEX2244

17

Page 18: ode intro

Verification of a solution

One way of verifying that a given function is a solution is to check whether each side of the equation is the same for every � in the interval.

TWH KXEX2244

18

Page 19: ode intro

Example: Verify that the indicated function is a solution of the given DE

(a) ��

��= ���/�; � =

����

left-hand side:

��

��=

��� ∙ �� =

���

right hand side:

���/� = � ∙�

����

�=

���

Note:

��

��= ���/�; � =

����

��

��= ���/�; � =

����

TWH KXEX2244

19

Page 20: ode intro

Example: Verify that the indicated function is a solution of the given DE

(a) ��� − ��� + � = �; � = ���

TWH KXEX2244

20