, :
a =, b =, g =, q =, m =, n =.
a - , b , g q , m n .
, 725311 a = 7, b = 5, g = 1, q = 1, m = 0, n = 5 .
. (Eureka, Scilab), (Edit, Solution Eureka Editor, Scilab Command Window Scilab). (Pascal, Scilab) (Turbo Pascal, Scilab) .
1
() e = 0.1
a) 0.25(a+ b+ g+ q) x 3 2 x 2 + 2.3 x N = 0
Eureka Scilab.
1: ( , N = 55),
, : 65 ln x x = 0
. . f (x) = 0 [ a, b ], . . , [ a, b ], :
1) f (a) f (b) < 0,
2) f (x) [ a, b ] ,
3) f (x) [ a, b ] .
, [ a, b ] f (x) = 0.
[ a, b ], , f (x) = 65 ln x x c h , . Eureka (Scilab).
Eureka, Graph Function, f (x) = 65 ln(x) x, List, (First point), , 40, ( ) (Increment), , 1 (Number of value), , 30. . F5. , [60, 61]:
f( 60) = 65 ln 60 60 0.906, f (61) = 65 ln 61 61 0.111.
f (x) = 65 ln x x x > 0, [60, 61].
f (x) = 65 ln x x , f ¢(x) = 1 /x 1. , x > 0 y¢ < 0, , f (x) = 65 ln x x [60, 61]. : [60, 61] 1 3, .
|
|
( ) ( e = 0.1). .
, , , .
:
a | b | f (a) | f (x) | f (b) | |||
60.5 | 0.91 | 0.40 | 0.11 | 0.5 | |||
60.5 | 60.75 | 0.40 | 0.14 | 0.11 | 0.25 | ||
60.75 | 60.88 | 0.14 | 0.01 | 0.11 | 0.13 | ||
60.88 | 60.94 | 0.06 |
.
.
a = 60, b = 61 () , , f (a), f (b), f (x) f (x) = 65 ln x -- x . x = 60.5, , , e 1= 0.5, x = 60.50.5. e 1 >e = 0.1, . , , [ a, x ], [ x, b ]. [ x, b ], f (x) f (b) < 0, f (a) f (x) > 0. ..
e 1 = 0.06 < e, , 65 ln x x = 0 x = 60.940.06.
: x = 60.94 0.06
.
[ a, b ],
.
, , , , (. ) f (a)>0, f (b)<0, , = a. , n =1,
n =2,
. .
: x = 60.8909 0.0001
65 ln x x = 0 [60, 61] Eureka, Edit :
65 ln(x) x = 0
60<= x <=61
Esc Solve. Solution :
x = 60.890916
Maximum error is 4.4764192e-13
, x , , 4.476419210-13.
: x = 60.890916
, Edit Solution .
, 1 Scilab ( Scilab .23 38; .39 Scilab, ).
|
|
, , Scilab fsolve(x0,f), x0 - , f - , f(x)=0.
[ a, b], , y=65-lnx-x.
Scilab SciPad scipad(); ( Editor, ) :
clc
xbasc()
function y=f(x)
// ,
y= 65-log(x)-x;
endfunction
x=50:0.1:70; plot(x, f(x)); xgrid()
(Execute/Load into Scilab) (Scilab Graphic(0)) y=65 ln x x [50, 70], , [60, 70]. Scilab
-->x0=60;x1= fsolve(x0,f)
Enter.
x1 =
60.890916
: x = 60.8909
Scilab .
2
() :
)
x | m+n | m+n+2 | m+n+4 | m+n+6 | m+n+8 |
y | g+q+2.5 | g+q+4.9 | g+q+8 | g+q+12.1 | g+q+16.9 |
Eureka Scilab.
2: ( b, N=50, g=0, q=0.)
x | |||||
y=f (x) | 2.5 | 4.9 | 12.1 | 16.9 |
= f (x) ( ) ( ). 0, 1 2 ,
. n . , x 0 = 5, x 1 = 7, , x 4 = 13, n= 4.
. , :
:
i | xi | yi | |||||
2.5 | 12.5 | 62.5 | |||||
4.9 | 34.3 | 240.1 | |||||
12.1 | 133.1 | 1464.1 | |||||
16.9 | 219.7 | 2856.1 | |||||
S | 44.4 | 471.6 | 5270.8 |
,
44.4 = 5 c 0 + 45 c 1 + 445 c 2
471.6 = 45 c 0 + 445 c 1 + 4725 c 2
5270.8 = 445 c 0 + 4725 c 1 + 52789 c 2,
(, ), :
0= 0.24071429, 1= 0.064285714, 2= 0.10357143.
, y = 0.241 0.064 x +0.104 x 2.
: .
: y = 0.241 0.064 x +0.104 x 2
Eureka, Edit :
y (x): = c 0 + c 1 *x + c 2 *x^ 2
y (5) = 2.5
y (7) = 4.9
y (9) = 8
y (11) = 12.1
y (13) = 16.9
$ substlevel = 0
Solve Solution :
0 = 0.241
c 1 = 0.064
c 2 = 0.104
Maximum error is 0.0511428571
: y = 0.241 0.064 x +0.104 x 2
: - , , F5.
|
|
Scilab, :
xbasc()
clc
//,
// ,
//
//z=[x;y] -
// - ,
//
//
function y=G(c,z)
y=z(2)-c(1)-c(2)*z(1)-c(3)*z(1)^2
endfunction
//
x=[5 7 9 11 13];
y=[2.5 4.9 8 12.1 16.9];
//
z=[x;y];// , y=G(c,z)
//
c=[0;0;0];// , . .
//
[a,err]=datafit(G,z,c)
//
plot2d(x,y,-4);
// [4, 14]
t=4:0.01:14;
Ptc=a(1)+a(2)*t+a(3)*t^2;
plot2d(t,Ptc);
(Execute/Load into Scilab) :
err =
0.0051429
a =
0.2406191
- 0.0642614
0.1035701
err - , 0, 1 2.
: y = 0.1036 x 2 0.0643 x + 0.2407
, 0, 1 2, Eureka Scilab, ( , , ).
3
2 x * = m+n+ N/30
a) , ;
b) , .
Eureka Scilab.
4: ( , N = 51, g = 0,q = 0 .)
, .
(hi = xi +1 xi = h = const), , .
:
x | |||||
y | 2.5 | 4.9 | 12.1 | 16.9 |
, () . ( ).
(1)
(1), :
x 0 = 6, x 1 = 8, x 2 = 10, y 0 = 2.5, y 1 = 4.9, y 2 = 8.
, :
, :
0.087562 0.0256 0.5 = 2.5, 4.9, 8.
x x* = 6 + 51/30 = 7.7, :
0.08757.72 0.0257.7 0.5 4.495
:, 4.495
Eureka Edit :
y (x) = c 0 + c 1 *x + c 2 *x^ 2
y (6) = 2.5
y (8) = 4.9
y( 10) = 8
t = y( 6 + 51/30)
Solve Solution :
c 0 = 0.5
c 1 = 0.025
c 2 = 0.0875
t = 4.495375
Maximum error is 4.4408921e-16
:, 4.495
, , :
(2)
, n! = 1234 n. (, 5!=12345=120).
|
|
:
i | ||||||
= , = , = , = , = ,
= , = , = , = ,
= .
- k - (k = 1, 2, 3, 4).
i | |||||||
2.5 | 2.4 | 0.7 | 0.3 | 0.6 | |||
4.9 | 3.1 | 0.3 | |||||
4.1 | 0.7 | ||||||
12.1 | 4.8 | ||||||
16.9 | |||||||
= 6, ( ), . .
(2), :
+
:
Eureka, Edit :
y (x): = c 0+ c 1* x + c 2* x ^2 + c 3* x ^3 + c 4* x ^4
y (6)=2.5
y (8)=4.9
y (10)=8
y (12)=12.1
y (14)=16.9
t = y (6+51/30)
Solve Solution :
c 0= 12.5
c 1= 5.425
c 2 = 0.80625
c 3= 0.625
c 4 = 0.015625
t = 4.5105873
Maximum error is 3.0198066e-14
: 12.5 + 5.425 x 0.8063 x 2 + 0.625 x 3 0.0156 x 4,
t =
( ).
( b) Scilab,
clc
xbasc()
x=[6 8 10 12 14];y=[2.5 4.9 8 12.1 16.9 ];nst=51;
n=length(x);a=[];b=[];c=[];
for i=1:n
for j=1:n
a(i,j)=sum(x.^(i+j-2));
end
b(i)=sum(x.^(i-1).*y);
end
c=inv(a)*b
function z=f(t)
z=0;
for i=1:n
z=z+t.^(i-1).*c(i);
end
endfunction
plot2d(x,y,-4)
t=min(x)-.1:.01:max(x)+.1;plot2d(t,f(t))
r=min(x)+nst/30,z1=f(r),plot(r,z1,"*")
err=sum((y-f(x)).^2)
, :
c = - 12.5 5.425 - 0.80625 0.0625 - 0.0015625
r = 7.7 z1 = 4.5105873 err = 6.351D-16
; r , (z1), err (0 ). .
: ,
4.5106
( ) :
x=[6 8 10 ];y=[2.5 4.9 8 ];nst=51;
:
c = - 0.5 - 0.025 0.0875 r = 7.7 z1 = 4.495375 err = 3.564D-23
: ,
4.4954
4
Eureka Scilab
, , , .
4: ( , N = 50, .. m= 5, n= 0.)
, . , , , .. [ a, b ] . .
1
x | 0.2 | 0.4 | 0.6 | 0.8 | 1.2 | 1.4 | 1.6 | 1.8 | |||
1.005 | 1.020 | 1.046 | 1.083 | 1.133 | 1.197 | 1.277 | 1.377 | 1.499 | 1.649 |
. . ( ).
:
n 1 .
1, :
:
n .
1, :
:
1, :
():
1, :
:
Eureka:
Edit :
J = integ (exp (x ^2/8), x, 0, 2)
Solution Solve :
J = 2.3899153
: J =2.3899153
: exp(x ^2/8 ) , x , 0 , 2 .
Scilab:
clc
|
|
function t=podint(x)
//
t=exp(x.^2/8);
endfunction
J=integrate('podint','x',0,2)
: x exp(x. ^2/8 ) (. . 26).
(Execute/Load into Scilab)
J = 2.3899153
: J =2.3899153