Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
16 views
25 pages
Numerica Integration Cprogram
IOE NUMERICAL INTEGRATION LAB REPORT
Uploaded by
avigemgemini01
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save NumericaIntegrationCprogram For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
16 views
25 pages
Numerica Integration Cprogram
IOE NUMERICAL INTEGRATION LAB REPORT
Uploaded by
avigemgemini01
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save NumericaIntegrationCprogram For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 25
Search
Fullscreen
Numeral Tnfeprahion (Rin chon ond Dataset) [Theony: ‘The press of evaluchng a definite int ral fom aset f tabuloted Velues of tre ingrend fin Gcstes eet integrase «The pres when pphed to @ funchon of a single variable 's known Gs quockahe- Newtons -Cote Quedalre Farmuloe’ Given acet af date pants (ai,yi) sis On1)2,- 0 of fonchon yf Lahece fA) it rob explicitly known: let TZ: [? —U et Ds [P yda © (An) where yf) tales the valves Ye hs gait — —- Yn for Ho, 1% —— An: Vet Dide the interval @.b) into 'n’ quel pore feet ‘hy Go that a: Ho, A 2Hoth Are Hoth ;AZsHotGh - - -- AT Hot Mh +b Sine, Hora and, An: Aotnh zb , the integral became, an | co J yaa | Ho roxio BY Newhn' fowerd Inkerpolohen formulae , a: [te Pages 2g) Bip 4 plazlle:2) ay « _- Jaa. a 0 “Since, 12 %orphy da shdp abort integrarhen beeemin: a Te | [ot pote Age Sipe 4 ele-ilo=22 O46 + - ~ |e 2 ch rit bp (3-4 )SH an +(gf-nb4m ) 4746 ‘dy? - -]® 1) Trapezeidal rule‘ Pathng qb in eq? (2) ond tedeen, Cure Hhrevgh (Rorsporond (hes Ge) as ase-line » higher thon int differences becemen zero. we get ec fan. Rohl), dpe) FG Cyrgrye) hg he Yr)» Arcaaf haperivm: aun tb mpencd (A404) We get “gm Poe m ay) Weg a ‘f yan oth > W(Wi 5 O4r) ohy (ry tgr-gr) ahylyityr) \Simlerl for lowe interval (ati tn] we ger Th + ‘a For(n-Lh * De (Yn-1 449) Combining al there tome get . Ww +TitTa1- — --t In da = he [yotyo) # Myriga dar - - gan) ] This ts called lemparte hepezoded nile. — °oF 2)Sirrpsemi dy-rule Potnng n22in ent yond cee cuurre Horeigh (tor Yo), (An gr? ond (args) os porcibola iehigher then second orders beeamua tere sue get 1] yan to +h (Yo t Siar Se) 2h [yor yi-gpet Yldyr-OHe) J | * MT oys eyo-2yrt God ~ hy laeetgs ta] |——o_«606§0§801§€ @& = 8= = = [Agen storaae waenal Tatar Fe) oe gel Tr , forse go Rot dh 2h (yprdynt YY) 2DhL tar (ys-Yo) el Os O49) ] = hy (645 eu -2g9 ty)
HY »] tng [Capryp + 4 linn cf ocd vdrnates) 124 (um ef eeradinates 7 This iscalted Comparte Simpson “hivle 3) Simpson's “Yyvle- Pothng 023 neg as ape, namradef third order 14 zero" g ’ aie ah [yo 1 55401 %, Bye Eo] ay [a+ 94. + Syo aa] a2) onde Cunt thi Ro hr (AYA) Fes Ob 2F- ~ | ighe- than third dbffercnees beewris“|Simlorg, 45h f Fimdde = 3p [ys ynet Syst fe] and so ory ‘oth Adlng at.uch exproston fom to Hoth whec 7 amulnple $3 ob | eon | JFondn 2h [lwegn) + Blaiegee ter — = -AGna) 4 yseyer - tyr] Xo | This is coltedSimmpsan's 3p rule, ‘Algentom | Preudo cock + PT eapezordl mle |) Start D Define forchen fin) 3) Bnput 2 lower limit integrebon (a) Upper lien af integrabon (b) No-gf strips (9) 4) Giluulate step size! hz (b-a)/n 5) gum flere fb) 6) foriz b teak ”v sum ssumt ire neat t in dtg: hg sve ax flatiny«Simpsons Yy-rvle 1) Suet 2D) Deprne fanchon f () 3) Input’ lower innit of in) No-of ships (n) 4) Coluclote step size (h):6-a)/n 5) Sum «flo + ple) 6) for Fz bdlo-L) if Cimed)2=0 else end rf nexti \p Sig Joumashy, 8) Aiplog oe os result sep Simpson -Yynle- 1) Stork 2) Depne funchon fi) 3) Tnput No. shops (9) 4) Cludodte LITE ole 5) Gorn ~f (0) +f) lower limeg inte Upper host ad rohanla) Upper lirnit af inthe rer on | ») ) gum sum toxflarin) cums gum +4 x f lotih) chon (0) chon (b)ire Pel doo-k If fred 3 #0 Sum ssum 13eflotth) else Sum:sum 19% florih) endif Next 7) Tq 2 Sumy Shy Is) ‘Oupleg Ty Gs roult 9)Sap- [Prapermdal wle with dete set + N) Start 2) Tnpk a, a,b Input valves dota set -for7 20 ton-L Read-di next i a) he lb-a lin-4) | Sum: Yot4n 5) fois bank sum: samt 2gi next (6) Taity = bye |2) Duply P44 #) SepProgram UrdeUropernidel@utey ]* Numericad ategrchor* | fitinclude.
Hein clude £Lemoh> Htinclude
; Qn yohon 2( NA )>surry porgiea Raq wied value ef Dnbegrohen ving return Ly qr; Tapegordad re rs = yaa Inteyehon 5 |Funchon is P= 1/40 Enter lower limit f Integrahor 20 Enter upper hmnit of mntesrahon 26 Numbe~ of shops 72 6 Wiel Hy of ship zL- 000000 Regured valve £ Intepahen nag Trapegsrclad rule f= 1410799Nt em inects) ETayal (Ole (-necauel [OM 12 #include
#include
float f(float x) { return 1/(1+x*x); mae i int main() { a AL float a,b,h,sum, Integration; printf("Function is I=1/(1+x2)\n"); printf("\nEnter lower limit of integration="); scanf("%f",&a); printf("\nEnter upper limit of integration="); scanf("%f",&b); printf("\nNumber of strips?="); scanf("%d",&n); h=(b-a)/n; Yai aA NUCele nee] aa] et OAR MAO) sum=f(a)+f(b); for(i=1;i<=n-1;i++) { sum=sum+2*f(ati*h); } Integration=(h/2)*sum; printf ("\nRequired value of Integration using Trapezoidal rule is=%f", Integration); rcaae len getch(); i< Function is I=1/(1+x2) Te ee ea eee ist) CO eet See Go sto Laas Tey Cote ari et eee) ete Ghee mt Mate Tot ae eee SEL) [Program finished][lFunction is I= x3 eC Ce Ue UCSC) cen ies eC ee aU Tete ToC] Tat Width of strip=0.200000 ot Cea Ce Cuma Ce CCM (Program finished] is=0. 260000v v Pregrom Lede (Gimpuum -yrvte) [Dinumental Dnteg chor) Heinilude
Hemclude
fleet fl float) t | em titexany > 5 int main C) | Wreten Haman) | | int ny floor ay, hsum in rahon 5 i prottf (" Renchon 1s T= Wena do} Iprirefl" Finchon is D> 23\0""); Hate U\n Enter lower hit gintegrahen 2 2; Stonf "Af 2475, a partf U\n Enterupperlim it efintegre hm 2")5 Gonf ("FF 126); | prate("\n Number sf ships ? = "25 sangl" 1d 480), 2 (h-a)/n‘ eee af-ship «Lf \o"sh), | sum 2flore pl) | [ *Sinpsm 4/9-Rule |for (Tel iezn-L5 iF) a Sum = sume 2x flat ixh) 5 else Sum: Sum + 4xfla-rinh) 5 3 Tnteg cohon: (Np )asem : ne ("\ real val tL Ss Rule is 2 Zp VEnt per in Reqs value ff ategrechone using mpson ta Role is topo, Ve L' ) gern); Output Finchon is Bs Vortary Enter lower limit of integrahon 20 Enter upper limit integrenon 26 iNo. of strips 9:6 ili ef ship = L-000000 Requred valve fintgehen vse Simpson “Jy Rule i4-366174c-3 fe eM aba fe de
fe #include
float (float x) { return 1/(1+x*x); i int main() { aH float a,b,h,sum, Integration; Pale Gaede a Eas kU printf("\nEnte er limit of integration="); Eye 1a i printf("\nEnter upper limit of integration="); scanf("%f",&b); printf("\nNumber of st scanf("%d",&n); h=(b-a)/n; printf("\nWidth of strip=% sum=f(a)+f(b); Ok (ee ean) { if(i%2==0) sum=sum+2*f(ati*h); else Up li Coal lal DH i Integration=(h/3)*sum; aaa CRY Mo miter using Simpson 1/3 ntegration odie elean 0H iFunction is I=1/(1+x?) hae cee La Le ete et) Cia ae eC Ra ae te let) COL eee es tla eet eam! tt) Required value of Integration using Simpson 1/3- Rule is=1.366174 [Program finished]]J< Function is I= x? eC eS ee eucarieCin) ec eee etc te totic Tact ee) Width of strip=0.125000 Required value of Integration using Simpson 1/3- Rule is=0.250000 [Program finished] jj' Program ide (Simpson Yg Rule) | [xNumerical Tr rohon el J |4rinclude
6 | wath of ip: $-000000 eget volue f integrohen wey Simpson Yy wle 13 = -70P) po hen +0 renee res#include
#include
#include
t f(float x) i 1/(1+x*x); main() ti,n; float a,b,h,sum, Integration; printf("Function is l=1/(1+x2)\n"); printf("\nEnter lower limit of integration="); scanf("° nter upper limit of integration="); &b); Tan} o)=1 m0) 6-108 | 9 )-Yeod printf("\nWidth of strip=%f\n",h); sum=f(a)+f(b); for(i=1;i<=n-1,i++) { f(i%3!=0) sum=sum+3*f(ati*h); sum=sum+2* f(ati*h); i Integration=(3*h/8)*sum; printf ("\nRequired value of Integration using Rule is=%f", Integration);r Function is I=1/(1+x?) ee eee ee ae te Tet Te) Chet eee aU te Tsun) Peer st tre) RLM et ea eel) Required value of Integration using Simpson 3/8- Rule is=1.357081 tee ae eG)c4 Function is I= x? ae Ch eee a AUT ste a eee MU TsC oa Dae eC mee a RPL) Required value of Integration using Simpson 3/8- Rule is=0.239960 aay) |p, —— — - Tgrom IC Trepetadal nile we dota set) ya Nomerrcal Inbegrehon | Fndlide
clot ccenionh> SS inclucte
int ia: float ay bh Sum ig Cloos Tg 5 POOH" Entenno. dota sets(7) ey | Seanp(" 2d", 305, [Prattl” Enter lower ord upper vent: [Seong "Z$" Ba,8) 5 [Peetgl Ener vole fderaset! (forliz0 5 fe 2n-4; 144) | £ >: Seang ("% fp", BYCID hilb-or/a-L); sum or] Cod +gtas; for (tobi fest 5149) Sums sum t2ayli 5 3 Lig: (og ser 5 oo, poor!" \atasegral 274% 34) gerhos j Outpt: Enkr nef dota sets (nm) 710 Enterlowerand upper himit 10 G Enter valve 4 dom geek Pot egral = 15-733334 | 25 6 23 V6 TH ne 9 2| ) i *Numerical Integrat #include
#include
#include
void main() a Aa float a,b,h,sum, Itg,Y[100]; printf("Enter number of data Erte) HO Yer=] nae) printf("Enter lower and upper limit :"); scanf("%f %f",&a,&b); h=(b-a)/n; printf("Enter value of data set:"); OVC lO ted ee scanf("%f",&YLi]); } h=(b-a)/(n-1); for(i=O;i<=n-1;i++) { sum=sum+2*Y[i]; } Itg=(h/2)*sum; printf ("\nintegral=%f", Itg); getch();4 Enter number of data sets(n):10 Enter lower and upper limit :0 6 Enter value of data set:1 1.2 1.5 1.6 2.3 2.6 7.81.71.92 Integral=15 . 733334 [Program finished]]fee ee |Core lasien | Discuss 107" Niuroberr l, a Preqrors were Written nC fom performing nume reo | chon (Of Meperotlal rele, Simp - 74 le Simpson 3pgrule + Valve of integrad wer ‘found for der dota cets fer using Troperorded rile - Lowerend Upp i ¢ the intggeainon woo prvided ae f and volve of iokeg ral wos Lemp bua
You might also like
MAFE208IU-L10 - Numerical Integration
PDF
No ratings yet
MAFE208IU-L10 - Numerical Integration
33 pages
Simpson's 1/3rd Rule C Program and Flowchart
PDF
100% (3)
Simpson's 1/3rd Rule C Program and Flowchart
4 pages
Numerical Integration PDF
PDF
100% (2)
Numerical Integration PDF
56 pages
MATLAB Unit 3 Part 1
PDF
No ratings yet
MATLAB Unit 3 Part 1
32 pages
Aim: To Evaluate A Definite Integral by Simpson's 3/8 Rule Algorithm
PDF
No ratings yet
Aim: To Evaluate A Definite Integral by Simpson's 3/8 Rule Algorithm
3 pages
Trapizoidal Method
PDF
No ratings yet
Trapizoidal Method
5 pages
Lec 8 - Version2improper - Simpson
PDF
No ratings yet
Lec 8 - Version2improper - Simpson
40 pages
Numerical Integration Note
PDF
No ratings yet
Numerical Integration Note
10 pages
Numerical Integration MOD 4 NM
PDF
No ratings yet
Numerical Integration MOD 4 NM
22 pages
Numerical Integration and Differentiation
PDF
No ratings yet
Numerical Integration and Differentiation
41 pages
5 Numerical Differentiation and Integration Newton Cotes Integration
PDF
No ratings yet
5 Numerical Differentiation and Integration Newton Cotes Integration
45 pages
Lab 8
PDF
No ratings yet
Lab 8
3 pages
Simpson's
PDF
No ratings yet
Simpson's
4 pages
بلا عنوان
PDF
No ratings yet
بلا عنوان
47 pages
Mat Lab Simpson
PDF
No ratings yet
Mat Lab Simpson
4 pages
Cal - 6. Tech - Int - Edit
PDF
No ratings yet
Cal - 6. Tech - Int - Edit
55 pages
Integration Codes
PDF
No ratings yet
Integration Codes
3 pages
Practical 12
PDF
No ratings yet
Practical 12
4 pages
Function y F (X) y X. 2 + 1 End: Step 2: Implement Simpson's 3/8 Rule
PDF
No ratings yet
Function y F (X) y X. 2 + 1 End: Step 2: Implement Simpson's 3/8 Rule
2 pages
Slip 1
PDF
No ratings yet
Slip 1
3 pages
(CSE31P9) Assig - 01
PDF
No ratings yet
(CSE31P9) Assig - 01
11 pages
Practical Codes
PDF
No ratings yet
Practical Codes
14 pages
Numerical Integration
PDF
No ratings yet
Numerical Integration
9 pages
Matlab Program PDF
PDF
No ratings yet
Matlab Program PDF
2 pages
LAB 8 (19-04-25) - Jupyter Notebook
PDF
No ratings yet
LAB 8 (19-04-25) - Jupyter Notebook
2 pages
Hmkjoiwjf
PDF
No ratings yet
Hmkjoiwjf
65 pages
Lecture 28
PDF
No ratings yet
Lecture 28
26 pages
Chapter 3 - Techniquse of Integration
PDF
No ratings yet
Chapter 3 - Techniquse of Integration
45 pages
Numerical Integration
PDF
No ratings yet
Numerical Integration
16 pages
NC Lab 10
PDF
No ratings yet
NC Lab 10
5 pages
Chapter 4: Integrals: by Assoc - Prof. Mai Duc Thanh
PDF
No ratings yet
Chapter 4: Integrals: by Assoc - Prof. Mai Duc Thanh
23 pages
Snip
PDF
No ratings yet
Snip
6 pages
003 Numerical Differentiation and Integration
PDF
No ratings yet
003 Numerical Differentiation and Integration
47 pages
Some Algorthim For Solving System of Linear Volterra Integral Equation of Second Kind by Using MATLAB 7
PDF
No ratings yet
Some Algorthim For Solving System of Linear Volterra Integral Equation of Second Kind by Using MATLAB 7
11 pages
Calculus CA2 Sem
PDF
No ratings yet
Calculus CA2 Sem
14 pages
What Is This Area?: How and Why Numerical Integration Should Precede The Fundamental Theorem
PDF
No ratings yet
What Is This Area?: How and Why Numerical Integration Should Precede The Fundamental Theorem
7 pages
Numerical Integration
PDF
No ratings yet
Numerical Integration
7 pages
National Institute of Technology, Delhi: Numerical Methods (MAP 281) Assignment
PDF
No ratings yet
National Institute of Technology, Delhi: Numerical Methods (MAP 281) Assignment
9 pages
Project:-5 Evaluation of Real Definite Integrals Using Trapezoidal Rule and Simpson's One Third Rule
PDF
No ratings yet
Project:-5 Evaluation of Real Definite Integrals Using Trapezoidal Rule and Simpson's One Third Rule
7 pages
C Program Numerical Integration
PDF
No ratings yet
C Program Numerical Integration
3 pages
NC-Assingment No 2
PDF
No ratings yet
NC-Assingment No 2
5 pages
Chapter-1: Integration Indefinite Integrals Definite Integrals
PDF
No ratings yet
Chapter-1: Integration Indefinite Integrals Definite Integrals
43 pages
2 Integration
PDF
No ratings yet
2 Integration
4 pages
Dse 1 Unit 4
PDF
No ratings yet
Dse 1 Unit 4
9 pages
CSC 344 - Algorithms and Complexity
PDF
No ratings yet
CSC 344 - Algorithms and Complexity
21 pages
Simpson Rule
PDF
No ratings yet
Simpson Rule
3 pages
Adobe Scan Mar 26, 2024
PDF
No ratings yet
Adobe Scan Mar 26, 2024
3 pages
Lect Integration N Differentition2024
PDF
No ratings yet
Lect Integration N Differentition2024
64 pages
Cs Assignment 10 By: Bhavesh Mendhekar 1501 ME 15
PDF
No ratings yet
Cs Assignment 10 By: Bhavesh Mendhekar 1501 ME 15
7 pages
Lecture 13 Integration
PDF
No ratings yet
Lecture 13 Integration
38 pages
Chapter - Numerical Integration: Aman W Department of Applied Physics University of Gondar
PDF
No ratings yet
Chapter - Numerical Integration: Aman W Department of Applied Physics University of Gondar
38 pages
Definite Integration Final-Invert
PDF
No ratings yet
Definite Integration Final-Invert
70 pages
Numerical - Chapter Six
PDF
No ratings yet
Numerical - Chapter Six
9 pages
Bearing Capacityof Shallow Foundation
PDF
No ratings yet
Bearing Capacityof Shallow Foundation
61 pages
ENG303 8numerical Integration
PDF
No ratings yet
ENG303 8numerical Integration
6 pages
Unit Numerical Integration: Structure
PDF
No ratings yet
Unit Numerical Integration: Structure
18 pages
Simpson's 1-3rd Rule
PDF
No ratings yet
Simpson's 1-3rd Rule
4 pages
PlaneMotionOfRigidBodies forceMomentumAcceleration
PDF
No ratings yet
PlaneMotionOfRigidBodies forceMomentumAcceleration
22 pages
Dimensional Analysis
PDF
No ratings yet
Dimensional Analysis
45 pages
Hydrological Losses
PDF
No ratings yet
Hydrological Losses
46 pages
Chapter 9 Well Foundation
PDF
No ratings yet
Chapter 9 Well Foundation
19 pages
Numerical Method
PDF
No ratings yet
Numerical Method
27 pages
Mat Foundation
PDF
No ratings yet
Mat Foundation
27 pages