MaplePrimes Questions

 

Buchberger function same as Basis function then how to make it as solver function?

is it the newly added y(y-1) be used in solver to find x ?

i find eliminate without y*(y-1) same solution as adding y*(y-1)

why premas and Reduce are different for calculating remainder h?

where is wrong in commented L and S polynomials ? LCM wrong?

with(Groebner):
with(ListTools):
with(combinat):

premas := proc(P,A, PRing)
local R, i, x;
R := P;
i := nops(A);
while i <> 0 do
 x := MainVariable(A[i], PRing);
 R := prem(R, A[i],x);
 i := i - 1:
od:
return R:
end proc:

Buchberger := proc(Fparam, PRing)
#Fparam := [x*y-x, -y+x^2]:
F := MakeUnique(Fparam):
GG := choose(F, 2):
G := F:
while GG <> [] do
f := GG[1][1]:
g := GG[1][2]:
GG := [seq(GG[i], i=2..nops(GG))]:
#L := lcm(TrailingTerm(f, PRing)[2],TrailingTerm(g, PRing)[2]):
#S := simplify(L/LeadingTerm(f, PRing)[2]*f - L/LeadingTerm(g, PRing)[2]*g);
S := SPolynomial(f, g, PRing);
#print("S",S);
#print("G",G);
# S reduce to G modulo h
#h := premas(S, G, PolynomialRing([x, y, z]));
h := Reduce(S, G, PRing, 'h');
#print("h",h);
if h = 0 then
h := []:
end if:
if h <> [] then
 GG := [op(GG), [SelectFirst(G), h]]:
 G := [op(G), h]:
end if:
od:
return G:
end proc:
sol := Buchberger([x*y-x, -y+x^2], plex(x, y));
factor(sol[nops(sol)]);
eliminate(sol,[x,y]);
eliminate([x*y-x, -y+x^2],[x,y]);
sol := Basis([x*y-x, -y+x^2], plex(x, y));
solve([x*y-x, -y+x^2]);
 

hello,

How I can remove this error for dsolve equation.

Thanks

2023.mw


 

"restart:Digits :=15: upsilon:=0.3:E(x):=E0*((x)/((b)))^(beta):rho(x):=rho0*((x)/((b)))^(beta):alpha(x):=alpha0*((x)/((b)))^(beta):a:=0.2:b:=1:omega:=100:E0:=390e9:rho0:=3900:T(x):=Ta+(Tb-Ta)/(ln(b/(a)))*(ln(x)-ln(a)):Ta:=373:Tb:=273:upsilon:=0.25:alpha0:=7e-6:  h(x):=(1-n*(x/(b)))^(k):n:=0.415196:k:=3:beta:=1:    dsys5 := {(1/(b))*( diff(u(x),x,x) )+(1/(b*h(x))*(diff(h(x),x))+1/(b*E(x))*(diff(E(x),x))+1/(b*(x)))*(diff(u(x),x))+((upsilon)/((b^(2)*x))*1/(h(x))*(diff(h(x),x))-1/((b*x)^(2))+(upsilon)/(b^(2)*(x))*1/(E(x))*(diff(E(x),x)))*b*u(x)+(1+upsilon)*((rho(x)*x*b*(omega^(2)))/(E(x))*(1-upsilon)-(alpha(x)*Ta)/(b)*(diff(T(x),x))-((diff(alpha(x),x))/(b)+(alpha(x)*diff(E(x),x))/(b*E(x))+(alpha(x)*diff(h(x),x))/(b*h(x)))*Ta*T(x) ),u(a) = 0,(E(b))/((1-upsilon^(2)))*(D^((1))(u)(b)+upsilon/(x)*D^((0))(u)(b))-(E(b)*alpha(b)*T(b)*Ta)/((1-upsilon^())) =-1}:dsol5 := dsolve(dsys5,abserr=1e-1, 'maxmesh'=900, numeric, method=bvp[middefer],output=listprocedure):fy := eval(u(x),dsol5)"

Error, invalid input: eval received dsol5, which is not valid for its 2nd argument, eqns

 

``


 

Download 2023.mw

pointset := [A, [0,0], B, [0,v_B], C, [u_C, v_C], D, [x_D, y_D], O, [x_O, y_O]];
for i from 1 to nops(pointset)/2 do
print(i, i+1);
pointset[i] := pointset[i+1];
od:
how to Make A := [0,0] instead of pointset[1] 

Hi, 

 

In help page DocumentTools:-Layout:-Font, there is an example which shows how to inser a hyperlink in a Layout.

F := Font( "Some text", size=16, color=blue, style=:-Hyperlink ):
InsertContent(Worksheet(Group(Input(Textfield( F ))))):

 

When this id done, how can we activate this hyperlink ?
5I'm presently working with Maple 2015.2 under Mac OS Mojave)

Thanks in advance

 

how I can gain a function that it is fitting in these data in x and y and z?

please see the following figure.

this curve is a 3D diagram in three coordinates x,y and z.

Thanks

PLOTfitting.xls

Let A be an nrxnr binary matrix. Suppose that the nxn binary matrix is obtained from the matrix A using the following code:

n := upperbound(A)[1]/r; 
B := Matrix(n, n, 0); 
for i to n do
 for j to n do 
  B[i, j] := SubMatrix(A, [(i-1)*r+1 .. i*r], [(j-1)*r+1 .. j*r])
 end do;
end do;

In other words, the matrix B is a decomposition of matrix A by rxr binary matrices. In the rest, we want to compute all determinants of the submatrices of B in module 2 as follows: 

u := 1; 
for k to n do
 P := choose(n, k); 
 for i to nops(P) do
  for j to nops(P) do
   W := []; 
   for ii in P[i] do 
    for jj in P[j] do
     W := [op(W), B[ii, jj]] 
    end do 
   end do;
   x := `mod`(Det(convert(blockmatrix(k, k, W), Matrix)), 2); 
  if x = 0 then 
    u := 0;
    i := nops(P)+1;
    j := nops(P)+1;
    k := n+1 
   end if 
  end do 
 end do; 
 unassign('i, j, ii, jj, W, x, P') 
end do

In the last step, we check that if the value of all sub determinants of B in module 2, are non zero, then we announce that the block matrix B is an MDS matrix

if u = 1 then print(MDS) else print(NoMDS) end if

Based on the above description I wrote the following procedure:

restart

with(LinearAlgebra); 
with(linalg, blockmatrix);
with(combinat)

MDS:=proc(A::Matrix,r::integer) 
   local n,B,i,j,u,ii,jj,k,P,W,x; 
   n:=upperbound(A)[1]/r;
   B:=Matrix(n,n,0); 
   for i to n do 
       for j to n do 
	        B[i,j]:=LinearAlgebra:-SubMatrix(A,[(i - 1)*r+1..i*r],[(j - 1)*r+1..j*r]) 
		end do 
	end do; 
	unassign('i,j');
	u:=1; 
	for k to n do
    	P:=combinat:-choose(n,k); 
		for i to nops(P) do
     		for j to nops(P) do
    			W:=[]; 
				for ii in P[i] do
    				for jj in P[j] do 
					    W:=[op(W),B[ii,jj]] 
					end do 
				end do; 
				x:=mod(Det(convert(linalg:-blockmatrix(k,k,W),Matrix)),2);
				if x=0 then 
				   u:=0;
				   i:=nops(P)+1;
				   j:=nops(P)+1;
				   k:=n+1
				end if 
			end do 
		end do; 
		unassign('i,j,ii,jj,W,x,P') 
	end do; 
	if u=1 then print(MDS) else print(NoMDS) end if 
end proc

 

My problem is that if A is a 64x64 binary matrix and also r=8, then the procedure MDS(A,8) takes 453 seconds to run in my computer (Maple 15 on windows 7 32bit with 4G RAM).

Is it possible to optimize the procedure such that MDS(A,8) takes less than 1 minutes.

Thanks for any help

I wrote a code for the following sequence. But I have a problem. What are the good methods for defining recursive sequence?

THE CODE

restart;
#FIRST STEP: Lets find the recursive formula for 
d:=proc(m)
option remember;
d(1):=1;
if m>1 then return -sum(xi(i)*d(i-k+1),i=2..m) else 1 fi;
end proc:
#lets check
for i from 1 to 4 do
d(i);
end do; 

 

 

Secondly, I want to create a matrix as follows. I wrote the code. I think it is right.

restart:
m:=4:
DD:=Matrix(m,m):
#SECOND STEP: Lets find the matrix 
for i from 1 to m do 
p:=0:
for j from 1 to m do 
 
if i<=j then p:=p+1:
DD[i,j]:=d(p);
 fi: 
end do;
p:=1: 
end do:
DD;

 

 

 

 

I am working with lines in 2- and 3-space, defined parametrically. In 2-space, how would I go about using Maple to determine if the lines are identical or parallel. For example, if L1:=<2-4*t,5+6*t>, L2:=<-6-12t,17+18t>, L3:=<20t,-30t>, I would like a procedure that would be able to determine that L1 and L2 are identical lines, and that L1 and L3 are parallel lines. Similarly, it would be able to determine if lines in 3-space, are identical, parallel, or skew. 

 

I was looking into the geometry package, but I don't think it allows me to do this.

 

Thanks!

 Mathematical model for the temperature profiles of steel pipes quenched by water cooling rings

Hi

 Can anyone solve the given equations along with the boundary conditions analytically with Maple and draw the graphs ???????????

Hi everyone,

I'm trying to define indexed functions inside a for loop. However, after the loop is completed, the indexes of the functions are replaced by the índex of the control variable of the loop plus one. For example, I can make successfully the code:

for i from 1 to n do a[i] := b[i]; od;

However, if I try to define the functions a[i](u), through the code 

for i from 1 to n do a[i] := u-> b[i](u); od;

 I get wrong assignments. For example, Maple returns to me, for any i<=n, a[i](u) = b[n+1](u). 

I'm using Maple 2019 on Windows. Is this a bug? There is a right way to do these function assignments inside a loop?

Best regards for all,

R. S. Vieira.

In a new worksheet

gcd(a,b);
                               1

 

Why is maple computing this? It does it for a lot of functions and I never know if it is giving the correct results. a and be are not defined. I'd expect it to just return gcd(a,b).

 

I put it in formulas but I never know if it is simplifying before computing. I have no idea why. Maple never did this stuff until I upgraded.

 

 

maple save variables is greyed out  would anyone happen to know why this could be the case?

                       tmmp := [1, 10 q]
                            PS1 := 1
                          PS2 := 10 q
                           [1, 10 q]
                        tnmp := [8, 5 q]
                            QS1 := 8
                           QS2 := 5 q

 

gP, gQ, S1, S2, P1, P2, Q1, Q2

(q*x + 9*q + y)^33*(4*q*x + 6*q + y)^16/((x + 3)^48*(x + 10)), (q*x + 9*q + y)^33*(4*q*x + 6*q + y)^16/((x + 3)^48*(x + 10)), 8, 6*q, 1, q, 1, -10*q    

Normal(Eval(gP, {x = QS1, y = QS2})*Eval(gQ, {x = S1, y = -S2})*1/(Eval(gP, {x = PS1, y = PS2})*Eval(gQ, {x = S1, y = -S2}))) mod p;
Error, (in mod/Normal) invalid arguments or not implemented
 

Hello people in mapleprimes,

I could modify an expression e_n_1b to simpler e_n_1e as is in attached file.
Is there any other way to change e_n_1b into e_n_1e?

Dec_22.mw

Thank you in advance.

taro

 

P1 := 1;
Q1 := 1;
P2 := q;
Q2 := -10*q;
p - 11;
                            P1 := 1
                            Q1 := 1
                            P2 := q
                          Q2 := -10 q
                               0
NULL;
if Q2 = P2 mod p then
    return 42;
else
    return 0;
end if;
(P2 - Q2) mod p;
                               0

I don't know why but   (p=11)   here the code below does not return 42  and 

evalb(Q2 = P2 mod p);      returns
                             false   

First 604 605 606 607 608 609 610 Last Page 606 of 2427