際際滷

際際滷Share a Scribd company logo
C│lculo de la ra┴z de una ecuaci┏n no lineal mediante el M└todo Num└rico de la Bisecci┏n
Utilizando macros de VBA de Excel
Ing. N└stor Augusto Oyarce Linares
naoyarcel@gmail.com
aBiseccionGrafica - 1
Option Explicit
Sub XY_10_Dic_2020_3()
Dim X As Double, Y As Double, i As Integer, X1 As Double, X0 As Double, XX As Double
Dim Err As Double, YD As Double, j As Integer, gx0 As Double, gx As Double
'M└todo Num└rico de BISECCI┏N
'10 de Diciembre de 2020, ejercicio 3
Cells.Clear
Cells(1, 1).Value = " ECUACION : "
Cells(3, 1).Value = " X^3+2*X^2+10*X-20"
Cells(1, 2).Value = " ENSAYOS : "
Cells(3, 2).Value = " X "
Cells(3, 3).Value = " Y "
For i = 1 To 10
X = 1 + i / 10
Y = (X) ^ (3) + 2 * (X) ^ (2) + 10 * X - 20
Cells(i + 3, 2).Value = X
Cells(i + 3, 3).Value = Y
If Y > 0 Then Exit For
Next i
End Sub
Sub Crea_grafico()
Dim grafico As ChartObject
Dim wks As Worksheet
Set wks = ActiveWorkbook.Sheets("Hoja1")
Set grafico = wks.ChartObjects.Add(Left:=400, Width:=450, Top:=50, Height:=200)
grafico.Name = "Grafico_1"
grafico.Chart.ChartType = xlXYScatterSmoothNoMarkers
grafico.Chart.SetSourceData Source:=wks.Range("B4:D15")
End Sub
' Ing. N└stor Augusto Oyarce Linares
ECUACION : ENSAYOS :
X^3+2*X^2+10*X-20 X Y
1.1 -5.249
1.2 -3.392
1.3 -1.423
1.4 0.664
-6
-5
-4
-3
-2
-1
0
1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
Series1
Series2
bBiseccionCalculo - 1
Option Explicit
Sub Parte2_Biseccion()
Dim Xa As Double, Ya As Double, i As Integer, Xb As Double, Xm As Double, Yb As Double
Dim Error As Double, Ym As Double, j As Integer, X As Double, Y As Double
Cells.Clear
Cells(1, 1).Value = "M└todo Num└rico de la Biseccion"
Cells(2, 2).Value = "Valor de X"
Cells(2, 3).Value = "Valor de Y"
Cells(2, 5).Value = " Xf "
Cells(2, 6).Value = " Yf "
Cells(2, 7).Value = "Iteraciones"
Xa = 1.3
Xb = 1.4
For j = 1 To 20
Xm = (Xa + Xb) / 2
Ya = (Xa) ^ (3) + 2 * (Xa) ^ (2) + 10 * Xa - 20
Yb = (Xb) ^ (3) + 2 * (Xb) ^ (2) + 10 * Xb - 20
Ym = (Xm) ^ (3) + 2 * (Xm) ^ (2) + 10 * Xm - 20
If Ya * Ym < 0 Then Xb = Xm Else Xa = Xm
Error = Abs(Xa - Xb)
Cells(j + 3, 2).Value = Xm
Cells(j + 3, 3).Value = Ym
If Error <= 0.000001 Then Exit For
Next j
X = Xm
Y = X ^ (3) + 2 * X ^ (2) + 10 * X - 20
Cells(4, 5).Value = X
Cells(4, 6).Value = Y
Cells(4, 7).Value = j
Range("E1", "E4").Font.Bold = True
Range("E1", "E4").Font.Color = RGB(8, 44, 196)
Cells.EntireColumn.AutoFit
End Sub
' Ing. N└stor Augusto Oyarce Linares
M└todo Num└rico de la Biseccion
Valor de X Valor de Y Xf Yf Iteraciones
1.35 -0.394625 1.368808746 1.34702E-05 17
1.375 0.130859375
1.3625 -0.132833984
1.36875 -0.00122583
1.371875 0.06475705
1.3703125 0.03175069
1.36953125 0.015258702
1.369140625 0.007015504
1.368945313 0.002894604
1.368847656 0.000834329
1.368798828 -0.000195765
1.368823242 0.000319278
1.368811035 6.17555E-05
1.368804932 -6.70051E-05
1.368807983 -2.62484E-06
1.368809509 2.95653E-05
1.368808746 1.34702E-05
Ad

Recommended

0.0. secante modificada
0.0. secante modificada
Agua SAC
?
0.0. falsa posicion-naol
0.0. falsa posicion-naol
Agua SAC
?
0.0. punto fijo
0.0. punto fijo
Agua SAC
?
Engr 371 final exam december 1997
Engr 371 final exam december 1997
amnesiann
?
DQ
DQ
guest50cf77
?
11 X1 T01 03 factorising (2010)
11 X1 T01 03 factorising (2010)
Nigel Simmons
?
2008.12.10
2008.12.10
xoanon
?
0.0. secante naol
0.0. secante naol
Agua SAC
?
0.0. steffensen.naol
0.0. steffensen.naol
Agua SAC
?
ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)
CrackDSE
?
bobok
bobok
Adi Pandarangga
?
ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)
CrackDSE
?
4th semester Computer Science and Information Science Engg (2013 December) Qu...
4th semester Computer Science and Information Science Engg (2013 December) Qu...
BGS Institute of Technology, Adichunchanagiri University (ACU)
?
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov Vyacheslav
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov Vyacheslav
Vyacheslav Arbuzov
?
Introduction to matlab
Introduction to matlab
krishna_093
?
Arrays
Arrays
Komal Singh
?
4th Semester (July-2016) Civil Engineering Question Paper
4th Semester (July-2016) Civil Engineering Question Paper
BGS Institute of Technology, Adichunchanagiri University (ACU)
?
4th Semeste Electronics and Communication Engineering (June-2016) Question Pa...
4th Semeste Electronics and Communication Engineering (June-2016) Question Pa...
BGS Institute of Technology, Adichunchanagiri University (ACU)
?
Lp.pps [??????????????????]
Lp.pps [??????????????????]
chalompon
?
Math cbse samplepaper
Math cbse samplepaper
Pratima Nayak ,Kendriya Vidyalaya Sangathan
?
138191 rvsp lecture notes
138191 rvsp lecture notes
Ahmed Tayeh
?
Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...
Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...
Nish Kala Devi
?
Precalculus 1 chapter 1
Precalculus 1 chapter 1
oreves
?
C++ ammar .s.q
C++ ammar .s.q
ammarsalem5
?
ゲ`ム尖BASIC 及36指 -A?住h鹿栽-
ゲ`ム尖BASIC 及36指 -A?住h鹿栽-
ssusere0a682
?
Cbse Class 12 Maths Sample Paper 2012
Cbse Class 12 Maths Sample Paper 2012
Sunaina Rawat
?
DurbinWatsonVBA
DurbinWatsonVBA
Jeremy Lane
?
Guess paper x
Guess paper x
Humaira Ahmed
?
0.0. newton raphson
0.0. newton raphson
Agua SAC
?
Publi 05.03.2015
Agua SAC
?

More Related Content

Similar to 0.0. biseccion (20)

0.0. steffensen.naol
0.0. steffensen.naol
Agua SAC
?
ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)
CrackDSE
?
bobok
bobok
Adi Pandarangga
?
ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)
CrackDSE
?
4th semester Computer Science and Information Science Engg (2013 December) Qu...
4th semester Computer Science and Information Science Engg (2013 December) Qu...
BGS Institute of Technology, Adichunchanagiri University (ACU)
?
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov Vyacheslav
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov Vyacheslav
Vyacheslav Arbuzov
?
Introduction to matlab
Introduction to matlab
krishna_093
?
Arrays
Arrays
Komal Singh
?
4th Semester (July-2016) Civil Engineering Question Paper
4th Semester (July-2016) Civil Engineering Question Paper
BGS Institute of Technology, Adichunchanagiri University (ACU)
?
4th Semeste Electronics and Communication Engineering (June-2016) Question Pa...
4th Semeste Electronics and Communication Engineering (June-2016) Question Pa...
BGS Institute of Technology, Adichunchanagiri University (ACU)
?
Lp.pps [??????????????????]
Lp.pps [??????????????????]
chalompon
?
Math cbse samplepaper
Math cbse samplepaper
Pratima Nayak ,Kendriya Vidyalaya Sangathan
?
138191 rvsp lecture notes
138191 rvsp lecture notes
Ahmed Tayeh
?
Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...
Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...
Nish Kala Devi
?
Precalculus 1 chapter 1
Precalculus 1 chapter 1
oreves
?
C++ ammar .s.q
C++ ammar .s.q
ammarsalem5
?
ゲ`ム尖BASIC 及36指 -A?住h鹿栽-
ゲ`ム尖BASIC 及36指 -A?住h鹿栽-
ssusere0a682
?
Cbse Class 12 Maths Sample Paper 2012
Cbse Class 12 Maths Sample Paper 2012
Sunaina Rawat
?
DurbinWatsonVBA
DurbinWatsonVBA
Jeremy Lane
?
Guess paper x
Guess paper x
Humaira Ahmed
?
0.0. steffensen.naol
0.0. steffensen.naol
Agua SAC
?
ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)
CrackDSE
?
ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)
CrackDSE
?
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov Vyacheslav
Seminar PSU 09.04.2013 - 10.04.2013 MiFIT, Arbuzov Vyacheslav
Vyacheslav Arbuzov
?
Introduction to matlab
Introduction to matlab
krishna_093
?
Lp.pps [??????????????????]
Lp.pps [??????????????????]
chalompon
?
138191 rvsp lecture notes
138191 rvsp lecture notes
Ahmed Tayeh
?
Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...
Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...
Nish Kala Devi
?
Precalculus 1 chapter 1
Precalculus 1 chapter 1
oreves
?
ゲ`ム尖BASIC 及36指 -A?住h鹿栽-
ゲ`ム尖BASIC 及36指 -A?住h鹿栽-
ssusere0a682
?
Cbse Class 12 Maths Sample Paper 2012
Cbse Class 12 Maths Sample Paper 2012
Sunaina Rawat
?

More from Agua SAC (6)

0.0. newton raphson
0.0. newton raphson
Agua SAC
?
Publi 05.03.2015
Agua SAC
?
Trapecio tarea 1
Agua SAC
?
Sistema informaci┏n geografica y dengue
Agua SAC
?
Ejercicio amp2 naol
Agua SAC
?
Ejercicio amp2 naol
Agua SAC
?
0.0. newton raphson
0.0. newton raphson
Agua SAC
?
Publi 05.03.2015
Agua SAC
?
Trapecio tarea 1
Agua SAC
?
Sistema informaci┏n geografica y dengue
Agua SAC
?
Ejercicio amp2 naol
Agua SAC
?
Ejercicio amp2 naol
Agua SAC
?
Ad

Recently uploaded (20)

Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
?
????? ???? ????? ??? ?? ???? ??? ???????
????? ???? ????? ??? ?? ???? ??? ???????
???? ??? ?????
?
retina_biometrics ruet rajshahi bangdesh.pptx
retina_biometrics ruet rajshahi bangdesh.pptx
MdRakibulIslam697135
?
Bitumen Emulsion by Dr Sangita Ex CRRI Delhi
Bitumen Emulsion by Dr Sangita Ex CRRI Delhi
grilcodes
?
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
Mark Billinghurst
?
Structural Wonderers_new and ancient.pptx
Structural Wonderers_new and ancient.pptx
nikopapa113
?
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
resming1
?
AI_Presentation (1). Artificial intelligence
AI_Presentation (1). Artificial intelligence
RoselynKaur8thD34
?
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
resming1
?
NEW Strengthened Senior High School Gen Math.pptx
NEW Strengthened Senior High School Gen Math.pptx
DaryllWhere
?
Validating a Citizen Observatories enabling Platform by completing a Citizen ...
Validating a Citizen Observatories enabling Platform by completing a Citizen ...
Diego L┏pez-de-Ipi?a Gonz│lez-de-Artaza
?
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
AlqualsaDIResearchGr
?
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
?
Data Structures Module 3 Binary Trees Binary Search Trees Tree Traversals AVL...
Data Structures Module 3 Binary Trees Binary Search Trees Tree Traversals AVL...
resming1
?
special_edition_using_visual_foxpro_6.pdf
special_edition_using_visual_foxpro_6.pdf
Shabista Imam
?
Complete University of Calculus :: 2nd edition
Complete University of Calculus :: 2nd edition
Shabista Imam
?
Industrial internet of things IOT Week-3.pptx
Industrial internet of things IOT Week-3.pptx
KNaveenKumarECE
?
International Journal of Advanced Information Technology (IJAIT)
International Journal of Advanced Information Technology (IJAIT)
ijait
?
Modern multi-proposer consensus implementations
Modern multi-proposer consensus implementations
Fran?ois Garillot
?
Introduction to sensing and Week-1.pptx
Introduction to sensing and Week-1.pptx
KNaveenKumarECE
?
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
?
????? ???? ????? ??? ?? ???? ??? ???????
????? ???? ????? ??? ?? ???? ??? ???????
???? ??? ?????
?
retina_biometrics ruet rajshahi bangdesh.pptx
retina_biometrics ruet rajshahi bangdesh.pptx
MdRakibulIslam697135
?
Bitumen Emulsion by Dr Sangita Ex CRRI Delhi
Bitumen Emulsion by Dr Sangita Ex CRRI Delhi
grilcodes
?
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
Mark Billinghurst
?
Structural Wonderers_new and ancient.pptx
Structural Wonderers_new and ancient.pptx
nikopapa113
?
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
resming1
?
AI_Presentation (1). Artificial intelligence
AI_Presentation (1). Artificial intelligence
RoselynKaur8thD34
?
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
resming1
?
NEW Strengthened Senior High School Gen Math.pptx
NEW Strengthened Senior High School Gen Math.pptx
DaryllWhere
?
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
AlqualsaDIResearchGr
?
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
?
Data Structures Module 3 Binary Trees Binary Search Trees Tree Traversals AVL...
Data Structures Module 3 Binary Trees Binary Search Trees Tree Traversals AVL...
resming1
?
special_edition_using_visual_foxpro_6.pdf
special_edition_using_visual_foxpro_6.pdf
Shabista Imam
?
Complete University of Calculus :: 2nd edition
Complete University of Calculus :: 2nd edition
Shabista Imam
?
Industrial internet of things IOT Week-3.pptx
Industrial internet of things IOT Week-3.pptx
KNaveenKumarECE
?
International Journal of Advanced Information Technology (IJAIT)
International Journal of Advanced Information Technology (IJAIT)
ijait
?
Modern multi-proposer consensus implementations
Modern multi-proposer consensus implementations
Fran?ois Garillot
?
Introduction to sensing and Week-1.pptx
Introduction to sensing and Week-1.pptx
KNaveenKumarECE
?
Ad

0.0. biseccion

  • 1. C│lculo de la ra┴z de una ecuaci┏n no lineal mediante el M└todo Num└rico de la Bisecci┏n Utilizando macros de VBA de Excel Ing. N└stor Augusto Oyarce Linares naoyarcel@gmail.com
  • 2. aBiseccionGrafica - 1 Option Explicit Sub XY_10_Dic_2020_3() Dim X As Double, Y As Double, i As Integer, X1 As Double, X0 As Double, XX As Double Dim Err As Double, YD As Double, j As Integer, gx0 As Double, gx As Double 'M└todo Num└rico de BISECCI┏N '10 de Diciembre de 2020, ejercicio 3 Cells.Clear Cells(1, 1).Value = " ECUACION : " Cells(3, 1).Value = " X^3+2*X^2+10*X-20" Cells(1, 2).Value = " ENSAYOS : " Cells(3, 2).Value = " X " Cells(3, 3).Value = " Y " For i = 1 To 10 X = 1 + i / 10 Y = (X) ^ (3) + 2 * (X) ^ (2) + 10 * X - 20 Cells(i + 3, 2).Value = X Cells(i + 3, 3).Value = Y If Y > 0 Then Exit For Next i End Sub Sub Crea_grafico() Dim grafico As ChartObject Dim wks As Worksheet Set wks = ActiveWorkbook.Sheets("Hoja1") Set grafico = wks.ChartObjects.Add(Left:=400, Width:=450, Top:=50, Height:=200) grafico.Name = "Grafico_1" grafico.Chart.ChartType = xlXYScatterSmoothNoMarkers grafico.Chart.SetSourceData Source:=wks.Range("B4:D15") End Sub ' Ing. N└stor Augusto Oyarce Linares
  • 3. ECUACION : ENSAYOS : X^3+2*X^2+10*X-20 X Y 1.1 -5.249 1.2 -3.392 1.3 -1.423 1.4 0.664 -6 -5 -4 -3 -2 -1 0 1 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 Series1 Series2
  • 4. bBiseccionCalculo - 1 Option Explicit Sub Parte2_Biseccion() Dim Xa As Double, Ya As Double, i As Integer, Xb As Double, Xm As Double, Yb As Double Dim Error As Double, Ym As Double, j As Integer, X As Double, Y As Double Cells.Clear Cells(1, 1).Value = "M└todo Num└rico de la Biseccion" Cells(2, 2).Value = "Valor de X" Cells(2, 3).Value = "Valor de Y" Cells(2, 5).Value = " Xf " Cells(2, 6).Value = " Yf " Cells(2, 7).Value = "Iteraciones" Xa = 1.3 Xb = 1.4 For j = 1 To 20 Xm = (Xa + Xb) / 2 Ya = (Xa) ^ (3) + 2 * (Xa) ^ (2) + 10 * Xa - 20 Yb = (Xb) ^ (3) + 2 * (Xb) ^ (2) + 10 * Xb - 20 Ym = (Xm) ^ (3) + 2 * (Xm) ^ (2) + 10 * Xm - 20 If Ya * Ym < 0 Then Xb = Xm Else Xa = Xm Error = Abs(Xa - Xb) Cells(j + 3, 2).Value = Xm Cells(j + 3, 3).Value = Ym If Error <= 0.000001 Then Exit For Next j X = Xm Y = X ^ (3) + 2 * X ^ (2) + 10 * X - 20 Cells(4, 5).Value = X Cells(4, 6).Value = Y Cells(4, 7).Value = j Range("E1", "E4").Font.Bold = True Range("E1", "E4").Font.Color = RGB(8, 44, 196) Cells.EntireColumn.AutoFit End Sub ' Ing. N└stor Augusto Oyarce Linares
  • 5. M└todo Num└rico de la Biseccion Valor de X Valor de Y Xf Yf Iteraciones 1.35 -0.394625 1.368808746 1.34702E-05 17 1.375 0.130859375 1.3625 -0.132833984 1.36875 -0.00122583 1.371875 0.06475705 1.3703125 0.03175069 1.36953125 0.015258702 1.369140625 0.007015504 1.368945313 0.002894604 1.368847656 0.000834329 1.368798828 -0.000195765 1.368823242 0.000319278 1.368811035 6.17555E-05 1.368804932 -6.70051E-05 1.368807983 -2.62484E-06 1.368809509 2.95653E-05 1.368808746 1.34702E-05