SlideShare a Scribd company logo
Scientific Programming Using Excel
for Beginners: Newton's Method
by
RIZAuddin bin Saian
Faculty of Computer & Mathematical Sciences
Universiti Teknologi MARA (Perlis)
Venue: Lab 1, UiTM Perlis
5 February 2016 (Friday)
3pm
Scientific Programming Using Excel for Beginners: Newton's Method
Problem
• We want to find the root for .
 xfy 
 xfy 
5/2/2016
2
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Objective
• To approximate the root for
using Newton’s method (Newton-Raphson
method)
– Perform Newton’s method by hand.
– Write a VBA code to perform the Newton’s
method.
 xfy 
5/2/2016
3
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Newton’s Method
 
 n
n
nn
xf
xf
xx
'
1 
5/2/2016
4
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Equation of tangent line
      
 
    
 
 
 
 n
n
nn
n
n
nn
nnnn
n
nnnnn
xf
xf
xx
xf
xf
xx
xxxfxf
xxf
xxxfxfxf
'
'
'0
interceptat the0
'
1
1
1
1
11










5/2/2016
5
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Initial Guess of x
Actual root
 xfy 
X
X
x0
(Initial guess)
5/2/2016
6
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Iteration 1
X
Tangent line at x0 = -1
 
 0
0
01
' xf
xf
xx 
X
 xfy 
x0x1
Actual root
(Initial guess)
5/2/2016
7
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Iteration 2
x1
Tangent line at x1
 
 1
1
12
' xf
xf
xx 
X X
 xfy 
x0
Actual root
(Initial guess)
5/2/2016
8
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Example: Find the root.
Actual root
X
x0 = -1
X
5/2/2016
9
http://www.rizauddin.com
  13
 xxxf
Scientific Programming Using Excel for Beginners: Newton's Method
Initial guess of x
  13
 xxxf 
  13'
1
2
3


xxf
xxxf
1
,ofguessInitial
0 x
x
 
 
13
1
'
2
3
1




x
xx
x
xf
xf
xxn
The estimated root,
5/2/2016
10
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Iteration 1
i x xn+1
0 - 1 -1.5
5/2/2016
11
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Iteration 2
i x xn+1
0 - 1 -1.5
1 -1.5 -1.347826087
5/2/2016
12
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Iteration 3
i x xn+1
0 - 1 -1.5
1 -1.5 -1.347826087
2 -1.347826087 -1.325200399
5/2/2016
13
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Iteration 4
i x xn+1
0 - 1 -1.5
1 -1.5 -1.347826087
2 -1.347826087 -1.325200399
3 -1.325200399 -1.324718174
5/2/2016
14
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Iteration 5
i x xn+1
0 - 1 -1.5
1 -1.5 -1.347826087
2 -1.347826087 -1.325200399
3 -1.325200399 -1.324718174
4 -1.324718174 -1.324717957
5/2/2016
15
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Iteration 6
i x xn+1
0 - 1 -1.5
1 -1.5 -1.347826087
2 -1.347826087 -1.325200399
3 -1.325200399 -1.324718174
4 -1.324718174 -1.324717957
5 -1.324717957 -1.324717957
5/2/2016
16
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Iteration 6
i x xn+1
0 - 1 -1.5
1 -1.5 -1.347826087
2 -1.347826087 -1.325200399
3 -1.325200399 -1.324718174
4 -1.324718174 -1.324717957
5 -1.324717957 -1.324717957
STOP!
5/2/2016
17
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Visual Basic for Application (VBA)
Press Alt key and hold. Then, press F11 together to open the VBA Editor.
5/2/2016
18
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Add new Module
5/2/2016
19
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Define a function
5/2/2016
20
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Exercise 1
• Define function Newton with parameter “x”
and return the estimation value for the root of
with x0=-1.  13
 xxxf
5/2/2016
21
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Exercise 1
• Define function Newton with parameter “x”
and return the estimation value for the root of
with x0=-1.  13
 xxxf
5/2/2016
22
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Loop
5/2/2016
23
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Exercise 2
• Modify the Newton function in Ex. 1 to use
loop to calculate the root using 4 iterations.
5/2/2016
24
http://www.rizauddin.com
Scientific Programming Using Excel for Beginners: Newton's Method
Exercise 2
• Modify the Newton function in Ex. 1 to use
loop to calculate the root using 4 iterations.
5/2/2016
25
http://www.rizauddin.com
THANK YOU
www.rizauddin.com
5/2/2016
26
http://www.rizauddin.com

More Related Content

Viewers also liked

Hawaii Pacific GIS Conference 2012: Plenary Session Keynote - Positioning the...
Hawaii Pacific GIS Conference 2012: Plenary Session Keynote - Positioning the...Hawaii Pacific GIS Conference 2012: Plenary Session Keynote - Positioning the...
Hawaii Pacific GIS Conference 2012: Plenary Session Keynote - Positioning the...
Hawaii Geographic Information Coordinating Council
 
Great Writing Starts Here
Great Writing Starts HereGreat Writing Starts Here
Great Writing Starts Here
Anthony Paine
 
Explore new dimensions with MapInfo Vertical Mapper
Explore new dimensions with MapInfo Vertical Mapper Explore new dimensions with MapInfo Vertical Mapper
Explore new dimensions with MapInfo Vertical Mapper
DataMap Europe Ltd.
 
Programming inexcelvba anintroduction
Programming inexcelvba anintroductionProgramming inexcelvba anintroduction
Programming inexcelvba anintroduction
Ofun Emma
 
7 geographic concepts
7 geographic concepts7 geographic concepts
7 geographic concepts
Anthony Paine
 
Exploration and 3D GIS Software - MapInfo Professional Discover3D 2015
Exploration and 3D GIS Software - MapInfo Professional Discover3D 2015Exploration and 3D GIS Software - MapInfo Professional Discover3D 2015
Exploration and 3D GIS Software - MapInfo Professional Discover3D 2015
Prakher Hajela Saxena
 
Projections Eps
Projections EpsProjections Eps
Projections Eps
esambale
 
Mapserver vs. geoserver
Mapserver vs. geoserverMapserver vs. geoserver
Mapserver vs. geoserver
鸣 饶
 
Gis Concepts 3/5
Gis Concepts 3/5Gis Concepts 3/5
Gis Concepts 3/5
CIER Facultad de Agronomía
 
SIM Card Overview
SIM Card OverviewSIM Card Overview
SIM Card Overview
Carlos Enrique Ortiz
 
Fortran 95
Fortran 95Fortran 95
Fortran 95
Zaahir Salam
 
Introduction to iso 9001
Introduction to iso 9001 Introduction to iso 9001
Introduction to iso 9001
norsaidatul_akmar
 
Fortran introduction
Fortran introductionFortran introduction
Fortran introduction
santhosh833
 
The new ISO 9001:2015
The new ISO 9001:2015The new ISO 9001:2015
The new ISO 9001:2015
Reza Seifollahy
 
Ppt on ms excel
Ppt on ms excelPpt on ms excel
Ppt on ms excel
Govind Mandloi
 

Viewers also liked (15)

Hawaii Pacific GIS Conference 2012: Plenary Session Keynote - Positioning the...
Hawaii Pacific GIS Conference 2012: Plenary Session Keynote - Positioning the...Hawaii Pacific GIS Conference 2012: Plenary Session Keynote - Positioning the...
Hawaii Pacific GIS Conference 2012: Plenary Session Keynote - Positioning the...
 
Great Writing Starts Here
Great Writing Starts HereGreat Writing Starts Here
Great Writing Starts Here
 
Explore new dimensions with MapInfo Vertical Mapper
Explore new dimensions with MapInfo Vertical Mapper Explore new dimensions with MapInfo Vertical Mapper
Explore new dimensions with MapInfo Vertical Mapper
 
Programming inexcelvba anintroduction
Programming inexcelvba anintroductionProgramming inexcelvba anintroduction
Programming inexcelvba anintroduction
 
7 geographic concepts
7 geographic concepts7 geographic concepts
7 geographic concepts
 
Exploration and 3D GIS Software - MapInfo Professional Discover3D 2015
Exploration and 3D GIS Software - MapInfo Professional Discover3D 2015Exploration and 3D GIS Software - MapInfo Professional Discover3D 2015
Exploration and 3D GIS Software - MapInfo Professional Discover3D 2015
 
Projections Eps
Projections EpsProjections Eps
Projections Eps
 
Mapserver vs. geoserver
Mapserver vs. geoserverMapserver vs. geoserver
Mapserver vs. geoserver
 
Gis Concepts 3/5
Gis Concepts 3/5Gis Concepts 3/5
Gis Concepts 3/5
 
SIM Card Overview
SIM Card OverviewSIM Card Overview
SIM Card Overview
 
Fortran 95
Fortran 95Fortran 95
Fortran 95
 
Introduction to iso 9001
Introduction to iso 9001 Introduction to iso 9001
Introduction to iso 9001
 
Fortran introduction
Fortran introductionFortran introduction
Fortran introduction
 
The new ISO 9001:2015
The new ISO 9001:2015The new ISO 9001:2015
The new ISO 9001:2015
 
Ppt on ms excel
Ppt on ms excelPpt on ms excel
Ppt on ms excel
 

Similar to Scientific Programming using Excel for Beginners: Newton's Method

Scientific programming using Excel VBA for beginners
Scientific programming using Excel VBA for beginnersScientific programming using Excel VBA for beginners
Scientific programming using Excel VBA for beginners
Rizauddin Saian
 
Handout of course information.
Handout of course information.Handout of course information.
Handout of course information.
butest
 
2021 ME.pdf
2021 ME.pdf2021 ME.pdf
2021 ME.pdf
RamalingamPriya1
 
Result generation system for cbgs scheme in educational organization
Result generation system for cbgs scheme in educational organizationResult generation system for cbgs scheme in educational organization
Result generation system for cbgs scheme in educational organization
eSAT Journals
 
Data Wrangling Week 7
Data Wrangling Week 7Data Wrangling Week 7
Data Wrangling Week 7
Ferdin Joe John Joseph PhD
 
Demonstration on extending_the_pageview_feature_to_page_section_based_present...
Demonstration on extending_the_pageview_feature_to_page_section_based_present...Demonstration on extending_the_pageview_feature_to_page_section_based_present...
Demonstration on extending_the_pageview_feature_to_page_section_based_present...
Fajar Purnama
 
OKE2018 Challenge @ ESWC2018
OKE2018 Challenge @ ESWC2018OKE2018 Challenge @ ESWC2018
OKE2018 Challenge @ ESWC2018
Holistic Benchmarking of Big Linked Data
 
Algebra 1 - EOC Practice Test
Algebra 1 - EOC Practice TestAlgebra 1 - EOC Practice Test
Algebra 1 - EOC Practice Test
swartzje
 
IRJET- Ontology based E-Learning System for Undergraduate Students using FPN ...
IRJET- Ontology based E-Learning System for Undergraduate Students using FPN ...IRJET- Ontology based E-Learning System for Undergraduate Students using FPN ...
IRJET- Ontology based E-Learning System for Undergraduate Students using FPN ...
IRJET Journal
 
X++ advanced course
X++ advanced courseX++ advanced course
X++ advanced course
Alvin You
 
TNA taxonomies 20160525
TNA taxonomies 20160525TNA taxonomies 20160525
TNA taxonomies 20160525
Jeremie Charlet
 
0417_Scheme_of_Work_for_examination_from_2017.pdf
0417_Scheme_of_Work_for_examination_from_2017.pdf0417_Scheme_of_Work_for_examination_from_2017.pdf
0417_Scheme_of_Work_for_examination_from_2017.pdf
EmmanuelKTetteh2
 
IRJET- Stabilization of Black Cotton Soil using Rice Husk Ash and Lime
IRJET- Stabilization of Black Cotton Soil using Rice Husk Ash and LimeIRJET- Stabilization of Black Cotton Soil using Rice Husk Ash and Lime
IRJET- Stabilization of Black Cotton Soil using Rice Husk Ash and Lime
IRJET Journal
 
IRJET- Student Placement Prediction using Machine Learning
IRJET- Student Placement Prediction using Machine LearningIRJET- Student Placement Prediction using Machine Learning
IRJET- Student Placement Prediction using Machine Learning
IRJET Journal
 
Online Attendance System
Online Attendance SystemOnline Attendance System
Online Attendance System
Akash Kr Sinha
 
Extract and Analyze Data from PDF File and Web : A Review
Extract and Analyze Data from PDF File and Web : A ReviewExtract and Analyze Data from PDF File and Web : A Review
Extract and Analyze Data from PDF File and Web : A Review
IRJET Journal
 
Automatic Question Paper Generator System
Automatic Question Paper Generator SystemAutomatic Question Paper Generator System
Automatic Question Paper Generator System
ijtsrd
 
06 e-sat including data management and use of results
06 e-sat including data management and use of results06 e-sat including data management and use of results
06 e-sat including data management and use of results
Maxine Carbonell
 
Electronic Self-assessment Tool (e-SAT)
Electronic Self-assessmentTool (e-SAT)Electronic Self-assessmentTool (e-SAT)
Electronic Self-assessment Tool (e-SAT)
Bakakeng National High School
 
Electronic-Self-assessment-Tool-e-SAT.pptx
Electronic-Self-assessment-Tool-e-SAT.pptxElectronic-Self-assessment-Tool-e-SAT.pptx
Electronic-Self-assessment-Tool-e-SAT.pptx
maeapalit
 

Similar to Scientific Programming using Excel for Beginners: Newton's Method (20)

Scientific programming using Excel VBA for beginners
Scientific programming using Excel VBA for beginnersScientific programming using Excel VBA for beginners
Scientific programming using Excel VBA for beginners
 
Handout of course information.
Handout of course information.Handout of course information.
Handout of course information.
 
2021 ME.pdf
2021 ME.pdf2021 ME.pdf
2021 ME.pdf
 
Result generation system for cbgs scheme in educational organization
Result generation system for cbgs scheme in educational organizationResult generation system for cbgs scheme in educational organization
Result generation system for cbgs scheme in educational organization
 
Data Wrangling Week 7
Data Wrangling Week 7Data Wrangling Week 7
Data Wrangling Week 7
 
Demonstration on extending_the_pageview_feature_to_page_section_based_present...
Demonstration on extending_the_pageview_feature_to_page_section_based_present...Demonstration on extending_the_pageview_feature_to_page_section_based_present...
Demonstration on extending_the_pageview_feature_to_page_section_based_present...
 
OKE2018 Challenge @ ESWC2018
OKE2018 Challenge @ ESWC2018OKE2018 Challenge @ ESWC2018
OKE2018 Challenge @ ESWC2018
 
Algebra 1 - EOC Practice Test
Algebra 1 - EOC Practice TestAlgebra 1 - EOC Practice Test
Algebra 1 - EOC Practice Test
 
IRJET- Ontology based E-Learning System for Undergraduate Students using FPN ...
IRJET- Ontology based E-Learning System for Undergraduate Students using FPN ...IRJET- Ontology based E-Learning System for Undergraduate Students using FPN ...
IRJET- Ontology based E-Learning System for Undergraduate Students using FPN ...
 
X++ advanced course
X++ advanced courseX++ advanced course
X++ advanced course
 
TNA taxonomies 20160525
TNA taxonomies 20160525TNA taxonomies 20160525
TNA taxonomies 20160525
 
0417_Scheme_of_Work_for_examination_from_2017.pdf
0417_Scheme_of_Work_for_examination_from_2017.pdf0417_Scheme_of_Work_for_examination_from_2017.pdf
0417_Scheme_of_Work_for_examination_from_2017.pdf
 
IRJET- Stabilization of Black Cotton Soil using Rice Husk Ash and Lime
IRJET- Stabilization of Black Cotton Soil using Rice Husk Ash and LimeIRJET- Stabilization of Black Cotton Soil using Rice Husk Ash and Lime
IRJET- Stabilization of Black Cotton Soil using Rice Husk Ash and Lime
 
IRJET- Student Placement Prediction using Machine Learning
IRJET- Student Placement Prediction using Machine LearningIRJET- Student Placement Prediction using Machine Learning
IRJET- Student Placement Prediction using Machine Learning
 
Online Attendance System
Online Attendance SystemOnline Attendance System
Online Attendance System
 
Extract and Analyze Data from PDF File and Web : A Review
Extract and Analyze Data from PDF File and Web : A ReviewExtract and Analyze Data from PDF File and Web : A Review
Extract and Analyze Data from PDF File and Web : A Review
 
Automatic Question Paper Generator System
Automatic Question Paper Generator SystemAutomatic Question Paper Generator System
Automatic Question Paper Generator System
 
06 e-sat including data management and use of results
06 e-sat including data management and use of results06 e-sat including data management and use of results
06 e-sat including data management and use of results
 
Electronic Self-assessment Tool (e-SAT)
Electronic Self-assessmentTool (e-SAT)Electronic Self-assessmentTool (e-SAT)
Electronic Self-assessment Tool (e-SAT)
 
Electronic-Self-assessment-Tool-e-SAT.pptx
Electronic-Self-assessment-Tool-e-SAT.pptxElectronic-Self-assessment-Tool-e-SAT.pptx
Electronic-Self-assessment-Tool-e-SAT.pptx
 

Recently uploaded

BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
Prof. Dr. K. Adisesha
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
blueshagoo1
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
Celine George
 
Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.
IsmaelVazquez38
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 

Recently uploaded (20)

BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
 
Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 

Scientific Programming using Excel for Beginners: Newton's Method

  • 1. Scientific Programming Using Excel for Beginners: Newton's Method by RIZAuddin bin Saian Faculty of Computer & Mathematical Sciences Universiti Teknologi MARA (Perlis) Venue: Lab 1, UiTM Perlis 5 February 2016 (Friday) 3pm
  • 2. Scientific Programming Using Excel for Beginners: Newton's Method Problem • We want to find the root for .  xfy   xfy  5/2/2016 2 http://www.rizauddin.com
  • 3. Scientific Programming Using Excel for Beginners: Newton's Method Objective • To approximate the root for using Newton’s method (Newton-Raphson method) – Perform Newton’s method by hand. – Write a VBA code to perform the Newton’s method.  xfy  5/2/2016 3 http://www.rizauddin.com
  • 4. Scientific Programming Using Excel for Beginners: Newton's Method Newton’s Method    n n nn xf xf xx ' 1  5/2/2016 4 http://www.rizauddin.com
  • 5. Scientific Programming Using Excel for Beginners: Newton's Method Equation of tangent line                      n n nn n n nn nnnn n nnnnn xf xf xx xf xf xx xxxfxf xxf xxxfxfxf ' ' '0 interceptat the0 ' 1 1 1 1 11           5/2/2016 5 http://www.rizauddin.com
  • 6. Scientific Programming Using Excel for Beginners: Newton's Method Initial Guess of x Actual root  xfy  X X x0 (Initial guess) 5/2/2016 6 http://www.rizauddin.com
  • 7. Scientific Programming Using Excel for Beginners: Newton's Method Iteration 1 X Tangent line at x0 = -1    0 0 01 ' xf xf xx  X  xfy  x0x1 Actual root (Initial guess) 5/2/2016 7 http://www.rizauddin.com
  • 8. Scientific Programming Using Excel for Beginners: Newton's Method Iteration 2 x1 Tangent line at x1    1 1 12 ' xf xf xx  X X  xfy  x0 Actual root (Initial guess) 5/2/2016 8 http://www.rizauddin.com
  • 9. Scientific Programming Using Excel for Beginners: Newton's Method Example: Find the root. Actual root X x0 = -1 X 5/2/2016 9 http://www.rizauddin.com   13  xxxf
  • 10. Scientific Programming Using Excel for Beginners: Newton's Method Initial guess of x   13  xxxf    13' 1 2 3   xxf xxxf 1 ,ofguessInitial 0 x x     13 1 ' 2 3 1     x xx x xf xf xxn The estimated root, 5/2/2016 10 http://www.rizauddin.com
  • 11. Scientific Programming Using Excel for Beginners: Newton's Method Iteration 1 i x xn+1 0 - 1 -1.5 5/2/2016 11 http://www.rizauddin.com
  • 12. Scientific Programming Using Excel for Beginners: Newton's Method Iteration 2 i x xn+1 0 - 1 -1.5 1 -1.5 -1.347826087 5/2/2016 12 http://www.rizauddin.com
  • 13. Scientific Programming Using Excel for Beginners: Newton's Method Iteration 3 i x xn+1 0 - 1 -1.5 1 -1.5 -1.347826087 2 -1.347826087 -1.325200399 5/2/2016 13 http://www.rizauddin.com
  • 14. Scientific Programming Using Excel for Beginners: Newton's Method Iteration 4 i x xn+1 0 - 1 -1.5 1 -1.5 -1.347826087 2 -1.347826087 -1.325200399 3 -1.325200399 -1.324718174 5/2/2016 14 http://www.rizauddin.com
  • 15. Scientific Programming Using Excel for Beginners: Newton's Method Iteration 5 i x xn+1 0 - 1 -1.5 1 -1.5 -1.347826087 2 -1.347826087 -1.325200399 3 -1.325200399 -1.324718174 4 -1.324718174 -1.324717957 5/2/2016 15 http://www.rizauddin.com
  • 16. Scientific Programming Using Excel for Beginners: Newton's Method Iteration 6 i x xn+1 0 - 1 -1.5 1 -1.5 -1.347826087 2 -1.347826087 -1.325200399 3 -1.325200399 -1.324718174 4 -1.324718174 -1.324717957 5 -1.324717957 -1.324717957 5/2/2016 16 http://www.rizauddin.com
  • 17. Scientific Programming Using Excel for Beginners: Newton's Method Iteration 6 i x xn+1 0 - 1 -1.5 1 -1.5 -1.347826087 2 -1.347826087 -1.325200399 3 -1.325200399 -1.324718174 4 -1.324718174 -1.324717957 5 -1.324717957 -1.324717957 STOP! 5/2/2016 17 http://www.rizauddin.com
  • 18. Scientific Programming Using Excel for Beginners: Newton's Method Visual Basic for Application (VBA) Press Alt key and hold. Then, press F11 together to open the VBA Editor. 5/2/2016 18 http://www.rizauddin.com
  • 19. Scientific Programming Using Excel for Beginners: Newton's Method Add new Module 5/2/2016 19 http://www.rizauddin.com
  • 20. Scientific Programming Using Excel for Beginners: Newton's Method Define a function 5/2/2016 20 http://www.rizauddin.com
  • 21. Scientific Programming Using Excel for Beginners: Newton's Method Exercise 1 • Define function Newton with parameter “x” and return the estimation value for the root of with x0=-1.  13  xxxf 5/2/2016 21 http://www.rizauddin.com
  • 22. Scientific Programming Using Excel for Beginners: Newton's Method Exercise 1 • Define function Newton with parameter “x” and return the estimation value for the root of with x0=-1.  13  xxxf 5/2/2016 22 http://www.rizauddin.com
  • 23. Scientific Programming Using Excel for Beginners: Newton's Method Loop 5/2/2016 23 http://www.rizauddin.com
  • 24. Scientific Programming Using Excel for Beginners: Newton's Method Exercise 2 • Modify the Newton function in Ex. 1 to use loop to calculate the root using 4 iterations. 5/2/2016 24 http://www.rizauddin.com
  • 25. Scientific Programming Using Excel for Beginners: Newton's Method Exercise 2 • Modify the Newton function in Ex. 1 to use loop to calculate the root using 4 iterations. 5/2/2016 25 http://www.rizauddin.com