: MathCAD.
. .
(5.1)
(5.1)
(5.2)
:
(5.3)
, [ a, b ], .
. , . , OX.
, , [ a, b ], .
, .
MathCAD . MathCAD root, , , , , , -.
- root (f(), );
- root(f(), , , b),
f() , ;
, ;
, b , .
root (guess value) . , . , . , f() Trace (. 3) .
5.1.
, .
.
.
. root , :
- , , , ;
- , .
5.2. .
.
. , , .
5.3. .
.
. root.
. , , polyroots(v), v , .
n - n ( ), v . polyroots , n . - , root.
|
|
5.4.
.
1) .
2)
3)
4)
:
MathCAD. (. MathCad ). .
5.5
Given
Find
Find - , Symbolic () , <Ctrl>+<.>. ( Booleans ( ) ).
:
1. , Booleans ( ) <Ctrl>+<.> .
2. , .
3. Symbolics () Variable/Solve (/).
.
, .
. ( ).
(5.4)
.
: .
.
(5.4)
. (5.5)
.
, (, ).
: , .
MathCAD . , , Given :
Given
Find, Minner (Maximize, Minimize).
var:=value, .. .
expr_left=expr_right , Boolean ( ), <Ctrl>+<=>.
|
|
Find (x1,...,x n) . , Find.
5.6. .
.
:
. CTOL , Given. , , , .
Find . Find . , . , , Find (. 5.5).
, , , , , .
5.7.
. , :
, (. 5.1).
, , , (0,0).
.
Given
, :
: .
Find, , Find Minerr .
5.8.
Given
.
(5.6)
. , . , (5.6) , . , . .
: , , , ( ).
MathCAD . MathCAD . ( ), (), , () , . , .
, , .
- Minimize (f, x1,..., n) , f ;
- Maximize (f, x1,..., n) , f ;
|
|
- f(x1,..., n) ;
- x1,..., n , ().
f , , , .
5.9. .
(4; 5).
.
;
Given
: , 4, .
5.10. .
.
.
1) ,
.
2) :
3) R, .
: 32.155 .
. . .
.
1. ?
2. ?
3. .
4. Find Minner ?
5. ?
1
1. , root Find. .
2. . .
3. : .
4. .
2
1. , root Find. .
2. . .
3. : .
4. , , .
3
1. , root Find. .
2. . .
3. : .
4. , , , .
4
1. , root Find. .
2. . .
3. : .
4. .
5
1. , root Find. .
2. . .
3. : .
4. .
6
1. , root Find. .
2. , .
3. :
4. , , , , , .
7
1. , root Find. .
2. . .
3. : . .
4. , , , , .
|
|
8
1. , root Find. .
2. . .
3. : . .
4. , , , , .
9
1. , root Find. .
2. . .
3. : .
4. , , , , .
10
1. , , root Find. .
2. . .
3. : . .
4. , , , , .
6
MATHCAD
: Mathcad . .
: Mathcad.
Mathcad , , , , , , .
( ).
() . Programming, Math, View ► Toolbars ► Programming.
, . 6.1.
Add Line, . , .
. :=, . , . ( ), . , , . , , .
, .
6.1. . , , . 6.2.
. 6.2 |
, (. 6.3).
. 6.3 |
Mathcad (. 6.4) , .
. 6.4 |
, .
6.2. . , , . 6.5.
. 6.5 |
( ) . , , , , . , . , .
|
|
6.3. , . . 6.6.
. 6.6
if otherwise . if () , if ( ), , if. otherwise (, ) if. otherwise , , , if otherwise .
, Boolean, Math, View ► Toolbars ► Boolean.
. 6.7.
. 6.7 |
:
;
;
;
,
, ;
;
;
( ) ;
( ) ( , , );
: , , , , , .
6.4.
.
(. 6.8 . 6.9), . 6.9 .
. 6.8 | . 6.9 |
6.5.
, .
. 6.10.
. 6.10 |
6.6.
, , .
. 6.11 . 6.12, . 6.12 .
. 6.11 | . 6.12 |
for while.
for ( ) :
: for :
for i ÎBegin, Next.. End
<>
i, for, : Begin, Next, , i End. i , for. Next for , 1. , (..) for, ; ( ).
6.7. f, Begin, End h, Begin End h. . 6.13.
( ).
. 6.13 | |
6.8. f A. f -, 3 : A, A, A ( A , A, , ). . 6.14.
. 6.14 |
for, if, for. if . , if Add Line. rows(A) cols(A), A.
while ( ) :
.
while , while . while :
1. . , 2, , 4.
2. .
3. 1.
4. while.
6.9. f, ,
,
, , . . 6.15.
. 6.15 |
break () (for while), . break , .
6.10. f A. f -, i - i A, A; i - A , i - - . . 6.16.
continue ; . , continue while, continue while , . . ; continue for, continue .
. 6.16 |
continue , , otherwise if.
6.11. minmax A. minmax - 2, A, . . 6.17 otherwise . 6.18 continue.
return , return. return .
. 6.17 | . 6.18 |
6.12. f A. f -, A, . : . A , 0, f - 1. . 6.19.
on error . :
_1 on error _2
_2 , _1.
. 6.19 |
6.13. ,
. 6.20.
. 6.20
error(S), , , , S.
6.14. , , Division by zero. . 6.21.
. 6.21
, Mathcad , , Mathcad.
6.15. ,
,
. . 6.22.
. 6.22 |
, , , .
1. .
2. MathCAD .
1
1. , 2 .
2. error , Division by zero.
3. , , ; 0, 0; 1, .
2
1. , , : , , .
2. , , 1, 0.
3.
3
1. , , .
2. , 2 2 .
3. .
4
1. pr(n), , , .
2. .
3. on error , 1 .
5
1. .
2. , , .
3. , +, , .
6
1. , () . .
2. ,
, , .
, , . .
3. , , 0 10 1.
7
1. , : , , .
2.
3. , .
8
1.