segno trinomio 2

esercitazione con visual basic su powerpoint
considerazioni su segno trinomio 2 e coefficiente a
si considerano casi con discriminante positivo, negativo, nullo
e coefficiente a positivo, negativo
confronto con grafico e valori assegnati con ciclo for-next
(immagini create con derive e incollate)

Private Sub CommandButton1_Click()
Rem discriminante > 0 e a > 0
ListBox1.AddItem ("x^2 -6x +8 >0 ")
a = 1
b = -6
c = 8
d = b * b - 4 * a * c
x1 = (-b + Sqr(d)) / (2 * a)
x2 = (-b - Sqr(d)) / (2 * a)
ListBox1.AddItem ("a = " & a)
ListBox1.AddItem ("discriminante = " & d)
ListBox1.AddItem ("x1 = " & x1)
ListBox1.AddItem ("x2 = " & x2)
ListBox1.AddItem ("positiva esternamente a radici")
ListBox1.AddItem ("negativa internamente a radici")
ListBox1.AddItem ("si annulla in radici")

For k = -8 To 8
x = k
ListBox1.AddItem (k & " " & a * x ^ 2 + b * x + c)
Next k
End Sub

Private Sub CommandButton10_Click()
Image3.Visible = True
End Sub

Private Sub CommandButton11_Click()
Rem discriminante = 0 e a <0
ListBox1.AddItem ("-x^2 +4x -4 <0 ")
a = -1
b = 4
c = -4
d = b * b - 4 * a * c
x1 = (-b / (2 * a))
x2 = (-b / (2 * a))
ListBox1.AddItem ("a = " & a)
ListBox1.AddItem ("discriminante = " & d)
ListBox1.AddItem ("x1 = " & x1)
ListBox1.AddItem ("x2 = " & x2)
ListBox1.AddItem ("sempre negativa eccetto ove si annulla")
For k = -8 To 8
x = k
ListBox1.AddItem (k & " " & a * x ^ 2 + b * x + c)
Next k
End Sub

Private Sub CommandButton12_Click()
Image4.Visible = False
End Sub

Private Sub CommandButton13_Click()
Image4.Visible = True
End Sub

Private Sub CommandButton14_Click()
Rem discriminante < 0 e a > 0
ListBox1.AddItem ("x^2 + x + 4 >0 ")
a = 1
b = 1
c = 4
d = b * b - 4 * a * c
ListBox1.AddItem ("a = " & a)
ListBox1.AddItem ("discriminante = " & d)
ListBox1.AddItem ("sempre positiviva")
For k = -8 To 8
x = k
ListBox1.AddItem (k & " " & a * x ^ 2 + b * x + c)
Next k
End Sub

Private Sub CommandButton15_Click()
Image5.Visible = False
End Sub

Private Sub CommandButton16_Click()
Image5.Visible = True
End Sub

Private Sub CommandButton17_Click()
Rem discriminante < 0 e a < 0
ListBox1.AddItem ("-x^2 + 2x -4 <0 ")
a = -1
b = 2
c = -4
d = b * b - 4 * a * c
ListBox1.AddItem ("a = " & a)
ListBox1.AddItem ("discriminante = " & d)
ListBox1.AddItem ("sempre negativa")
For k = -8 To 8
x = k
ListBox1.AddItem (k & " " & a * x ^ 2 + b * x + c)
Next k
End Sub

Private Sub CommandButton18_Click()
Image6.Visible = False
End Sub

Private Sub CommandButton19_Click()
Image6.Visible = True
End Sub

Private Sub CommandButton2_Click()
Image1.Visible = False
End Sub

Private Sub CommandButton3_Click()
Image1.Visible = True
End Sub

Private Sub CommandButton4_Click()
Rem discriminante >0 e a< 0
ListBox1.AddItem ("-x^2 +4x +5 > 0")
a = -1
b = 4
c = 5
d = b * b - 4 * a * c
x1 = (-b + Sqr(d)) / (2 * a)
x2 = (-b - Sqr(d)) / (2 * a)
ListBox1.AddItem ("a = " & a)
ListBox1.AddItem ("discriminante = " & d)
ListBox1.AddItem ("x1 = " & x1)
ListBox1.AddItem ("x2 = " & x2)
ListBox1.AddItem ("positiva internamente a radici")
ListBox1.AddItem ("negativa estarnamente a radici")
ListBox1.AddItem ("si annulla in radici")

For k = -8 To 8
x = k
ListBox1.AddItem (k & " " & a * x ^ 2 + b * x + c)
Next k

End Sub

Private Sub CommandButton5_Click()
Image2.Visible = False
End Sub

Private Sub CommandButton6_Click()
Image2.Visible = True
End Sub

Private Sub CommandButton7_Click()
ListBox1.Clear
End Sub

Private Sub CommandButton8_Click()
Rem discriminante = 0 e a > 0
ListBox1.AddItem ("x^2 -2x +1 >0 ")
a = 1
b = -2
c = 1
d = b * b - 4 * a * c
x1 = (-b / (2 * a))
x2 = (-b / (2 * a))
ListBox1.AddItem ("a = " & a)
ListBox1.AddItem ("discriminante = " & d)
ListBox1.AddItem ("x1 = " & x1)
ListBox1.AddItem ("x2 = " & x2)
ListBox1.AddItem ("sempre positiva eccetto ove si annulla")
For k = -8 To 8
x = k
ListBox1.AddItem (k & " " & a * x ^ 2 + b * x + c)
Next k

End Sub

Private Sub CommandButton9_Click()
Image3.Visible = False
End Sub

vedi segnotrinomio.ppt