https://script.spoken-tutorial.org/index.php?title=Scilab/C4/Integration/English&feed=atom&action=historyScilab/C4/Integration/English - Revision history2024-03-29T05:50:16ZRevision history for this page on the wikiMediaWiki 1.23.17https://script.spoken-tutorial.org/index.php?title=Scilab/C4/Integration/English&diff=7993&oldid=prevNancyvarkey at 02:37, 22 December 20132013-12-22T02:37:40Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 02:37, 22 December 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 7:</td>
<td colspan="2" class="diff-lineno">Line 7:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{| <del class="diffchange diffchange-inline">style="</del>border<del class="diffchange diffchange-inline">-spacing:0;"</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{|border<ins class="diffchange diffchange-inline">=1</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>! <center>Visual Cue</center></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>! <center>Visual Cue</center></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>! <center>Narration</center></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>! <center>Narration</center></div></td></tr>
</table>Nancyvarkeyhttps://script.spoken-tutorial.org/index.php?title=Scilab/C4/Integration/English&diff=7992&oldid=prevNancyvarkey at 02:34, 22 December 20132013-12-22T02:34:51Z<p></p>
<a href="https://script.spoken-tutorial.org/index.php?title=Scilab/C4/Integration/English&diff=7992&oldid=7897">Show changes</a>Nancyvarkeyhttps://script.spoken-tutorial.org/index.php?title=Scilab/C4/Integration/English&diff=7897&oldid=prevLavitha Pereira at 04:46, 18 December 20132013-12-18T04:46:50Z<p></p>
<a href="https://script.spoken-tutorial.org/index.php?title=Scilab/C4/Integration/English&diff=7897&oldid=4410">Show changes</a>Lavitha Pereirahttps://script.spoken-tutorial.org/index.php?title=Scilab/C4/Integration/English&diff=4410&oldid=prevLavitha Pereira: Created page with ''''Title of script''': Numerical Methods for Integration '''Author: Shamika''' '''Keywords: Integration, Numerical Methods, integral''' {| style="border-spacing:0;" ! <center…'2013-06-13T05:22:30Z<p>Created page with ''''Title of script''': Numerical Methods for Integration '''Author: Shamika''' '''Keywords: Integration, Numerical Methods, integral''' {| style="border-spacing:0;" ! <center…'</p>
<p><b>New page</b></p><div>'''Title of script''': Numerical Methods for Integration<br />
<br />
'''Author: Shamika'''<br />
<br />
'''Keywords: Integration, Numerical Methods, integral'''<br />
<br />
<br />
{| style="border-spacing:0;"<br />
! <center>Visual Cue</center><br />
! <center>Narration</center><br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 1<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Dear Friends,<br />
<br />
Welcome to the Spoken Tutorial on “''' Composite Numerical Integration'''”''' '''<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 2,3 -Learning Objective Slide<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| At the end of this tutorial, you will learn how to: <br />
<br />
* Develop '''Scilab''' code for different '''Composite Numerical Integration algorithms'''<br />
* Divide the''' integral''' into equal '''intervals'''<br />
* Apply the algorithm to each '''interval'''<br />
* Calculate the '''composite value of the integral''' <br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 4-System Requirement slide<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * To record this tutorial, I am using '''Ubuntu 12.04''' as the operating system with '''Scilab 5.3.3''' version <br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 5- Prerequisites slide<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Before practising this tutorial, a learner should have basic knowledge of '''Scilab and Integration using Numerical Methods'''<br />
<br />
* For Scilab, please refer to the relevant tutorials available on the '''Spoken Tutorial '''website. <br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 6- Numerical Integration<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| '''Numerical Integration''' is the:<br />
* Study of how the numerical value of an '''integral '''can be found<br />
* It is used when exact mathematical integration is not available<br />
* It approximates a definite '''integral '''from values of the <br/> '''integrand '''<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 7,8- Composite Trapezoidal Rule-I<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| '''Composite Trapezoidal Rule''' is<br />
<br />
* The extension of '''trapezoidal rule'''<br />
* We divide the interval '''a comma b '''into n equal intervals <br />
* Then,<br />
* '''h equal to b minus a divided by n''' is the common length of the intervals <br />
* Then '''composite trapezoidal rule '''is given by <br/> <nowiki>[</nowiki>'''The integral of the function F of x in the interval a to b is approximately equal to h multiplied by the sum of the values of the function at x zero to x n'''<br/> <br />
<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 9- Example<br />
<br />
<br />
<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Let us solve an example using '''composite trapezoidal rule''':<br />
* Assume the number of intervals n is equal to 10.<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Show the code for Trap_composite.sci on Scilab Editor <br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Let us look at the code for C'''omposite Trapezoidal Rule '''on''' Scilab Editor'''<br />
* We first define the function with parameters''' f , a , b , n. f refers to the function we have to solve, a is the lower limit of the integral, b is the upper limit of the integral and n is the number of intervals. '''<br />
* '''linspace''' function is used to create 10 equal intervals between 0 and 1<br />
* '''We find the value of the integral and store it in I1'''<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Click on Execute on Scilab editor and choose Save and Execute the code<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Click on '''Execute''' on '''Scilab editor''' and choose '''Save and Execute''' the code<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Switch to Scilab Console<br />
<br />
<br />
'''<nowiki>deff ('[y]=f(x)','y=1/(2*x+1)')</nowiki>'''<br />
<br />
<br />
'''Trap_composite(f, 0, 1, 10)'''<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Define the example function by typing:<br />
* '''d e f f open paranthesis open single quote open square bracket y close square bracket is equal to f of x close quote comma open quote y is equal to one by open paranthesis two asterisk x plus one close paranthesis close quote close paranthesis'''<br />
* Press enter<br />
* Type <br />
* '''Trap underscore composite open paranthesis f comma zero comma one comma ten close paranthesis'''<br />
* Press enter<br />
* The answer is displayed on the console<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 10, 11- Composite Simpson's Rule<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| In '''Composite simpson's rule''', we <br />
<br />
* decompose the interval''' '''<nowiki>[a comma b]</nowiki> into '''''n is greater than 1 '''''subintervals of equal length <br />
* Apply '''Simpson's rule''' to each interval<br />
* We get the value of the integral to be<br/> <nowiki>[</nowiki>'''h by 3 multiplied by the sum of f zero, 4 into f one , 2 into f two to f n''']<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 12- Example<br />
<br />
<br />
<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Let us solve an example using '''Composite Simpson's rule'''<br />
* We are given a '''function one by one plus x cube d x in the interval one to two'''<br />
* Let the number of intervals be 20<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Switch to Scilab Editor and show the code for Simp_composite.sci<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Let us look at the code for '''Composite simpson's rule'''<br />
* '''We first define the function with parameters f , a , b , n. '''<br/> '''f refers to the function we have to solve, a is the lower limit of the integral, b is the upper limit of the integral and n is the number of intervals.'''<br />
* We find two sets of points<br />
* We find the value of the function with one set and multiply it with 2<br />
* With the other set we find the value and multiply it with 4<br />
* We sum these values and multiply it with h by 3 and store the final value in I<br />
* Let us execute the code<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Click on Execute and choose<br />
<br />
Save and execute the file<br />
<br />
Simp_composite.sci<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Save and execute the file<br />
* '''Simp underscore composite dot s c i'''<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Switch to Scilab Console<br />
<br />
'''Type '''<br />
<br />
<br />
'''clc'''<br />
<br />
<br />
'''<nowiki>deff ('[y]=f(x)','y=sin*x+sin*(2*x)')</nowiki>'''<br />
<br />
<br />
'''Simp_composite( f, 0, %pi, 20)'''<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Let me clear the screen first.<br />
* Define the function given in the example by typing<br />
* '''<nowiki>[d e f f open paranthesis open single quote open square bracket y close square bracket is equal to f of x close quote comma open quote y is equal to sine asterisk x plus sine asterisk open paranthesis two asterisk x close paranthesis close quote close paranthesis]</nowiki>'''<br />
* Press enter<br />
* '''Type Simp underscore composite open paranthesis f comma one comma two comma twenty close paranthesis'''<br />
* Press enter<br />
* The answer is displayed on the console<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 13, 14- Composite Midpoint Rule<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us now look at '''Composite Midpoint Rule. It'''<br />
* Integrates polynomials of degree one or less<br />
* Divides the interval <nowiki>[ a comma b ]into n subintervals of equal width</nowiki><br />
* Finds the '''midpoint '''of each interval indicated by x i <br />
* We find the sum of the values of the integral at each midpoint <br/> <br />
<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 15- Example<br />
<br />
<br />
<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us solve this problem using '''Composite Midpoint Rule'''<br />
* '''We are given a function one minus x square d x in the interval zero to one point five'''<br />
* We assume n is equal to 20<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Switch to Scilab Editor<br />
<br />
<br />
Show the file mid_composite.sci<br />
<br />
<br />
<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Let us look at the code for '''Composite Midpoint rule'''<br />
* '''We first define the function with parameters f , a , b , n. '''<br/> '''f refers to the function we have to solve, a is the lower limit of the integral, b is the upper limit of the integral and n is the number of intervals.'''<br />
* We find the '''midpoint '''of each interval<br />
* Find the value of '''integral''' at each '''midpoint''' and then find the sum and store it in I. <br />
* Let us now solve the example <br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Click on Execute and choose<br />
<br />
Save and execute the file mid_composite.sci<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Save and execute the file '''mid underscore composite dot s c i '''<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| On the Scilab Console type:<br />
<br />
<br />
'''clc'''<br />
<br />
<br />
'''<nowiki>deff ('[y]=f(x)','y=1-x^2')</nowiki>'''<br />
<br />
<br />
Type '''mid_composite(f, 0, 1.5, 20)'''<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Let me clear the screen<br />
* We define the function given in the example by typing <br />
* '''<nowiki>[d e f f open paranthesis open single quote open square bracket y close square bracket is equal to f of x close quote comma open quote y is equal to one minus x square close quote close paranthesis]</nowiki>'''<br />
* Press enter<br />
* Then type <br/> '''<nowiki>[mid underscore composite open paranthesis f comma zero comma one point five comma twenty close paranthesis]</nowiki>'''<br />
* Press enter<br />
* The answer is displayed on the console<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| Slide 16- Summary<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| Let us summarize this tutorial. In this tutorial we have learnt to:<br />
<br />
* Develop '''Scilab''' code for '''numerical integration'''<br />
* Find the value of an '''integral '''<br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Show Slide 17'''<br />
<br />
'''Title: About the Spoken Tutorial Project''' <br />
<br />
* Watch the video available at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-tutorial.org/What_is_a_Spoken_Tutorial] <br />
<br />
* It summarises the Spoken Tutorial project <br />
<br />
* If you do not have good bandwidth, you can download and watch it <br />
<br />
<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Watch the video available at the following link <br />
<br />
* It summarises the Spoken Tutorial project <br />
<br />
* If you do not have good bandwidth, you can download and watch it <br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Show Slide 18'''<br />
<br />
'''Title: Spoken Tutorial Workshops''' <br />
<br />
The Spoken Tutorial Project Team <br />
<br />
* Conducts workshops using spoken tutorials <br />
<br />
* Gives certificates for those who pass an online test <br />
<br />
* For more details, please write to contact@spoken-tutorial.org <br />
<br />
<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| The Spoken Tutorial Project Team <br />
<br />
* Conducts workshops using spoken tutorials <br />
<br />
* Gives certificates for those who pass an online test <br />
<br />
* For more details, please write to contact at spoken hyphen tutorial dot org <br />
<br />
<br />
<br />
|-<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding:0.097cm;"| '''Show Slide 19'''<br />
<br />
'''Title: Acknowledgement''' <br />
<br />
* Spoken Tutorial Project is a part of the Talk to a Teacher project <br />
<br />
* It is supported by the National Mission on Education through ICT, MHRD, Government of India <br />
<br />
* More information on this Mission is available at <br />
<br />
* [http://spoken-tutorial.org/NMEICT-Intro http://spoken-][http://spoken-tutorial.org/NMEICT-Intro tutorial.org/NMEICT-][http://spoken-tutorial.org/NMEICT-Intro Intro] <br />
<br />
<br />
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding:0.097cm;"| * Spoken Tutorial Project is a part of the Talk to a Teacher project <br />
<br />
* It is supported by the National Mission on Education through ICT, MHRD, Government of India <br />
<br />
* More information on this Mission is available at <br />
<br />
* spoken hyphen tutorial dot org slash NMEICT hyphen Intro <br />
<br />
<br />
<br />
|}</div>Lavitha Pereira