.


:




:

































 

 

 

 


4.5.2-4. -Function, n.




f=n!=1 ∙ 2 ∙ ∙ (n-1) ∙ n ( n≥1) f=0!=1 ( n=0).

, , 1 n 1.

: fi = fi-1 ∙ i; ; f0 = 1.

. 4.5.2-13

 

Function Pr52-13(ByVal n As Integer) As Long Dim f As Long Dim i As Integer f = 1 For i = 2 To n f = f * i Next i Return f End Function    

 

. 4.5.2-13. Pr5213() 4.5.2-4

Dim nn As Integer Dim ff As Long Nn = vvodInt4(TextBox1) ff = Pr5213(nn) vivodLngFx7(ff, TextBox2)

. 4.5.2-14. Pr5213()

Pr5213() , , . 4.5.2-14.

 

4.5.2-5. -, y=c∙e-dx∙sin(2x+5), c, d , x [a; b] h.

. 4.5.2-15.

() () . ymin , , , y < ymin . , ymin , Doubl, . Double.MaxValue.

 

Sub Pr5215(ByVal n As Integer, _ ByVal a As Double, _ ByVal c As Double, _ ByVal d As Double, _ ByVal h As Double, _ ByRef xmin As Double, _ ByRef ymin As Double) Dim i As Integer Dim x, y As Double ymin = Double.MaxValue x=a For i =1 To n y =c*Exp(-d*x)*Sin(2*x+5) If y<ymin Then ymin=y: xmin=x End If x =x+h Next i End Sub

 

. 4.5.2-15. Pr5215() 4.5.2-5

, ymax
Double.MinValue
, .. , Double, y > ymax. xmin (xmax), () () xmin (xmax).

Pr5215() , , . 4.5.2-16.

 

Dim nn As Integer Dim aa, bb, hh, cc, dd, ym, xm As Double aa = vvodDbl2(" a=",TextBox1) bb = vvodDbl2(" b=",TextBox2) hh = vvodDbl2(" h=",TextBox3) cc = vvodDbl2(" c=",TextBox4) dd = vvodDbl2(" d=",TextBox5) nn = CInt((bb-aa)/hh)+1 Pr5215(nn, aa, cc, dd, hh,xm, ym) vivodDblFx6(xm, TextBox6) vivodDblFx6(ym, TextBox7)

 

. 4.5.2-16. Pr5215()

4.5.2-7. z(x,y)=x2+y2 , x hx, y hy.

. 4.5.2-17.

Sub Pr5217(ByVal n As Integer, _ ByVal m As Integer, _ ByVal a As Double, _ ByVal hx As Double, _ ByVal c As Double, _ ByVal hy As Double) Dim x, y, z As Double Dim j, i As Integer x = a For i = 1 To n y =c For j = 1 To m z = x^2 + y^2 vivodDblFx6(x, TextBox7) vivodDblFx6(y, TextBox8) vivodDblFx6(z, TextBox9) y = y + hy Next j x = x + hx Next i End Sub  

 

. 4.5.2-17. Pr5217() 4.5.2-7

Pr5217() , , . 4.5.2-18.

 

Dim nn, mm As Integer Dim a, b, hx, c, d, hy As Double a = vvodDbl2(" a", TextBox1) b = vvodDbl2(" b", TextBox2) hx = vvodDbl2(" hx",TextBox3) c = vvodDbl2(" c", TextBox4) d = vvodDbl2(" d", TextBox5) hy = vvodDbl2(" hy",TextBox6) nn = CInt((b-a)/ hx) + 1 mm = CInt((d-c) / hy) + 1 Sub Pr5217(nn, mm, a, hx, c, hy)

. 4.5.2-18. Pr5217()

4.5.2-8. 4.5.2-8, y= +cosx3 [a; b] h.

Label TextBox . . MultiLine, True, ScrollBars Vertical . , Button1, .

, . 4.5.2-19.

. 4.5.2-19.

. 4.5.2-20.

 

 

. 4.5.2-19. 45.2-8

 

Option Explicit On Option Strict On Imports System.Math Public Class Form1 Function vvodDbl1(ByVal T As TextBox) As Double Return Val(T.Text) End Function Sub vivodDblFxy8(ByVal x As Double, ByVal y As Double, _ ByVal T As TextBox) T.Text = T.Text + Format(x, "0.000 ") + Space(8) + _ Format(y, "0.000 ") + vbCrLf End Sub Sub TabFun(ByVal a As Double, ByVal b As Double, _ ByVal h As Double) Dim x, y As Double Dim i, n As Integer x = a n = CInt(((b - a) / h) + 1) For i = 1 To n y = Sqrt(x + 5) + Cos(x ^ 3) vivodDblFxy8(x, y, TextBox4) x = x + h Next i End Sub Private Sub Button1_Click(ByVal sender As System.Object,_ ByVal e As System.EventArgs) Handles Button1.Click Dim aa, bb, hh As Double aa = vvodDbl1(TextBox1): bb = vvodDbl1(TextBox2) hh = vvodDbl1(TextBox3): TabFun(aa, bb, hh) End Sub Private Sub Button2_Click(ByVal sender As System.Object,_ ByVal e As System.EventArgs) Handles Button2.Click End End Sub End Class

 

. 4.5.2-20. 5.2-8


 

1. For : 1) ;2) 3) 4) 2. , , 1) 2) 3) 4) 3. 1) 2) 3) 4) 4. 1) , 2) , 3) , 4) 5. 1) 2) , 3) 4) 6. ForNext 1) 2) 1 3) 7. 1) ExitFor 2) Exit 3) Break 4) Exit For8. , 1) 2) 3) 4) 9. ForNext Step , , 1) 12) 13) 4) 10. , , 1) , 2) , 3) 04) 11. , , 1) , 2) 03) 4) , 12. , , 1) 12) , 3) , 4) 05) 13. , , 1) , 2) , - 3) 04) 15) 14. M
M = 0 For N = 1 To 3 For K = 1 To 2 M = M + 1 Next Next N
1) 62) 133) 124)

4.5.4.

 

, , ListBox.

 

,

 

1) .

2) .

3) .

4) .

5) ListBox. , .

 

1)
( 5).

2) , . y=f(x) , z=f(x,y)

3) . 4.4.5-1 1- . 4.4.5-2 2- .

4) .

5) .

6)

7) . . , .

8) . () .

9) .

10) .

11) .

12)

.

 

4.4.5-1

1) y=f(x) x [a;b] c h.
2) y=f(x) y=f(x) x [a;b]c h. Y=3cos (2x+1). [- ], h= .
3) y=f(x) x [a;b]c h. Y=2 .[-1,1], h=0.1
4) y=f(x) y>0 x [a;b] h. [- ], h=
5) y=f(x) x [a;b]c h [-3;3], h=0.25
6) y=f(x) x [a; b]c h. Y=0.5 . [0,10], h=0.5
7) y=f(x) y>0 x [a; b] h. Y=x [0;10], h=0.5
8) y=f(x) x [a; b]c h. Y= [-2;2], h=0.25
9) y=f(x) x [a;b]c h. Y= [0.1;1.5], h=0.1
10) y=f(x) y<0 x [a,b] h. Y=0.5-0.1-sinx [0,2 ], h=
11) y=f(x) x [a; b]c h. Y= [-2;2], h=0.25
12) y=f(x) y<0 x [a; b] h. Y= .[-1.5,1.5], h=0.15
13) y=f(x) x [a; b]c h. . [-5,5], h=0.5
14) y=f(x) 0.5<y<1.5 x [a; b] h. Y=1+cos10x.[ ], h= .
15) y=f(x) x [a; b]c h. Y=x+1/x. [0.1;1.5], h=0.1
16) y=f(x) y>0 x [a; b] h. Y= . [-0.5;1.5], h=0.1
17) y=f(x) x [a; b]c h. Y= [2;12], h=0.5
18) y=f(x) x [a; b]c h. Y= [-2;6], h=0.5
19)   y=f(x) x [a;b]c h. Y= . [2;4], h=0.1
20) y=f(x) x [a;b]c h. Y= [-3;3], h=0.3
21) y=f(x) x [a; b]c h. . [6;8] h=0.2
22) y=f(x) y<1.2 x [a; b]c h. Y=sin(4x)-2. [- ], h=
23) y=f(x) x [a; b]c h. Y= [-4;4], h=0.5
24) y=f(x) y>0 x [a; b]c h. Y= .[-3;0], h=0.15
25) y=f(x) x [a; b]c h. Y=arctg(x)- . [0.1;1.5], h=0.1
26) y=f(x) y>0 x [a; b]c h. . [0; ], h=
27) y=f(x) x [a; b] c h. .[0.1;1.5], h=0.1
28) y=f(x) y>0 x [a; b] h. Y= . [1.9;2.1], h=0.01
29)   y=f(x) [a; b] h. Y=5*sin( x+1)^2. [- ], h=
30) y=f(x) [a; b]c h. Y=5*sin( x+1)^4- cos(x). [- ], h=

4.4.5.2

1) . 5-1 1- x [a;b] h1 y [c; d] h2. a= - π b= π c= - π d= π h1=π/8 h2=π/4 z(x,y)= 3 cos2(2*x+y+1)
2) z=f(x,y) x [a;b] h1 y [c; d] h2. a= - π b= π c= - π d= π h1=π/6 h2=π/4 z(x,y)= 1/(x+2*π-y) sin(x)
3) z(x,y) x [a;b] h1 y [c; d] h2. = - 1 b= 2 h1= 0.1 c = - 1 d=2 h2=0.2 x^2 + y^2 0≤ x ≤ 1 0 ≤ y ≤ 1, z(x,y)= x - y -1≤ x ≤0 -1≤ y ≤0, 1 x - y
4) z=f(x,y) x [a;b] h1 y [c; d] h2. a= 0 b= 10 c= - 2 d= 2 h1= 0.5 h2=0.2 z(x,y)=x^4 +y- 10*x^2 30*x -25
5) z=f(x,y) x [a; b] h1y [c; d] h2. a= 0.1 b= 1.5 c= 1 d=2 h1=0.1 h2=0.1 z(x,y) = x + 1/x + (1 - y)/2
6) z=f(x,y) x [a; b] h1y [c; d] h2. a= 0 b= 2π c=0 d=2π h1=π/8 h2=π/8 z(x,y)= y 0.1*sin(x)/2
7) z(x,y) x [a; b] h1 y [c; d] h2. a= -3 b= 4 c = -2 d=2 h1= 0.25 h2=0.25 e^x + y x [-2;2] y [-1;1],   z(x,y)= x+y+4 -3 <x<-2 - 2< y< - 1, 0
8) z=f(x,y) x [a; b] h1 y [c; d] h2. a= -1.5 b= 1.5 c= -2 d= 2 h1= 0.2 h2= 0.2 z(x,y)= x^8-y- 0.4*x^3 1.2
9) z=f(x,y) x [a; b] h1y [c; d] h2. a= 0.1 b=1.5 h1=0.1 c=2 d=3 h2=0.1 z(x,y) =
10) z(x,y) x [a; b] h1 y [c; d] h2. a= -π b= π h1=π/8 c= - π d= π h2=π/6 z(x,y)= sin(4x+y) 2*x
11) z(x,y) x [a; b] h1 y [c; d] h2. a= 1 b=5 h1= 0.2 c=0 d=6 h2=0.4 x +y x [2;4] y [1;5], z(x,y)= 1< x <2 0<y<1,   x - y
12) z=f(x,y) x [a; b] h1y [c; d] h2. a=1.9 b=2.1 h1=0.01 c=2 d=3 h2=0.1 z(x,y)=
13) z=f(x,y) x [a; b] h1y [c; d] h2. a= 2.1 b=3 h1=0.1 c=2 d=3 h2=0.2 z(x,y) =
14) z=f(x,y) >0.1 x [a; b] h1y [c; d] h2. a=0 b= π h1= π/16 c=0 d=3 h2=0.1z(x,y)=
15) z(x,y) x [a; b] h1y [c; d] h2. a= -2 b= 5 h1=0.5 b= 0 c=3 h2= 0.1 x[-1;4] y [1;2] z(x,y)= x 3 + y -2 < x < -1 0< y <1
16) z=f(x,y) z(x,y) < 1 x [a; b] h1y [c; d] h2. a= -π b= π h1=π/8 c= -π d= π h2=π/8 z(x,y)=
  z=f(x,y) x [a; b] h1y [; d] h2. a=-1.9 b= 2.9 h1=0.03 c= 1 d=2 h2=0.1 z(x,y)= Y+ .
18) z=f(x,y) x [a; b] h1y [c; d] h2. a= -3 b=3 h1=0.2 c= 1 d=2 h2= 0.1 z(x,y)= + y
19) z=f(x,y) z>0 x [a; b] h1 y [c; d] h2. a= -1.9 b= 2.9 h1=0.3 c=2 d=3 h2=0.1 z(x,y) = - y
20) z=f(x,y) x [a; b]c h1y [c; d] h2. a= -4 b=4 h1=0.5 c=2 d=3 h2=0.1   z(x,y)=
21) z=f(x,y) z<1.5 x [a; b]c h1y [c; d] h2. a= -π b=π h1=π/8 c= -π d=π h2=π/8 z(x,y)=sin(4x+y) - 2
22) z=f(x,y) x [a; b]c h1y [c; d] h2. a= 6 b=8 h1= 0.2 c=2 d=3 h2=0.1 z(x,y)=
23) z=f(x,y) z<3 x [a; b] hy [c; d] h2. a= 1.9 b=2.1 h1=0.01 c=2 d=3 h2=0.02 z(x,y)= . + y
24) z=f(x,y) x [a; b]c h1y [c; d] h2. a=0 b=3 h1=0.1 c=1 d=4 h2=0.2 x+y-1 x [1;2] y [2;3]   z(x,y)= x-y 0<x<1 3<y<4   12.3
25) z=f(x,y) x [a; b] h1 y [c; d] h2. a= -π b=π h1=π/8 c=2 d=3 h2=0.1 z(x,y)= 5*sin(2*x+1)^2 + y
26) z=f(x,y) z(x,y)>0 x [a; b] h1 y [c; d] h2. a= -2 b=5 h1= 0.2 c=0.1 d=0.2 h2=0.01 z(x, y)= x + y - x/y
27) z=f(x,y) z(x,y) < 0 x [a; b] h1 y [c; d] h2. a= 20 d=30 h1= 5 c= 10 d=50 h2=5 z(x,y)=17.5 + x y
28) z=f(x,y) x [a; b] h1y [c; d] h2. a= - 5 b=5 h1= 0.5 c= 0.1 d=0.3 h2=0.02 z(x,y) =
29) z=f(x,y) z>0 x [a; b] h1y [c; d] h2. a= -2 b=2 h1=0.5 c=2 d=3 h2=0.1 z(x,y)= x/y + (x+y)/2 -
30) z=f(x,y) x [a; b]c h1y [c; d] h2. a= 0.1 b=0.8 c= 0.2 d= 0.6 h2=0.05   Sin(x+y) x[0.5; 0.7] y [0.3;0.4]   z(x,y)= x-y 0.1<x<0.5 y [0.4;0.6]   1

4.5.4.4.

 

1) , , , .

2) 1- :

2.1) .

2.2) .

2.3) .

2.4) , :

2.4.1) ;

2.4.2) ;

2.4.3) ;

2.4.4) ;

2.5) .

2.6) .

3) 2- :

3.1) .

3.2) .

3.3) .

3.4) , :

3.4.1) ;

3.4.2) ;

3.4.3) ;

3.4.4) ;

3.5) .

3.6) .






:


: 2016-11-18; !; : 534 |


:

:

.
==> ...

1741 - | 1591 -


© 2015-2024 lektsii.org - -

: 0.061 .