.


:




:

































 

 

 

 


4




1. .

, e- x - x =0, VBA, , : ) ;
) ; ) ; ) .

OptionButton, (UserForm). OptionButton Frame. (UserForm) ( Label ; TextBox , , ; CommandButton , ). .

2. , .

(. . . 1). (2 3). : f (x)= e- x - x, a=0, b=1.

3. ( ) . ( (. . . 2).)

4. (UserForm) .

) UserForm1

 

Label1
Frame1
CommandButton2
CommandButton1
OptionButton1
OptionButton4
OptionButton2
OptionButton3

) UserForm2

 

TextBox3
TextBox2
TextBox1
CommandButton3
CommandButton1
CommandButton2
Label3
Label2
Label1

 

) UserForm3, UserForm4, UserForm5 UserForm2. ( , UserForm2. Caption .)

5. - .

. - , 1-4. , . - .

) UserForm1

Private Sub CommandButton1_Click()

UserForm1.Hide

End Sub

Private Sub CommandButton2_Click()

UserForm1.Hide

If OptionButton1.Value = True Then

UserForm2.Show

ElseIf OptionButton2.Value = True Then

UserForm3.Show

ElseIf OptionButton3.Value = True Then

UserForm4.Show

ElseIf OptionButton4.Value = True Then

UserForm5.Show

End If

End Sub

Private Sub UserForm_Initialize()

OptionButton1.Value = True

End Sub

) UserForm2

Private Sub CommandButton1_Click()

UserForm2.Hide

UserForm1.Show

End Sub

Private Sub CommandButton3_Click()

UserForm2.Hide

UserForm3.Show

End Sub

Private Sub CommandButton2_Click()

Dim c As Single

Dim n As Integer

a = 0

b = 1

eps = Val(TextBox1.Text)

n = 0

Do While (b - a)>= eps

xn = (a + b) / 2

n = n + 1

If f(a)*f(xn)<= 0 Then b = xn Else a = xn

Loop

TextBox2.Text = xn

TextBox3.Text = n

End Sub

Private Sub UserForm_Initialize()

TextBox2.Enabled = False

TextBox3.Enabled = False

End Sub

) UserForm3

CommandButton1 3, (Initialize) .

Private Sub CommandButton2_Click()

a = 0

xn=1

eps = Val(TextBox1.Text)

n = 0

Do

xn = xn - f(xn) * (xn - a) / (f(xn) - f(a))

n = n + 1

Loop While Abs(f(xn)) >= eps

TextBox2.Value = xn

TextBox3.Value = n

End Sub

) UserForm4

CommandButton1 3, (Initialize) .

Private Sub CommandButton2_Click()

xn=0

eps = Val(TextBox1.Text)

n = 0

Do Until Abs(f(xn)) < eps

xn = xn - f(xn) / _f(xn)

n = n + 1

Loop

TextBox2.Value = xn

TextBox3.Value = n

End Sub

) UserForm5

CommandButton1 3, (Initialize) .

Private Sub CommandButton2_Click()

a=0

b=1

eps = Val(TextBox1.Text)

xn = (a + b) / 2

n = 0

Do

xn = fi(xn)

n = n + 1

Loop Until Abs(f(xn))< eps

TextBox2.Value = xn

TextBox3.Value = n

End Sub

) Module1

Public Function f(ByVal x As Single) As Single

f = Exp(-x) - x

End Function

Public Function _f(ByVal x As Single) As Single

_f = -Exp(-x) - 1

End Function

Public Function fi(ByVal x As Single) As Single

fi = Exp(-x)

End Function

6. :

e- x - x =0
0,5672 0,5672 0,5671 0,5671
       

7. .

8. .

 
 


9. .

 

3

2, 3, 4

. a b . A b
  cos x = x - 4;       arctg(x 2+ )= x;    
  0,5 x = ln(x +1);       x 2 x 1 = 0;    
  sin(x + 1) = 0,5 x;       ln(x + 2) = (1 - x)3;    
  2arctg x = x - 3;       xx + 9 x = 20;    
        (x - 3)cos x - ½ = 0;    
  tg(0,58 x +0,1)= x 2;       lg(x + 1) = 10- x ;    
  3 x + 2 x = 2;       tg3(x + 4,5) = x - 1;    
  1 + x 5 = 3 x;       5 x = e - x + 1;    
  ln x = sin x;       x 1 = x 0,15;    
        ln x = .    

 

4

1

. .
  [-4,3]; [2,3];   [0.1,1]; [4,5];
  [3,4];   [-2,-1];
  ;   [1,2];
  [-1,0]; [1,2];   [2,3];
  [-3,-2]; [-1,0]; [2,3];   [0,1];
  [1;2];   [0,1];
  [-2,-1]; [1,2]   ;
  [-1,0]; [3,4];   [-3,-2]; [1,2];
  [1,2];   [-1,-0.1]; [0.1,1];
  [1,2];   [2,3].

 

5

 

2, 3, 4*

. . . .
  3.0088;   0.7904;   1.1402;   0.6582;
  0.2650;   0.3027;   0.6412;   2.6518;
  1.3800;   1.2146;   0.0956;   0.3352;
  5.8001;   2.2191;   1.8662;   2.1192;
  4.6815;   0.2133;   4.9691;   1.7632.

 

 

* , ,

 

 

 

1. .., .., .. . .: , 2001. 224 .

2. .., .., .., .. . /: , 1995.

3. .., .. : . . 2- ., . . .: . , 1990. 208 .

4. .. Excel, VBA, Internet . - .: -, 2001.

5. .., .. ( 2 ). /: , 2003.

6. .., .. - Microsoft Excel. /: , 2006. 100 .

 

1





:


: 2017-02-28; !; : 407 |


:

:

- , - .
==> ...

1486 - | 1404 -


© 2015-2024 lektsii.org - -

: 0.047 .