Sie sind auf Seite 1von 13

Engr. I. I.

Cheema
Chemical Engineering Mathematics
(Ch. E 304)
11
th
Week Chemical Engineering Mathematics (Ch.E - 304) 1
Engr. I. I. Cheema
Ordinary Differential Equations
Higher Order ODEs
ODE Solver
Chemical Engineering Mathematics (Ch.E - 304) 2 11
th
Week
Solving Higher order ODEs in MATLAB
Matlab does not work with higher order ODE
Engr. I. I. Cheema
Matlab does not work with higher order ODE
Rewrite a higher order ODE
As a system of first order ODE
Matlab find a numerical solution to this system
Chemical Engineering Mathematics (Ch.E - 304) 3 11
th
Week
Procedure: n
th
order ODE to 1
st
order ODE
Step 1: Select of dependent variables:
Take the original dependent variable and its
Engr. I. I. Cheema
Take the original dependent variable and its
derivatives up to one degree less than the
highest order derivative.
Step 2: Write differential equations:
In terms of the new variables. The equations
comes from the way the new variables are comes from the way the new variables are
defined.
Step 3: Write equations in matrix form:
Chemical Engineering Mathematics (Ch.E - 304) 4 11
th
Week
Example 1
x x x x x
& & & &
= = = + +
ODE order first of system a to
4 ) 0 ( ; 1 ) 0 ( , 1 6 3 Convert
Engr. I. I. Cheema
) variables two need We ODE order (second
variable of set new a Select
: Solution
x z
x z
&
=
=
2
1
One degree less than the
highest order derivative
Chemical Engineering Mathematics (Ch.E - 304) 5 11
th
Week
Solution (Cont)
cond. name name
Equation Initial new old
Engr. I. I. Cheema
=
=
6 3 1 1
4
cond. name name
1 2 2 2
2 1 1
z z z z x
z z z x
& &
&

1
4
) 0 ( ,
6 3 1
1 2
2
2
1
Z
z z
z
z
z
&
&
Chemical Engineering Mathematics (Ch.E - 304) 6 11
th
Week
Function File
Engr. I. I. Cheema
Chemical Engineering Mathematics (Ch.E - 304) 7 11
th
Week
Calling of Function in M-File
Plot
Engr. I. I. Cheema
Chemical Engineering Mathematics (Ch.E - 304) 9 11
th
Week
Example 2
x x x x
& & & & & &
= + + + 0 8 7 2
Convert
Engr. I. I. Cheema
x z
x x x
x x x x
& & &
& & & & & &
=
= = =
= + + +
them) of (3 variable of set new a Select
4 ) 0 ( ; 1 ) 0 ( , 9 ) 0 (
0 8 7 2
x z
x z
x z
& &
&
=
=
=
3
2
1
One degree less than the
highest order derivative
Chemical Engineering Mathematics (Ch.E - 304) 10 11
th
Week
Solution (Cont)
cond. name name
Equation Initial new old
Engr. I. I. Cheema

=
=
=
4
8 7 2 9
1
4
cond. name name
1 2 3 3 3
3 2 2
2 1 1
z z
z z z z z x
z z z x
z z z x
&
& & &
& &
&

9
1
4
) 0 ( ,
8 7 2
1 2 3
3
2
3
2
1
Z
z z z
z
z
z
z
z
&
&
&
Chemical Engineering Mathematics (Ch.E - 304) 11 11
th
Week
Example 3
y x x x
& & & & & &
= + + + 0 8 2 5
Convert
Engr. I. I. Cheema
x z
x z
y y x x x
x xy y
&
& & & &
& & &
=
=
= = = = =
= + +
1
variable of set new a Select 1.
3 ) 0 ( ; 1 ) 0 ( ; 9 ) 0 ( ; 2 ) 0 ( ; 4 ) 0 (
2 2
One degree less
than the highest
order derivative
One degree less
than the highest
y z
y z
x z
x z
&
& &
&
=
=
=
=
5
4
3
2
order derivative
than the highest
order derivative
Chemical Engineering Mathematics (Ch.E - 304) 12 11
th
Week
Solution (Cont)
cond. name name
Equation Initial new old
Engr. I. I. Cheema
4 2 3 3 3
3 2 2
2 1 1
8 2 5 9
2
4
cond. name name
z z z z z x
z z z x
z z z x
=
=
=
& & &
& &
&
4 1 2 5 5
5 4 4
2 2 3
1
z z z z z y
z z z y
=
=
& &
&
Chemical Engineering Mathematics (Ch.E - 304) 13 11
th
Week

Das könnte Ihnen auch gefallen