Separating multiple factors of a polynomial examples. Factorization. Lab Options

This online calculator is designed to factorize a function.

For example, factorize: x 2 /3-3x+12. Let's write it as x^2/3-3*x+12. You can also use this service, where all calculations are saved in Word format.

For example, decompose into terms. Let's write it as (1-x^2)/(x^3+x) . To see the progress of the solution, click Show steps. If you need to get the result in Word format, use this service.

Note: the number "pi" (π) is written as pi; square root as sqrt , for example sqrt(3) , tangent tg is written tan . To view the answer, see Alternative.

  1. If a simple expression is given, for example, 8*d+12*c*d, then factoring the expression means representing the expression in the form of factors. To do this, you need to find common factors. Let's write this expression as: 4*d*(2+3*c) .
  2. Present the product in the form of two binomials: x 2 + 21yz + 7xz + 3xy. Here you already need to find several common factors: x(x+7z) + 3y(x + 7z). We take out (x+7z) and get: (x+7z)(x + 3y) .

see also Division of polynomials with a corner (all steps of division with a column are shown)

Useful when studying the rules of factorization will be abbreviated multiplication formulas, with the help of which it will be clear how to open brackets with a square:

  1. (a+b) 2 = (a+b)(a+b) = a 2 +2ab+b 2
  2. (a-b) 2 = (a-b)(a-b) = a 2 -2ab+b 2
  3. (a+b)(a-b) = a 2 - b 2
  4. a 3 +b 3 = (a+b)(a 2 -ab+b 2)
  5. a 3 -b 3 = (a-b)(a 2 +ab+b 2)
  6. (a+b) 3 = (a+b)(a+b) 2 = a 3 +3a 2 b + 3ab 2 +b 3
  7. (a-b) 3 = (a-b)(a-b) 2 = a 3 -3a 2 b + 3ab 2 -b 3

Factorization Methods

After learning a few tricks factorization The following classification of solutions can be made:
  1. Using abbreviated multiplication formulas.
  2. Finding a common factor.

Definition 1. If the polynomial f(x) vanishes when the number c is substituted for the unknown, then c is called the root of the polynomial f(x) (or the equation f(x)=0).

Example 1. f(x)=x 5 +2x 3 -3x.

The number 1 is the root of f(x), and the number 2 is not the root of f(x), since f(1)=1 5 +2∙1 3 -3∙1=0, and f(2)=2 5 + 2∙2 3 -3∙2=42≠0.

It turns out that the roots of a polynomial are related to its divisors.

A number c is a root of the polynomial f(x) if and only if f(x) is divisible by x-c.

Definition 2. If c is the root of the polynomial f(x), then f(x) is divided by x-c. Then there will be natural number k such that f(x) is divisible by (x-c) k, but not divisible by (x-c) k+1. This number k is called the multiplicity of the root c of the polynomial f(x), and the root c itself is the k-fold root of this polynomial. If k=1, then the root c is called simple.

To find the multiplicity k of the root of the polynomial f(x), use the theorem:

If the number c is the k-fold root of the polynomial f(x), then for k>1 it will be the (k-1)-fold root of the first derivative of this polynomial; if k=1, then c will not serve as a root for f "(x).

Consequence. For the first time, the k-fold root of the polynomial f(x) will not serve as a root for the kth derivative.

Example 2. Make sure that the number 2 is the root of the polynomial f(x)=x 4 -4x 3 +16x-16. Determine its multiplicity.

Solution. The number 2 is the root of f(x), since 2 4 -4∙2 3 +16∙2-16=0.

f "(x)=4x 3 -12x 2 +16, f "(2)=4∙2 3 -12∙2 2 +16=0;

f ""(x)=12x 2 -24x, f ""(2)=12∙2 2 -24∙2=0;

f """(x)=24x-24, f """(2)=24∙2-24≠0.

The number 2 is not the root of f"""(x) for the first time, so the number 2 is a triple root of the polynomial f(x).

Let a polynomial f(x) of degree n≥1 with the leading coefficient 1 be given: f(x)=x n +a 1 x n -1 +...+a n -1 x+a n and α 1 ,...,α n is its roots. The roots of a polynomial and its coefficients are related by formulas called Vieta formulas:

a 1 = -(α 1 +...+α n),

a 2 =α 1 α 2 +...+α n-1 α n ,

a 3 = -(α 1 α 2 α 3 +...+α n-2 α n-1 α n),

...........................

a n =(-1) n α 1 α 2 ...α n .

Vieta's formulas make it easier to write a polynomial given its roots.

Example 3. Find a polynomial with simple roots 2; 3 and the double root –1.

Solution. Let's find the coefficients of the polynomial:

and 1 =– (2+3–1–1)=-3,

a 2 =2·3+2·(–1)+2·(–1)+3·(–1)+3·(–1)+(–1)·(–1)= –3,

a 3 =– (2·(–1)·(–1)+3·(–1)·(–1)+3·2·(–1)+3·2·(–1))= –7 ,

and 4 =3·2·(–1)·(–1)=6.

The required polynomial is x 4 –3x ​​3 –3x 2 –7x+6.

Definition 3. A polynomial f(x)ÌP[x] of degree n is reducible over a field P if it can be decomposed into the product of two factors φ(x) and ψ(x) from P[x], whose degrees are less than n:



f(x)=φ(x)ψ(x). (1)

f(x)ОP[x] is called irreducible over the field P if in any of its factorizations from P[x] one of the factors has degree 0, the other has degree n.

The following theorems hold:

Every polynomial of non-zero degree f(x) from the ring P[x] can be decomposed into a product of irreducible factors from P[x] uniquely up to factors of degree zero.

It easily follows from this that for any polynomial f(х)ОР[x] of degree n, n≥1, there is the following decomposition into irreducible factors:

where are irreducible polynomials in P[x] with leading coefficients equal to one. This expansion for a polynomial is unique.

The irreducible factors included in such an expansion do not have to be all different. If an irreducible polynomial occurs exactly k times in expansion (2), then it is called a k-fold factor of the polynomial f(x). If the factor P(x) appears in this expansion only once, then it is called a simple factor for f(x) .

If in expansion (2) identical factors are put together, then this expansion can be written in the following form:

, (3)

where the factors Р 1 (x),…, Р r (x) are already all different. The indicators k 1 ,…,k r here are equal to the multiplicities of the corresponding factors. Expansion (3) can be written as:

where F 1 (x) is the product of all simple irreducible factors, is the product of all double irreducible factors, etc. in expansion (3). If there are no m-fold factors in expansion (3), then the factor is considered equal to one.

The polynomials F 1 (x),…,F s (x) for the polynomial f(x) over number fields can be found using the concept of derivative, the Euclidean algorithm from the previously formulated theorem (about the connection with the derivative) as follows:



Therefore we get

Thus, for the polynomial f(x) we can find the factors .

If for a polynomial f(x) it is necessary to find the factors F 1 (x),...,F s (x) of its expansion (4), then they say that it is necessary to separate its multiple factors.

Example 4. Separate multiple factors f(x)=x 5 -x 4 -5x 3 +x 2 +8x+4.

Solution. Find the gcd f(x) and f "(x)=5x 4 -4x 3 -15x 2 +2x+8.

d 1 (x)=[ f(x), f "(x)]=x 3 -3x-2.

Now we find d 2 (x)=(d 1 (x), d 1 " (x)).

We express v 1 (x), v 2 (x), v 3 (x).

(we make division).

v 1 (x)=x 2 -x-2.

(we make division).

Therefore we get F 3 (x)=v 3 (x)=x+1,

Thus, the polynomial f(x) has the expansion f(x)=(x-2) 2 (x+1) 3. In expansion (3) of the polynomial f(x) there are no prime factors, a double factor is x-2 and a triple factor is x+1.

Note 1. This method does not give anything if all the irreducible factors of the polynomial f(x) are simple (we obtain the identity f(x)=F 1 (x)).

Note 2. This method allows you to determine the multiplicities of all roots of an arbitrary polynomial.

LABORATORY WORK OPTIONS

Option 1

1. Make sure that the polynomial 3x 4 -5x 3 +3x 2 +4x-2 has a root 1+i. Find the remaining roots of the polynomial.

2. Separate the multiples of x 5 +5x 4 -5x 3 -45x 2 +108.

3. Find the polynomial of the smallest degree whose roots are: 5, i, i+3.

Option 2

1. What is the multiplicity of the root x 0 = 2 for the polynomial f(x) = x 5 -7x 4 +12x 3 +16x 2 -64x+48? Find the rest of its roots.

2. Separate multiples of x 5 -6x 4 +16x 3 -24x 2 +20x-8.

3. Determine the relationship between the coefficients of the equation x 3 +px+q=0, if its roots x 1, x 2, x 3 satisfy the relation.

Option 3

1. What is the multiplicity of the root x 0 = 4 for the polynomial x 4 -7x 3 +9x 2 +8x+16? Find the remaining roots.

2. Separate the multiples x 6 -2x 5 -x 4 -2x 3 +5x 2 +4x+4.

3. Determine λ so that one of the roots of the equation is equal to twice the other: x 3 -7x+λ=0.

Option 4

1. Show that x=3 is the root of the polynomial f(x)=x 4 -6x 3 +10x 2 -6x+9. Determine its multiplicity and find the remaining roots.

2. Separate the multiple factors of the polynomial x 5 +6x 4 +13x 3 +14x 2 +12x+8.

3. The sum of two roots of the equation 2x 3 -x 2 -7x+λ=0 is equal to 1. Find λ.

Option 5

1. Show that x 0 = -2 is the root of the polynomial x 4 + x 3 -18x 2 -52x-40. Determine its multiplicity and find the remaining roots.

2. Separate the multiple factors of the polynomial f(x) = x 5 -5x 4 -5x 3 +45x 2 -108.

3. Find the polynomial of the smallest degree given the roots 1, 2, 3, 1+i.

Option 6

1. Find the condition under which the polynomial x 5 + ax 4 + b has a double root that is different from zero.

2. Separate the multiple factors of the polynomial x 6 +15x 4 -8x 3 +51x 2 -72x+27.

3. The polynomial a 0 x n +a 1 x n -1 +…+a n has roots x 1, x 2,…, x n. What roots do the polynomials have: 1) a 0 x n -a 1 x n -1 +a 2 x n -2 +…+(-1) n a n ;

2) a n x n +a n-1 x n-1 +…+a 0 ?

Option 7

1. Show that x=-2 is the root of the polynomial 4x 5 +24x 4 +47x 3 +26x 2 -12x-8. Find the multiplicity of the root and find the remaining roots of the polynomial.

3. Find the sum of the squares of the roots of the equation 2x 3 -2x 2 -4x-1.

Option 8

1. Prove that x=1 is the root of the polynomial x 6 -x 5 -4x 4 +6x 3 +x 2 -5x+2. Determine its multiplicity. Find the remaining roots of the polynomial.

3. One of the roots of the polynomial is twice as large as the other. Find the roots of the polynomial f(x)=x 3 -7x 2 +14x+λ.


Option 9

1. Find the condition under which the polynomial x 5 +10ax 3 +5bx+c has a triple root that is different from zero.

2. Separate the multiple factors of the polynomial x 7 -3x 6 +5x 5 -7x 4 +7x 3 -5x 2 +3x-1.

3. Solve the equation x 3 -6x 2 +qx+2=0, if it is known that its roots form an arithmetic progression.

Option 10

1. Show that x=3 is the root of the polynomial f(x)=x 4 -12x 3 +53x 2 -102x+72. Determine the multiplicity of the root, find other roots of the polynomial.

2. Separate the multiple factors of the polynomial x 6 -4x 4 -16x 2 +16.

3. Find a polynomial with real coefficients of the smallest degree given the roots 1, 2+i, 3.

Option 11

1. Show that x=2 is the root of the polynomial x 5 -6x 4 +13x 3 -14x 2 +12x-8. Find its multiplicity and other roots.

2. Separate the multiple factors of the polynomial x 4 + x 3 -3x 2 -5x-2.

3. Construct a polynomial of the smallest degree if its roots x 1 =2, x 2 =1-i, x 3 =3 are known.

Option 12

1. Show that x = -1 is the root of the polynomial x 4 + x 3 -3x 2 -5x-2. Find its multiplicity and the remaining roots of the polynomial.

2. Separate the multiple factors of the polynomial x 5 -3x 4 +4x 3 -4x 2 +3x-1.

3. Construct a polynomial of the smallest degree if its roots x 1 =i, x 2 =2+i, x 3 =x 4 =2 are known.

Option 13

1. What is the multiplicity of the root x 0 = 4 for the polynomial x 4 -7x 3 +9x 2 +8x+16? Find the remaining roots of the polynomial.

2. Separate the multiple factors of the polynomial x 6 -2x 5 -x 4 -2x 3 +5x 2 +4x+4.

3. Determine λ so that one of the roots of the equation x 3 -7x+λ=0 is equal to twice the other.

Theorem 14.1. (Fundamental theorem about polynomials). Any polynomial of positive degree over a field F can be represented as a product of irreducible polynomials over F, and such a representation is unique up to the order of the factors and association.

Proof. 1) Existence. Let f(x) F(x) And deg f(x)=n> 0. We carry out the proof using the method of mathematical induction on the parameter n.

1. Let n=1 f(x) irreducible over F => f(x)=f(x)– the required representation.

2. Let us assume that the statement is true for any polynomial of positive degree< n over the field F.

3. Let us prove the statement for the polynomial f(x). If f(x) irreducible over F, That f(x)=f(x) is the required representation. Let f(x) we give above F f(x)=f 1 (x) , Where f 1 (x),f 2 (x)F[x] and 0 < deg f i < n, i= f 1 (x) = p 1 (x)·p 2 (x) · …·p r (x) And f 2 (x)=q 1 (x) ·…·q s (x)– representation and in the form of a product of irreducible polynomials over f=f 1 f 2 = p 1 · … ·p r · q 1 · … ·q s– the required representation.

From 1–3, using the method of mathematical induction, the statement is true for any n N.

2) Uniqueness. Let f(x)=p 1 (x)· … ·p r (x) And f(x)=q 1 (x)· … ·q s (x)– required representations (1). Because r,s N, either r s, or r s. Let, for example, r s. Since the left side of (1) is divisible by p 1 , That (q 1 · … ·q s) p 1 by Lemma 13.4 at least one of the factors is divisible by p 1 . Since the factors can be swapped, we will assume that q 1 p 1 by Lemma 13.2 q 1 ~q 2 and by remark 3 q 1 =p 1 ·a 0 , where a 0 F# => p 1 · … ·p r =a 0 ·p 1 · q 2 · … ·q s, (2). Since the left side of (2) is divisible by R 2 , then as above, we get R 2 ~q 2 and R 2 =q 2 b 0 , where b 0 F#, and (3), etc., after a finite number of steps we get 1 =a 0 · 0 · … ·q r + 1 · … ·q s(4). Let's assume that r 1 q r + 1 => deg q r + 1 =0 => contradiction => r=s. Thus, the representation of the polynomial f(x) in the form of the required product is determined uniquely up to the order of the factors and association. The theorem has been proven.

Definition 14.1. Let F- field. Polynomial f(x)=a 0 x n +a 1 x n - 1 +…+a n - 1 x+a n F[x]is called normalized or given, If A 0 = 1.

Corollary 14.1.1. Any polynomial f of positive degree over a field F can be represented in the form: f=a 0 ·p 1 (x) · … ·p r (x), where a 0 F #, p 1,…,p r are normalized polynomials irreducible over F.

Remark 14.1. Let f(x) F[x], F - field, degf(x)>0. Then by Corollary 14.1.1 f(x)=a 0 · … ·p 1 (x)· … ·p r (x)(1),where a 0 F #, p 1 (x),…,p r (x) - irreducible over F normalized polynomials. It is possible that among the polynomials p 1 ,…,p r there are equals . Multiplying equal factors in (1), we obtain an equality of the form f(x)=а 0 ·p 1 k 1 · … ·p s k s .

Definition 14.2. Let f(x) F[x], F- field, deg f(x)>0. Polynomial representation f(x) as f(x)=a 0 · p 1 k 1 · … · p s k s (2), Where a 0 F # , p 1, …, p s- pairwise distinct irreducibles over a field F normalized polynomials, k i ≥1, i=,called canonical representation polynomial f, number k i called multiplicity of the factor p i , i=. If k i = 1, then p i is called a simple irreducible factor of the polynomial f.



Corollary 14.2.Let f(x), g(x) F[x], F - field, f(x)=a 0 p 1 k 1 · … ·p s k s , g(x)=b 0 ·p 1 l 1 · … ·p s l s , where a 0 ,b 0 F # , p 1 , …,p s – pairwise distinct normalized polynomials irreducible over F, k i 0,l i 0, i= . Then (f,g)=p 1 γ 1 ·p 2 γ 2 · … · p s γ s , where γ i =min{k i ,l i} , i= ,[f,g]= p 1 δ 1 ·p 2 δ 2 · … ·p s δ s, where δ i =max(k i,l i), i=.

Definition 14.3. Let f(x) F[x], F- associative-commutative ring with identity, With- root f(x). Number k called multiplicity root c polynomial f(x), If

f (x-s) k, But f (x-c) k + 1 .

In this case they write (x-c) k ┬ f(x) - this entry means that (x-c) k- this is the highest degree (x-s), which divides f(x).

Remark 14.2. If k = 1, then With called a simple root of a polynomial f(x).

Let f(x) F[x], F- field. Let us set ourselves the task of separating all the multiple irreducible factors of the polynomial f(x). To do this, we prove the following theorem. Polynomial f(x) F[x], where F is a field, has no multiple irreducible factors of multiplicity k > 1(f,f ")= 1.

Corollary 14.2.3.Multiple irreducible factors of the polynomial f F[x] are exactly the irreducible factors of the polynomial d(x)=(f,f ").

Conclusion: Thus, the problem of separating multiple irreducible factors of a polynomial f(x) comes down to finding d=(f,f ") and expansion of the polynomial d by multipliers. In turn, separate the multiple irreducible factors of the polynomial d(x) possible by finding d 1 =(d,d ") etc.

There are methods that allow you to find out whether a given polynomial has multiple factors, and if the answer is positive, they make it possible to reduce the study of this polynomial to the study of polynomials that no longer contain multiple factors.

Theorem. If is a multiple irreducible factor of a polynomial, then it will be a multiple factor of the derivative of this polynomial. In particular, the prime factor of a polynomial. Does not enter into derivative expansion.

In fact, let

and is no longer divisible by. Differentiating equality (5.1), we obtain:

The second of the terms in parentheses is not divisible by. Indeed, it is not divisible by condition, it has a lower degree, i.e. also not divisible by. On the other hand, the first term of the sum in square brackets is divided by, i.e. the multiplier actually comes into play with the multiple.

From this theorem and from the above method of finding the greatest common divisor of two polynomials it follows that if the decomposition of a polynomial into irreducible factors is given:

then the greatest common divisor of a polynomial and its derivative has the following decomposition into irreducible factors:

where the multiplier should be replaced by one. In particular, a polynomial does not contain multiple factors if and only if it is coprime to its derivative.

Isolation of multiples

If a polynomial with expansion (5.2) is given and if we denote the greatest common divisor and its derivative, then (5.3) will be an expansion for. Dividing (5.2) by (5.3), we get:

those. we obtain a polynomial that does not contain multiple factors, and every irreducible factor for which, generally speaking, has a lower degree and, in any case, contains only prime factors. If this problem is solved, then all that remains is to determine the multiplicity of the found irreducible factors in, which is achieved by using the division algorithm.

Complicating the method outlined now, we can immediately proceed to the consideration of several polynomials without multiple factors, and, having found the irreducible factors of these polynomials, we will not only find all the irreducible factors for, but will also know their multiplicity.

Let (5.2) be a decomposition into irreducible factors, and the highest multiplicity of factors is, . Let us denote by the product of all single factors of a polynomial, by the product of all double factors, but taken only once, etc., finally, by the product of all -multiple factors, also taken only once; if for some in there are no -multiple factors, then we assume. Then it will be divided by the degree of the polynomial and expansion (5.2) will take the form

and expansion (5.3) for will be rewritten in the form

denoting through the greatest common divisor of a polynomial and its derivative and in general through the greatest common divisor of polynomials and, in this way, we obtain:

……………………………

……………………………

And so finally

Thus, using only techniques that do not require knowledge of the irreducible factors of the polynomial, namely taking the derivative, the Euclidean algorithm and the division algorithm, we can find polynomials without multiple factors, and every irreducible factor of the polynomial will be - multiple for.

Example. Factor a polynomial into multiples.

The polynomial has an expansion in the form.

I compiled a program to factor a polynomial into multiples.

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, Grids;

TForm1 = class(TForm)

SGd1: TStringGrid;

Button1: TButton;

SGd2: TStringGrid;

SGd3: TStringGrid;

SGd4: TStringGrid;

procedure Button1Click(Sender: TObject);

(Private declarations)

(Public declarations)

c,i,st1,st2,stiz,n_iz,n_nod,n,m,d_st,step,f:integer;

kof1,kof2,k1,k2,izubst,a,b,a2,b2,buf,est,fxst:array of integer;

izub,e,fx:array of integer;

procedure TForm1.Button1Click(Sender: TObject);

var i,j,k_1,st3,l:integer;

k2_2,k1_1:array of integer;

st1:=StrToInt(Edit1.Text);

for i:=0 to st1 do begin

SGd4.Cells:=SGd1.Cells;

for i:=0 to st1 do begin

if SGd1.Cells<>"" then

kof1:=StrToInt(SGd1.Cells)

else MessageDlg("Attention! Coefficient values ​​have not been entered!",mtWarning,,0);

for i:=st1 downto 0 do begin

if kof1[i]<>0 then begin

if(kof1<0)or(i=0) then begin

s:=s+d+"x^"+k+"+";

kof2:=kof1[i]*i;

//Edit2.Text:=s;

for i:=st2 downto 0 do begin

SGd2.Cells:=inttostr(kof2[i]);

if kof2[i]<>0 then begin

if(kof2<0)or(i=1) then begin

s:=s+d+"x^"+k+"+";

//Edit3.Text:=s;

for i:=0 to st1 do begin

kof1[i]:=StrToInt(SGd1.Cells);

k1[i]:=StrToInt(SGd1.Cells);

for i:=0 to st2 do begin

kof2[i]:=StrToInt(SGd2.Cells);

k2[i]:=StrToInt(SGd2.Cells);

while kof2<>0 do begin

//Edit4.Text:="";

if k1<>kof2 then begin

if (k1 mod kof2)=0 then begin

for j:=0 to st2 do

k2[j]:=(k1 div kof2)*kof2[j];

if k2<>1 then

for j:=0 to st1 do

k1[j]:=kof2*k1[j];

if k_1<>1 then begin

for j:=0 to st2 do

k2[j]:=k_1*kof2[j];

for i:=1 to st1 do begin

k1:=k1[i]-k2[i];

until st1

if k1<>0 then begin //Abbreviation

for i:=1 to st1 do

if k1[i]<>0 then begin

if (k1[i] mod k1)<>0 then sokr:=false;

if sokr=true then

for i:=0 to st1 do

k1[i]:=k1[i] div k_1;

for i:=0 to st2 do //Replacing polynomials

k2_2[i]:=kof2[i];

for i:=0 to st1 do

for i:=0 to 10 do begin

SGd3.Cells:="";

SGd1.Cells:="";

izub:=0;

izubst:=st2;

for i:=0 to st2 do begin

SGd1.Cells:=inttostr(k1[i]);

izub:=k1[i];

if k1[i]<>0 then begin

//Edit4.Text:=Edit4.Text+IntToStr(k1[i])+"x^"+IntToStr(st2-i);

if (k2_2>0)and(i

for i:=0 to st1 do begin

kof2[i]:=k1_1[i];

d_st:=StrToInt(Edit1.Text);

for i:=d_st+1 downto 1 do begin

kof1[i]:=StrToInt(SGd4.Cells);

//Finding E

for n_nod:=1 to n_iz do begin

m:=izubst;

for i:=n+1 downto 1 do begin

for i:=m+1 downto 1 do begin

b[i]:=izub;

for i:=n+1 downto 1 do begin

if a[i]<>0 then begin

if(a<0)or(i=1) then begin

s:=s+d+"x^"+k+"+";

//Edit3.Text:=s;

for i:=m+1 downto 1 do begin

if b[i]<>0 then begin

if(b<0)or(i=1) then begin

s:=s+d+"x^"+k+"+";

//Edit4.Text:=s;

for j:=n+1 downto 1 do begin

for j:=m+1 downto 1 do begin

b2[j]:=buf[i]*b[j];

for j:=f downto 1 do begin

a2[j]:=a2[j]*b;

for j:=f downto 1 do begin

a2[j]:=a2[j]-b2;

for i:=f+1 downto 1 do begin

e:=buf[i];

if buf[i]<>0 then begin

if(buf<0)or(i=1) then begin

s:=s+d+"x^"+k+"+";

//Edit5.Text:=s;

for i:=n downto 0 do begin

if a2[i]<>0 then begin

if(a2<0)or(i=1) then begin

s:=s+d+"x^"+k+"+";

for n_nod:=1 to n_iz-1 do begin

m:=est;

for i:=n+1 downto 1 do begin

a[i]:=e;

for i:=m+1 downto 1 do begin

b[i]:=e;

if n_nod=n_iz-1 then fx:=b[i];

for i:=n+1 downto 1 do begin

if a[i]<>0 then begin if(a<0)or(i=1) then begin

s:=s+d+"x^"+k+"+";

//Edit3.Text:=s;

for i:=m+1 downto 1 do begin

if b[i]<>0 then begin if(b<0)or(i=1) then begin

s:=s+d+"x^"+k+"+";

//Edit4.Text:=s;

for j:=n+1 downto 1 do begin

for i:=step+1 downto 1 do begin

for j:=m+1 downto 1 do begin

b2[j]:=buf[i]*b[j];

for j:=f downto 1 do begin

a2[j]:=a2[j]*b;

for j:=f downto 1 do begin

a2[j]:=a2[j]-b2;

for i:=f+1 downto 1 do begin

fx:=buf[i];

if buf[i]<>0 then begin if(buf<0)or(i=1) then begin

s:=s+d+"x^"+k+"+";

//Edit5.Text:=s;

for i:=n downto 0 do begin

if a2[i]<>0 then begin if(a2<0)or(i=1) then begin

s:=s+d+"x^"+k+"+";

fxst:=est+1;

for i:=1 to n_iz do begin

for j:=fxst[i] downto 0 do begin

if fx<>0 then begin

if(fx<0)or(j=1) then begin

s:=s+d+"x^"+k+"+";

s:=s+")^"+IntToStr(i)+" ";

Edit6.Text:=Edit6.Text+s;

for i:=0 to 10 do begin

SGd1.Cells:=SGd4.Cells;

Share