Академический Документы
Профессиональный Документы
Культура Документы
: .
: .TI-155
Cornescu R.
: conf. univ.Tutunaru E.
2016
:
I.
:
1) ( ) = -
2) + , + , , = -
II. 104
.
I. .
1)
3 + 0,2 2 + 0,5 1,2 = 0
= {|0,2|, |0,5|, | 1,2|} = 0
1,2
=1+ = 2,2
1
[2,2; 2,2]
( ) = 3 2 + 0,4 + 0,5 = 0
<0
2,2 2,2
() +
2)
1
( 1)2 =
2
1
(0) = (0 1)2 0 = 0,5
2
1
(0,5) = (0,5 1)2 0,5 = 0,25 0,82 = 0,57
2
(0) (0,5) < 0
[0; 0,5]
:
#include <iostream>
using namespace std;
#include <stdlib.h>
#include <iostream>
#include <conio.h>
#include <math.h>
float f(float x)
{
return x*x*x + 0.2 * x*x + 0.5 * x - 1.2;
}
float f1(float x)
{
return 3 * x*x + 0.4 * x + 0.5;
}
float f2(float x)
{
return 6 * x + 0.4;
}
if (f(a)*f2(a) > 0) x0 = a;
else x0 = b;
bool found = false;
int k = 0;
do
{
x1 = x0 - (f(x0) / f1(x0));
if (fabs(x1 - x0) < eps) found = true;
else x0 = x1;
k++;
} while (!found);
if (found)
cout << " : x = " << x1 << ". : " << k
<< " f(x) = " << f(x1) << endl;
}
if (f(a)*f2(a) < 0) { x0 = a; t0 = b; }
else { x0 = b; t0 = a; }
if (found)
cout << " : x = " << x1 << ". : "
<< k << " f(x) = " << f(x1) << endl;
}
int main()
{
bool c = false;
do
{
do
{
cout << endl << " a: "; cin >> a;
cout << " b: "; cin >> b;
if (f(a)*f(b) > 0)
cout << " " << endl;
} while (f(a)*f(b) > 0);
Kasat(a, b);
Combo(a, b);
system("pause");
cout << " '1' '0' - "; cin >> c;
} while (c);
system("pause");
return 0;
}
:
,
.