sunflower

30 Reputation

3 Badges

8 years, 341 days

MaplePrimes Activity


These are replies submitted by sunflower

@Carl Love  printf("*)->printf("*")? It same. thank you so much!

@vv Thank you so much! I understanded!

@vv  You see, I writed x[i] is not false. because I writed "while i<>j". It like your statement. Thank you!

@vv Thank you so much!

@tomleslie Thank you so much!yes. you see, in this example:

at 

k=2, x[1]:=1/4*1.8-1/4*0+1/4=0.7.. but Maple:1/4*1.8=9/20. I think that algorithm is true, but I don't understand why Maple don't add 1/4 in x[i].

@vv  Thank you! I understanded!

@tomleslie Sorry you. my English is not good, so I couldn't understand Carl's advice. Now, I understand after you guide. Thank you so much!

@Carl Love Thank you! I repaired:

Newton := proc (f, TOL, N)

local i, p, po; i := 1;

while i <= N do

    p := po-f(po)/(D(f))(po);

if abs(p-po) < TOL then return p;

      else i := i+1;

            po := p

end if;

end do;

printf("The method failed after N iterations) end proc:

Sorry you, I'm lack of knowdelge. and Maple still notie "error"

@Markiyan Hirnyk Thank you so much!

@vv Thank you so much!!! I understanded.

But dd:=cat("%",2*k,"d");
for i from 0 to n do 
  printf(cat(" "$(n-i)*k,dd$(i+1),"\n"), coeffs(expand((x+1)^i)));

 I don't understand cat("%",2*k,"d");. I only know, example cat(a, b)  ---> ab

Why appear "$"? sorry you, my English is not very good!

@vv sorry you! My knowledge isn't enough  to understand your procedure! :(

@Carl Love sorry you :(

Newton := proc (f, po, TOL, N)

local i, p; i := 1;

while i <= N do

  p := po-f(po)/(D(f))(po);

if abs(p-po) < TOL then return p else i := i+1; po := p end if end do;

printf("The method failed after N iterations,N=%d", N) end proc;
f:=x->exp(x)-x-2;
p0 := 2;
TOL := 10^(-5);
N := 50;
Newton(f, p0, TOL, N);

but maple noticed"error"  newton.mw

@Carl Love DX:= proc (n::nonnegint)

               local det, A;

                det := LinearAlgebra:-Determinant(A);

                    while not det::positive do A := LinearAlgebra:-RandomMatrix(n, datatype = float[8], shape = symmetric)

                       end do;

                A := (2/det)^(1/n)*A ;end proc:
example:

DX(3)

Maple noticed 'error'

Sincerely thanks!

@Carl Love Thank you so much!

1 2 3 4 Page 1 of 4