̲Ͳ ²
ֲ Ͳ ² ˲Ͳ
,
²
ί 5
̲Ͳ ߔ
: ˲

23
2007

1. , , Ѳ -.
2. - Ѳ . , . 1 2 :
) (. .1), , [a, b] h.
1


, h
, [a,b]



0.2
[3, 8]


, , , - , :
min
,

max
ʳ ,

y
,

h
x

x
,

main()


clrscr()


printf()


scanf()


log()


fabs()
double

cos()



C
#include<stdio.h>
#include<math.h>
#include<conio.h>
void main(void)
{
clrscr();
double x,y,min,max,h;
printf("a=");
scanf("%lf",&min);
printf("b=");
scanf("%lf",&max);
printf("krok=");
scanf("%lf",&h);
for(x=min;x<max;x+=h)
{
if (x<5) y=log(fabs (log(fabs(log(x)/log(3)))/log(4))) /log(5);
if (5<=x<7) y=1/(x*x+16);
if (x>=7) y= log(x)+cos(x);
printf("x=%4.4lf, y=%4.1lf\n",x,y);
}}
:
a=3
b=8
krok=0.2
x=3.0, y=0.0400
x=3.2, y=0.0381
x=3.4, y=0.0363
x=3.6, y=0.0345
x=3.8, y=0.0329
x=4.0, y=0.0312
x=4.2, y=0.0297
x=4.4, y=0.0283
x=4.6, y=0.0269
x=4.8, y=0.0256
x=5.0, y=0.0244
x=5.2, y=0.0232
x=5.4, y=0.0221
x=5.6, y=0.0211
x=5.8, y=0.0201
x=6.0, y=0.0192
x=6.2, y=0.0184
x=6.4, y=0.0176
x=6.6, y=0.0168
x=6.8, y=0.0161
x=7.0, y=2.6998
x=7.2, y=2.5824
x=7.4, y=2.4400
x=7.6, y=2.2794
x=7.8, y=2.1081
x=8.0, y=1.9339
) , (. .2), [a, b] h d. .
2

, [a, b]
, h
, d


[0, 0.2]
0.02
0.001


, , , - , :
min
,

max
ʳ ,

suma


h
x

x
,

Un


poh


n
ʳ

f


main()


clrscr()


printf()


scanf()


fabs()
double

pow(x,y)



C
#include<stdio.h>
#include<math.h>
#include<conio.h>
void main(void)
{
clrscr();
double x,min,max,h,suma,f,poh,Un;
int n;
printf("a=");
scanf("%lf",&min);
printf("b=");
scanf("%lf",&max);
printf("krok=");
scanf("%lf",&h);
printf("pohybka=");
scanf("%lf",&poh);
for (x=min;x<max;x+=h)
{
Un=1;
suma=0;
f=1;
n=1;
while(fabs(Un)>=poh+0.000000001)
{
f*=(2*n-1);
Un=(pow(x,2*n)-1)/f;
suma+=Un;
n++;
}
printf("Suma=%lf, x=%4.2lf, n=%i, Un=%4.15lf\n" ,suma,x,n,Un);
}}
:
a=0
b=0.2
krok=0.02
pohybka=0.001
Suma=-1.410678, x=0.00, n=7, Un=-0.000096200096200
Suma=-1.410278, x=0.02, n=7, Un=-0.000096200096200
Suma=-1.409077, x=0.04, n=7, Un=-0.000096200096200
Suma=-1.407074, x=0.06, n=7, Un=-0.000096200096200
Suma=-1.404265, x=0.08, n=7, Un=-0.000096200096200
Suma=-1.400645, x=0.10, n=7, Un=-0.000096200096200
Suma=-1.396209, x=0.12, n=7, Un=-0.000096200096199
Suma=-1.390950, x=0.14, n=7, Un=-0.000096200096195
Suma=-1.384859, x=0.16, n=7, Un=-0.000096200096173
Suma=-1.377926, x=0.18, n=7, Un=-0.000096200096089
Suma=-1.370141, x=0.20, n=7, Un=-0.000096200095806
: ѳ - , .