Metodo Muller en Visual Basic
Saludos programadores, detro de los métodos numéricos para hallar raíces polinomiales tenemos
este método "Metodo de Muller".les dejo un estracto de teoria de mi libro y la implementacion del mismo en Visual Basic
Aquí les presento la implementación
Public Class Form1 Dim imax As Integer, iter As Integer Dim h As Double, xr As Double, eps As Double Sub Muller(ByVal xr, ByVal h, ByVal eps, ByVal maxit, ByVal iter) Dim x0 As Double, x1 As Double, x2 As Double Dim h0 As Double, h1 As Double, d0 As Double, d1 As Double Dim a As Double, b As Double, c As Double Dim den As Double, rad As Double, dxr As Double x2 = xr x1 = xr + h * xr x0 = xr - h * xr Do iter = iter + 1 h0 = x1 - x0 h1 = x2 - x1 d0 = (f(x1) - f(x0)) / h0 d1 = (f(x2) - f(x1)) / h1 a = (d1 - d0) / (h1 + h0) b = a * h1 + d1 c = f(x2) rad = Math.Sqrt(b * b - 4 * a * c) If Math.Abs(b + rad) > Math.Abs(b - rad) Then den = b + rad Else den = b - rad End If dxr = -2 * c / den xr = x2 + dxr If Math.Abs(dxr) < eps * xr Or iter >= maxit Then Exit Do Dim lvi As ListViewItem = Me.ListView1.Items.Add(iter) lvi.SubItems.Add(x0) lvi.SubItems.Add(x1) lvi.SubItems.Add(x2) 'Impresion de resultados lvi.SubItems.Add(xr) lvi.SubItems.Add(dxr) lvi.SubItems.Add(f(x0)) lvi.SubItems.Add(f(x1)) lvi.SubItems.Add(f(x2)) lvi.SubItems.Add(f(xr)) x0 = x1 x1 = x2 x2 = xr Loop End Sub Function f(ByVal x) f = x ^ 3 + (4 * (x ^ 2)) - 10 End Function Private Sub Button1_Click(ByVal sender As System.Object,... ByVal e As System.EventArgs) Handles Button1.Click h = 1 xr = 1 eps = 0.0001 imax = 100 iter = 1 Call Muller(xr, h, eps, imax, iter) End Sub End Class
y eso es todo, sus comentarios y preguntas a mi correo, nos vemos en otra publicación!
Hola buenos días, quisiera saber que significan los parámetros que recibe el método Muller (las variables: h, xr, y eps)
ResponderEliminarcual es el nombre de tu libro ?
ResponderEliminarMcutaed_pa_Denton Jessica Gilmore link
ResponderEliminardownload
link
click here
ommeperthough
gastpronKthrom_ki-1993 Andrew Allen Microsoft Visio Professional
ResponderEliminarAvast Cleanup
Yandex browser
meconrappwadd
Yicamutme Cyndi Peacock There
ResponderEliminarclick
kizrisoper