This is a labreport on chemical kinetics... From this labreport students of chemical engineering and chemistry students can get a huge advantage in working in their lab..Full description
gymnospermFull description
lab report report labFull description
fFull description
ferroceneFull description
wbm basic mud labFull description
microbiology lab report 2
Lab Report Topic: (Creating) Aspirin
Full description
Experiment No:- 09 Name of the Experiment:-
MATLAB MATLAB program for Euler’s method and Runge-Kutta 2 nd order method to solve ordinar differential e!uation" Objectives:-
#$%e&tives of this e'periment are(" To solv solvee ordi ordina nar r diff differ eren entia tiall e!ua e!uati tion on usin using g Eule Euler’s r’s method method and and R-K R-K 2 nd order method" 2" To &ompare &ompare the a&&ura& of the the a$ove a$ove mentioned mentioned methods" methods" Theory:-
)e &an solve ordinar differential e!uation using various methods among *hi&h Euler’s + R-K 2 nd order method *ill $e applied here" Brief des&ription of these t*o methods are given $elo*Euler’s method:-
Among all the methods of solving differential e!uations Euler’s method is the simplest one *hi&h uses e'trapolation te&hni!ue to find the solution" Let us &onsider the follo*ing differential e!uation *ith a given initial value-
dy =f ( ( x , y )−−−−(1 ) dx y ( x1 ) = y 1−−−−( 2)
At
( x
1
, y1
) slope iss 1=
dy ( x x , y ) =f ( ( x 1 , y 1 ) −−−(3 ) dx 1 1
,o* the ne't point on the solution &urve ma $e e'trapolated $ taing a small step in a dire&tion given $ the a$ove slope" The ne't point is-
y ( x1 + h )= y 1 + h∗f ( ( x x 1 , y 1 ) −−−( 4 ) .n the same *a *e *ill get the ne't solution points" /enerall-
y ( xi + h )= y i + h∗f ( ( x i , yi ) −−−( 5 )
.n this *a *e &an find out the solution of a given differential e!uation at an desired point" Euler’s method is a pie&e*ise linear appro'imation te&hni!ue"
Runge-utta !nd order method:-
R-K method is the most used te&hni!ues for solving a differential e!uation" R-K order method gives $etter a&&ura& than R-K 2 nd order method" 1ere R-K 2 nd order *ill $e applied" 1eun’s method is one of the R-K 2 nd order method *hi&h uses t*o slopes" Let us &onsider the follo*ing differential e!uation *ith a given initial valueth
dy =f ( x , y )−−−−(1 ) dx y ( x1 ) = y 1−−−−( 2)
( x , y ) slope is-
At
1
1
s 1=
( x
At
1
( x + h ) 1
, y1 )
a straight line is dra*n *ith slope
at point
( x + h y ' ) 1
2
" ,o* at
s 2=
Again from
( x + h ) 1
s=
2
( x
1
, y 1)
at point
s1 +s2
dy ( x , y ) =f ( x 1 , y 1 ) −−−(3 ) dx 1 1
( x + h y ' ) 1
slope is
s is dra*n *hi&h &uts the verti&al line at
"
−−−−(5 )
,o* the point
y 2
*hi&h &uts the verti&al line at
dy ( x , y ' ) =f ( x 2 , y 2 ' ) −−−(4 ) dx 2 2
a straight line *ith slope
y 2
2
s1
*ill $e e!ual to the follo*ing-
h y 2= y 1 + ∗s−−−(6 ) 2
,e't solution points *ill $e o$tained in the same *a" 3o generall *e &an *rite-
h y ( xi + h )= y i + ∗s −−−( 7 ) 2
This pro&ess &ontinues until solution at desired point is o$tained" 1ere t*o slopes has $een used that’s *h it is no*n as 2nd order method"
"#T$#% program for Euler’s method to solve the O&E x'( to ()!* 4-
&l& &lear all s5input67d8d'5 77s7:; f5eval6<7=6':7 s>:; '(5input67'(5 7:; 'f5input67'f5 7:; (5input67(5 7:; h5input67h5 7:; n56'f-'(:8h; for i5(4n m(5f6'((:; '25'(?h; 25(?h@m(; '(5'2; (52; 2 end Output:-
d8d'5 -'@ '(5 0 'f5 "2
dy + xy = 0 ; y ( 0 )=1 from dx
(5 ( h5 "0 2 5 (
2 5 0"99
2 5 0"992
2 5 0"9C(
2 5 0"92 nd
"#T$#% program for R- ! order method to solve the O&E from x'( to ()!* :-
&l& &lear all s5input67d8d' 5 77s7:; f5eval6<7=6':7s>:; '(5input67'(5 7:; (5input67(5 7:; 'f5input67'f5 7:; h5input67h5 7:; n56'f-'(:8h; for i5(4n m(5f6'((:; '25'(?h; 25(?6h@m(:; m25f6'22:; m56m(?m2:82; 5(?6h@m:; '(5'2; (5; end
The solution point at 6"2: is slight different for the t*o methods" R-K 2 nd order method gives $etter a&&ura& than Euler’s method $e&ause t*o slopes are &onsidered here *hereas onl one slope is &onsidered in Euler’s method" 1ere initial value pro$lem had $een solved using $oth the methods" The term initial value is due to the given initial value *ith the differential solution to $e solved"