Form1: "Cambie Los Valores de A y B"
Form1: "Cambie Los Valores de A y B"
PREGUNTA 2
Return Math.PI * h ^ 2 * (9 - h) / 3 - 30
End Function
Function Vd(ByVal h As Single) As Single
Return Math.PI * h * (6 - h)
End Function
Private Sub btnNewtonRaphson_Click()
Dim h0, h, eps As Single
eps = 10 ^ -3
h0 = Val(txtH0.Text)
Do
h = h0 - V(h0) / Vd(h0) cambiar newto de Segundo qrden
If Math.Abs(h - h0) < eps Then
txtH.Text = Str(h)
Exit Sub
Else
h0 = h
End If
Loop
End Sub
PREGUNTA 3
4)
End Function
Function dY(ByVal x As Single) As Single
Return (1.75 / 120 * 50000 * 30000 * 450) * (-5 * x ^ 4 + 6 * 450 ^ 2 * x ^ 2 - 450 ^
End Function
Private Sub btnSecante_Click()
Dim a, b, m, eps As Single
a = Val(txtA.Text)
b = Val(txtB.Text)
eps = 10 ^ -2
If dY(a) * dY(b) < 0 Then
Do
m = ((a * dY(b)) - (b * dY(a))) / (dY(b) - dY(a))
MsgBox(Str(dY(m)))
If Math.Abs(dY(m)) < eps Then
MsgBox("llego")
txtY.Text = Str(Y(m))
Exit Sub
Else
If dY(a) * dY(m) >= 0 Then
a=m
Else
b=m
End If
End If
Loop
Else
MsgBox("cambie los valores de a y b")
Exit Sub
End If
End Sub
End Class
PREGUNTA 4