MaplePrimes Questions

I can do that for a cylinder (in green below) but not for a box geometry.

Box_geometry_and_pendulum.msim

 

intersections := proc(P, Q, T)
local R, W, w, t, a, b, sol, buff, v;
sol := []; if T = Y then W := X; else W := Y; end if;
R := resultant(P, Q, T);
print(`Résultant :`);
print(R);
w := fsolve(R, W); t := [];
for v in [w] do t := [op(t), fsolve(subs(W = v, P), T)]; end do;
for a in [w] do for b in [t] do if T = Y then buff := abs(subs(X = a, Y = b, P)) + abs(subs(X = a, Y = b, Q));
printf(`X=%a,   Y=%a   --->  %a\\n`, a, b, buff); if buff < 1/100000000 then sol := [op(sol), [a, b]]; end if;
else buff := abs(subs(X = b, Y = a, P)) + abs(subs(X = b, Y = a, Q));
printf(`X=%a,   Y=%a   --->  %a\\n`, b, a, buff); if buff < 1/100000000 then sol := [op(sol), [b, a]];
end if; end if; end do; end do;
printf(`Nombre de solutions :  %a\\n`, nops(sol)); print(sol); end proc;
Try with :
intersections(X^2 + Y^2 - 1, X - Y, X); Would you like to develop this procedure which does not give the number of solutions ?Thank you.

i want to factoring the (m+G'/G) in my long equation but i use some trick but still i can't get the exactly system and still G will remain in my system what should i factoring for remove this G(xi) from my system is all about factoring , my system of equation are wrong contain G(xi) How i can remove it by taking a factoring or any other technique,

not parameter is arbitrary except V and sigma''

restart

with(PDEtools)

with(LinearAlgebra)

with(Physics)

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

_local(gamma)

Warning, A new binding for the name `gamma` has been created. The global instance of this name is still accessible using the :- prefix, :-`gamma`.  See ?protect for details.

 

declare(Omega(x, t)); declare(U(xi)); declare(u(x, y, z, t)); declare(Q(xi)); declare(V(xi))

Omega(x, t)*`will now be displayed as`*Omega

 

U(xi)*`will now be displayed as`*U

 

u(x, y, z, t)*`will now be displayed as`*u

 

Q(xi)*`will now be displayed as`*Q

 

V(xi)*`will now be displayed as`*V

(2)

NULL

ode := (-V*a[2]+a[1])*(diff(diff(U(xi), xi), xi))+U(xi)*(((-gamma+sigma)*k+b)*U(xi)^2-a[1]*k^2+(w*a[2]-alpha)*k-w) = 0

(-V*a[2]+a[1])*(diff(diff(U(xi), xi), xi))+U(xi)*(((-gamma+sigma)*k+b)*U(xi)^2-a[1]*k^2+(w*a[2]-alpha)*k-w) = 0

(3)

F := sum(e[i]*(m+(diff(G(xi), xi))/G(xi))^i, i = -1 .. 1)

e[-1]/(m+(diff(G(xi), xi))/G(xi))+e[0]+e[1]*(m+(diff(G(xi), xi))/G(xi))

(4)

D1 := diff(F, xi)

-e[-1]*((diff(diff(G(xi), xi), xi))/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)/(m+(diff(G(xi), xi))/G(xi))^2+e[1]*((diff(diff(G(xi), xi), xi))/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)

(5)

NULL

S := diff(G(xi), `$`(xi, 2)) = -(2*m*mu+lambda)*(diff(G(xi), xi))-mu

diff(diff(G(xi), xi), xi) = -(2*m*mu+lambda)*(diff(G(xi), xi))-mu

(6)

E1 := subs(S, D1)

-e[-1]*((-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)/(m+(diff(G(xi), xi))/G(xi))^2+e[1]*((-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)

(7)

D2 := diff(E1, xi)

2*e[-1]*((-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)*((diff(diff(G(xi), xi), xi))/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)/(m+(diff(G(xi), xi))/G(xi))^3-e[-1]*(-(2*m*mu+lambda)*(diff(diff(G(xi), xi), xi))/G(xi)-(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))/G(xi)^2-2*(diff(G(xi), xi))*(diff(diff(G(xi), xi), xi))/G(xi)^2+2*(diff(G(xi), xi))^3/G(xi)^3)/(m+(diff(G(xi), xi))/G(xi))^2+e[1]*(-(2*m*mu+lambda)*(diff(diff(G(xi), xi), xi))/G(xi)-(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))/G(xi)^2-2*(diff(G(xi), xi))*(diff(diff(G(xi), xi), xi))/G(xi)^2+2*(diff(G(xi), xi))^3/G(xi)^3)

(8)

E2 := subs(S, D2)

2*e[-1]*((-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)^2/(m+(diff(G(xi), xi))/G(xi))^3-e[-1]*(-(2*m*mu+lambda)*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-3*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))/G(xi)^2+2*(diff(G(xi), xi))^3/G(xi)^3)/(m+(diff(G(xi), xi))/G(xi))^2+e[1]*(-(2*m*mu+lambda)*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-3*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))/G(xi)^2+2*(diff(G(xi), xi))^3/G(xi)^3)

(9)

D3 := diff(E2, xi)

-6*e[-1]*((-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)^2*((diff(diff(G(xi), xi), xi))/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)/(m+(diff(G(xi), xi))/G(xi))^4+4*e[-1]*((-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)*(-(2*m*mu+lambda)*(diff(diff(G(xi), xi), xi))/G(xi)-(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))/G(xi)^2-2*(diff(G(xi), xi))*(diff(diff(G(xi), xi), xi))/G(xi)^2+2*(diff(G(xi), xi))^3/G(xi)^3)/(m+(diff(G(xi), xi))/G(xi))^3+2*e[-1]*(-(2*m*mu+lambda)*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-3*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))/G(xi)^2+2*(diff(G(xi), xi))^3/G(xi)^3)*((diff(diff(G(xi), xi), xi))/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)/(m+(diff(G(xi), xi))/G(xi))^3-e[-1]*((2*m*mu+lambda)^2*(diff(diff(G(xi), xi), xi))/G(xi)+(2*m*mu+lambda)*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))/G(xi)^2+3*(2*m*mu+lambda)*(diff(diff(G(xi), xi), xi))*(diff(G(xi), xi))/G(xi)^2+6*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))^2/G(xi)^3-3*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(diff(G(xi), xi), xi))/G(xi)^2+6*(diff(G(xi), xi))^2*(diff(diff(G(xi), xi), xi))/G(xi)^3-6*(diff(G(xi), xi))^4/G(xi)^4)/(m+(diff(G(xi), xi))/G(xi))^2+e[1]*((2*m*mu+lambda)^2*(diff(diff(G(xi), xi), xi))/G(xi)+(2*m*mu+lambda)*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))/G(xi)^2+3*(2*m*mu+lambda)*(diff(diff(G(xi), xi), xi))*(diff(G(xi), xi))/G(xi)^2+6*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))^2/G(xi)^3-3*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(diff(G(xi), xi), xi))/G(xi)^2+6*(diff(G(xi), xi))^2*(diff(diff(G(xi), xi), xi))/G(xi)^3-6*(diff(G(xi), xi))^4/G(xi)^4)

(10)

E3 := subs(S, D3)

-6*e[-1]*((-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)^3/(m+(diff(G(xi), xi))/G(xi))^4+6*e[-1]*((-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)*(-(2*m*mu+lambda)*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-3*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))/G(xi)^2+2*(diff(G(xi), xi))^3/G(xi)^3)/(m+(diff(G(xi), xi))/G(xi))^3-e[-1]*((2*m*mu+lambda)^2*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)+4*(2*m*mu+lambda)*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))/G(xi)^2+12*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))^2/G(xi)^3-3*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)^2/G(xi)^2-6*(diff(G(xi), xi))^4/G(xi)^4)/(m+(diff(G(xi), xi))/G(xi))^2+e[1]*((2*m*mu+lambda)^2*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)+4*(2*m*mu+lambda)*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))/G(xi)^2+12*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))^2/G(xi)^3-3*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)^2/G(xi)^2-6*(diff(G(xi), xi))^4/G(xi)^4)

(11)

NULL

NULL

K := U(xi) = F

K1 := diff(U(xi), xi) = E1

K2 := diff(U(xi), `$`(xi, 2)) = E2

K3 := diff(U(xi), `$`(xi, 3)) = E3

NULL

L := eval(ode, {K, K1, K2, K3})

(-V*a[2]+a[1])*(2*e[-1]*((-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-(diff(G(xi), xi))^2/G(xi)^2)^2/(m+(diff(G(xi), xi))/G(xi))^3-e[-1]*(-(2*m*mu+lambda)*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-3*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))/G(xi)^2+2*(diff(G(xi), xi))^3/G(xi)^3)/(m+(diff(G(xi), xi))/G(xi))^2+e[1]*(-(2*m*mu+lambda)*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)/G(xi)-3*(-(2*m*mu+lambda)*(diff(G(xi), xi))-mu)*(diff(G(xi), xi))/G(xi)^2+2*(diff(G(xi), xi))^3/G(xi)^3))+(e[-1]/(m+(diff(G(xi), xi))/G(xi))+e[0]+e[1]*(m+(diff(G(xi), xi))/G(xi)))*(((-gamma+sigma)*k+b)*(e[-1]/(m+(diff(G(xi), xi))/G(xi))+e[0]+e[1]*(m+(diff(G(xi), xi))/G(xi)))^2-a[1]*k^2+(w*a[2]-alpha)*k-w) = 0

(12)

NULL

# rewritting rule

RR := isolate(m+diff(G(xi), xi)/(G(xi))=Phi, diff(G(xi), xi)/G(xi));

(diff(G(xi), xi))/G(xi) = Phi-m

(13)

# Apply RR and collect wrt Phi

subs(RR, L):
normal(%):
PhiN := collect(numer(lhs(%)), phi):
PhiD := denom(lhs(%%));

Phi^3*G(xi)^4

(14)



with(LargeExpressions):

LLE := collect(PhiN, Phi, Veil[phi] ):
LLE / PhiD = 0;

(Phi^6*phi[1]+3*Phi^5*phi[2]-Phi^4*phi[3]-Phi^3*phi[4]-Phi^2*phi[5]+Phi*phi[6]-phi[7])/(Phi^3*G(xi)^4) = 0

(15)

# phi[i] coefficients


phis := [ seq( phi[i] = simplify(Unveil[phi](phi[i]), size), i=1..LastUsed[phi] ) ]:

print~( phis ):

phi[1] = G(xi)^4*e[1]^3*((-gamma+sigma)*k+b)

 

phi[2] = e[1]^2*G(xi)^4*e[0]*((-gamma+sigma)*k+b)

 

phi[3] = -3*e[1]*G(xi)^4*(-(1/3)*a[1]*k^2+(-e[-1]*(gamma-sigma)*e[1]+(-gamma+sigma)*e[0]^2+(1/3)*w*a[2]-(1/3)*alpha)*k+b*e[-1]*e[1]+b*e[0]^2-(1/3)*w)

 

phi[4] = (2*e[1]*(V*a[2]-a[1])*(diff(G(xi), xi))^3+3*e[1]*G(xi)*(2*m*mu+lambda)*(V*a[2]-a[1])*(diff(G(xi), xi))^2+e[1]*(V*a[2]-a[1])*G(xi)*((2*m*mu+lambda)^2*G(xi)+3*mu)*(diff(G(xi), xi))+G(xi)^2*(-(6*e[-1]*((-gamma+sigma)*k+b)*e[1]-a[1]*k^2+k*w*a[2]+((-gamma+sigma)*k+b)*e[0]^2-k*alpha-w)*e[0]*G(xi)+e[1]*mu*(2*m*mu+lambda)*(V*a[2]-a[1])))*G(xi)

 

phi[5] = -3*e[-1]*G(xi)^4*(-(1/3)*a[1]*k^2+(-e[-1]*(gamma-sigma)*e[1]+(-gamma+sigma)*e[0]^2+(1/3)*w*a[2]-(1/3)*alpha)*k+b*e[-1]*e[1]+b*e[0]^2-(1/3)*w)

 

phi[6] = 4*((1/2)*(V*a[2]-a[1])*(diff(G(xi), xi))^3+(3/2)*(V*a[2]-a[1])*(m*mu+(1/2)*lambda)*G(xi)*(diff(G(xi), xi))^2+(V*a[2]-a[1])*((m*mu+(1/2)*lambda)^2*G(xi)+(3/4)*mu)*G(xi)*(diff(G(xi), xi))+(1/2)*((3/2)*e[0]*((-gamma+sigma)*k+b)*e[-1]*G(xi)+(V*a[2]-a[1])*(m*mu+(1/2)*lambda)*mu)*G(xi)^2)*e[-1]*G(xi)

 

phi[7] = 8*e[-1]*((1/4)*(V*a[2]-a[1])*(diff(G(xi), xi))^4+(V*a[2]-a[1])*(m*mu+(1/2)*lambda)*G(xi)*(diff(G(xi), xi))^3+(V*a[2]-a[1])*((m*mu+(1/2)*lambda)^2*G(xi)+(1/2)*mu)*G(xi)*(diff(G(xi), xi))^2+(V*a[2]-a[1])*(m*mu+(1/2)*lambda)*mu*G(xi)^2*(diff(G(xi), xi))+(1/4)*(-(1/2)*((-gamma+sigma)*k+b)*e[-1]^2*G(xi)^2+mu^2*(V*a[2]-a[1]))*G(xi)^2)

(16)

# WATCHOUT: you have 9 coefficients and so its desirable to have the same number of unknowns

unknowns := indets(rhs~(phis), {e[-1],e[0],e[1],'identical'(mu),'identical'(lambda),'identical'(a[1]),'identical'(alpha)});

COEFFS := solve(rhs~(phis), unknowns)

{alpha, lambda, mu, a[1], e[-1], e[0], e[1]}

 

{alpha = alpha, lambda = lambda, mu = mu, a[1] = a[1], e[-1] = 0, e[0] = 0, e[1] = 0}, {alpha = alpha, lambda = lambda, mu = mu, a[1] = -(gamma*k*e[0]^2-k*sigma*e[0]^2-b*e[0]^2-k*w*a[2]+alpha*k+w)/k^2, e[-1] = 0, e[0] = e[0], e[1] = 0}, {alpha = (1/2)*(-G(xi)^4*gamma*k^3*e[-1]^2+G(xi)^4*k^3*sigma*e[-1]^2-4*G(xi)^2*(diff(G(xi), xi))*V*k^2*m*mu^2*a[2]+4*G(xi)*(diff(G(xi), xi))^3*V*k^2*m*mu*a[2]+G(xi)^4*b*k^2*e[-1]^2+4*G(xi)^2*(diff(G(xi), xi))*k*m*mu^2*w*a[2]-4*G(xi)*(diff(G(xi), xi))^3*k*m*mu*w*a[2]-2*G(xi)^2*V*k^2*mu^2*a[2]+2*G(xi)*(diff(G(xi), xi))^2*V*k^2*mu*a[2]-2*G(xi)*(diff(G(xi), xi))*RootOf(4*m^2*mu^2*(diff(G(xi), xi))*G(xi)^2+2*m*mu^2*G(xi)^2+6*m*mu*(diff(G(xi), xi))^2*G(xi)+3*mu*(diff(G(xi), xi))*G(xi)+2*(diff(G(xi), xi))^3+(4*m*mu*(diff(G(xi), xi))*G(xi)+mu*G(xi)+3*(diff(G(xi), xi))^2)*_Z+(diff(G(xi), xi))*_Z^2)*V*k^2*mu*a[2]+2*(diff(G(xi), xi))^4*V*k^2*a[2]+2*(diff(G(xi), xi))^3*RootOf(4*m^2*mu^2*(diff(G(xi), xi))*G(xi)^2+2*m*mu^2*G(xi)^2+6*m*mu*(diff(G(xi), xi))^2*G(xi)+3*mu*(diff(G(xi), xi))*G(xi)+2*(diff(G(xi), xi))^3+(4*m*mu*(diff(G(xi), xi))*G(xi)+mu*G(xi)+3*(diff(G(xi), xi))^2)*_Z+(diff(G(xi), xi))*_Z^2)*V*k^2*a[2]-4*G(xi)^2*(diff(G(xi), xi))*m*mu^2*w+2*G(xi)^2*k*mu^2*w*a[2]+4*G(xi)*(diff(G(xi), xi))^3*m*mu*w-2*G(xi)*(diff(G(xi), xi))^2*k*mu*w*a[2]+2*G(xi)*(diff(G(xi), xi))*RootOf(4*m^2*mu^2*(diff(G(xi), xi))*G(xi)^2+2*m*mu^2*G(xi)^2+6*m*mu*(diff(G(xi), xi))^2*G(xi)+3*mu*(diff(G(xi), xi))*G(xi)+2*(diff(G(xi), xi))^3+(4*m*mu*(diff(G(xi), xi))*G(xi)+mu*G(xi)+3*(diff(G(xi), xi))^2)*_Z+(diff(G(xi), xi))*_Z^2)*k*mu*w*a[2]-2*(diff(G(xi), xi))^4*k*w*a[2]-2*(diff(G(xi), xi))^3*RootOf(4*m^2*mu^2*(diff(G(xi), xi))*G(xi)^2+2*m*mu^2*G(xi)^2+6*m*mu*(diff(G(xi), xi))^2*G(xi)+3*mu*(diff(G(xi), xi))*G(xi)+2*(diff(G(xi), xi))^3+(4*m*mu*(diff(G(xi), xi))*G(xi)+mu*G(xi)+3*(diff(G(xi), xi))^2)*_Z+(diff(G(xi), xi))*_Z^2)*k*w*a[2]-2*G(xi)^2*mu^2*w+2*G(xi)*(diff(G(xi), xi))^2*mu*w-2*G(xi)*(diff(G(xi), xi))*RootOf(4*m^2*mu^2*(diff(G(xi), xi))*G(xi)^2+2*m*mu^2*G(xi)^2+6*m*mu*(diff(G(xi), xi))^2*G(xi)+3*mu*(diff(G(xi), xi))*G(xi)+2*(diff(G(xi), xi))^3+(4*m*mu*(diff(G(xi), xi))*G(xi)+mu*G(xi)+3*(diff(G(xi), xi))^2)*_Z+(diff(G(xi), xi))*_Z^2)*mu*w+2*(diff(G(xi), xi))^4*w+2*(diff(G(xi), xi))^3*RootOf(4*m^2*mu^2*(diff(G(xi), xi))*G(xi)^2+2*m*mu^2*G(xi)^2+6*m*mu*(diff(G(xi), xi))^2*G(xi)+3*mu*(diff(G(xi), xi))*G(xi)+2*(diff(G(xi), xi))^3+(4*m*mu*(diff(G(xi), xi))*G(xi)+mu*G(xi)+3*(diff(G(xi), xi))^2)*_Z+(diff(G(xi), xi))*_Z^2)*w)/((2*m*mu^2*(diff(G(xi), xi))*G(xi)^2-2*m*mu*(diff(G(xi), xi))^3*G(xi)+mu*(diff(G(xi), xi))*G(xi)*RootOf(4*m^2*mu^2*(diff(G(xi), xi))*G(xi)^2+2*m*mu^2*G(xi)^2+6*m*mu*(diff(G(xi), xi))^2*G(xi)+3*mu*(diff(G(xi), xi))*G(xi)+2*(diff(G(xi), xi))^3+(4*m*mu*(diff(G(xi), xi))*G(xi)+mu*G(xi)+3*(diff(G(xi), xi))^2)*_Z+(diff(G(xi), xi))*_Z^2)-(diff(G(xi), xi))^3*RootOf(4*m^2*mu^2*(diff(G(xi), xi))*G(xi)^2+2*m*mu^2*G(xi)^2+6*m*mu*(diff(G(xi), xi))^2*G(xi)+3*mu*(diff(G(xi), xi))*G(xi)+2*(diff(G(xi), xi))^3+(4*m*mu*(diff(G(xi), xi))*G(xi)+mu*G(xi)+3*(diff(G(xi), xi))^2)*_Z+(diff(G(xi), xi))*_Z^2)+mu^2*G(xi)^2-mu*(diff(G(xi), xi))^2*G(xi)-(diff(G(xi), xi))^4)*k), lambda = RootOf(4*m^2*mu^2*(diff(G(xi), xi))*G(xi)^2+2*m*mu^2*G(xi)^2+6*m*mu*(diff(G(xi), xi))^2*G(xi)+3*mu*(diff(G(xi), xi))*G(xi)+2*(diff(G(xi), xi))^3+(4*m*mu*(diff(G(xi), xi))*G(xi)+mu*G(xi)+3*(diff(G(xi), xi))^2)*_Z+(diff(G(xi), xi))*_Z^2)/G(xi), mu = mu, a[1] = -(1/2)*(-G(xi)^4*gamma*k*e[-1]^2+G(xi)^4*k*sigma*e[-1]^2-4*G(xi)^2*(diff(G(xi), xi))*V*m*mu^2*a[2]+4*G(xi)*(diff(G(xi), xi))^3*V*m*mu*a[2]+G(xi)^4*b*e[-1]^2-2*G(xi)^2*V*mu^2*a[2]+2*G(xi)*(diff(G(xi), xi))^2*V*mu*a[2]-2*mu*G(xi)*(diff(G(xi), xi))*V*RootOf(4*m^2*mu^2*(diff(G(xi), xi))*G(xi)^2+2*m*mu^2*G(xi)^2+6*m*mu*(diff(G(xi), xi))^2*G(xi)+3*mu*(diff(G(xi), xi))*G(xi)+2*(diff(G(xi), xi))^3+(4*m*mu*(diff(G(xi), xi))*G(xi)+mu*G(xi)+3*(diff(G(xi), xi))^2)*_Z+(diff(G(xi), xi))*_Z^2)*a[2]+2*(diff(G(xi), xi))^4*V*a[2]+2*(diff(G(xi), xi))^3*V*RootOf(4*m^2*mu^2*(diff(G(xi), xi))*G(xi)^2+2*m*mu^2*G(xi)^2+6*m*mu*(diff(G(xi), xi))^2*G(xi)+3*mu*(diff(G(xi), xi))*G(xi)+2*(diff(G(xi), xi))^3+(4*m*mu*(diff(G(xi), xi))*G(xi)+mu*G(xi)+3*(diff(G(xi), xi))^2)*_Z+(diff(G(xi), xi))*_Z^2)*a[2])/(2*m*mu^2*(diff(G(xi), xi))*G(xi)^2-2*m*mu*(diff(G(xi), xi))^3*G(xi)+mu*(diff(G(xi), xi))*G(xi)*RootOf(4*m^2*mu^2*(diff(G(xi), xi))*G(xi)^2+2*m*mu^2*G(xi)^2+6*m*mu*(diff(G(xi), xi))^2*G(xi)+3*mu*(diff(G(xi), xi))*G(xi)+2*(diff(G(xi), xi))^3+(4*m*mu*(diff(G(xi), xi))*G(xi)+mu*G(xi)+3*(diff(G(xi), xi))^2)*_Z+(diff(G(xi), xi))*_Z^2)-(diff(G(xi), xi))^3*RootOf(4*m^2*mu^2*(diff(G(xi), xi))*G(xi)^2+2*m*mu^2*G(xi)^2+6*m*mu*(diff(G(xi), xi))^2*G(xi)+3*mu*(diff(G(xi), xi))*G(xi)+2*(diff(G(xi), xi))^3+(4*m*mu*(diff(G(xi), xi))*G(xi)+mu*G(xi)+3*(diff(G(xi), xi))^2)*_Z+(diff(G(xi), xi))*_Z^2)+mu^2*G(xi)^2-mu*(diff(G(xi), xi))^2*G(xi)-(diff(G(xi), xi))^4), e[-1] = e[-1], e[0] = 0, e[1] = 0}

(17)

case1 := COEFFS[2]

{alpha = alpha, lambda = lambda, mu = mu, a[1] = -(gamma*k*e[0]^2-k*sigma*e[0]^2-b*e[0]^2-k*w*a[2]+alpha*k+w)/k^2, e[-1] = 0, e[0] = e[0], e[1] = 0}

(18)

NULL

F1 := subs(case1, F)

e[0]

(19)

F2 := subs(case1, ode)

(-a[2]*V-(gamma*k*e[0]^2-k*sigma*e[0]^2-b*e[0]^2-k*w*a[2]+alpha*k+w)/k^2)*(diff(diff(U(xi), xi), xi))+U(xi)*(((-gamma+sigma)*k+b)*U(xi)^2+k*e[0]^2*gamma-k*e[0]^2*sigma-b*e[0]^2-k*w*a[2]+k*alpha+(w*a[2]-alpha)*k) = 0

(20)

W := U(xi) = F1

U(xi) = e[0]

(21)

NULL

E := diff(G(xi), xi) = -(-2*m*mu-lambda)*exp(-(2*m*mu+lambda)*xi)*c__1/(2*m*mu+lambda)-mu/(2*m*mu+lambda)

diff(G(xi), xi) = -(-2*m*mu-lambda)*exp(-(2*m*mu+lambda)*xi)*c__1/(2*m*mu+lambda)-mu/(2*m*mu+lambda)

(22)

W1 := subs(E, W)

U(xi) = e[0]

(23)

W2 := subs(case1, W1)

U(xi) = e[0]

(24)

W3 := rhs(U(xi) = e[0])

e[0]

(25)

W4 := convert(W3, trig)

e[0]

(26)

W5 := W4

e[0]

(27)

odetest(W2, F2)

0

(28)

Download G-factoring.mw

I see this question
https://mathematica.stackexchange.com/questions/309952/how-to-choose-6-numbers-from-the-following-set-so-that-they-represent-the-length
and tried

primes := [seq(ithprime(i), i = 1 .. 20)];
with(combinat);
all_combinations := choose(primes, 6);

I can not make next part.

I found that convert(ode,y_x) converts the input ode, when it is NOT an equation, to an equation.  

sometimes and sometimes not.

For example,  convert(diff(y(t),t)+y(t)-t,y_x)  gives diff(t(y), y) = 1/(t(y) - y) 

Notice the input is not an equation. Maple adds = and makes an equation in the output. 

This can cause no problem if it works like this in all cases. But if the input has piecewise, then Maple no longer does the same and keep the output as not an equation.

I found this by accident, as my code was doing lhs() on the result of convert, and that always worked, except when I used an ode with piecewise.

This behaviour is not consistent. Maple should either always convert output to equation for all input or not convert. It should not do it for some input and not the other.

Actually, the best behaviour is for the software to reject the input in first place if it is not an equation.

Worksheet below.

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1841 and is the same as the version installed in this computer, created 2025, January 3, 8:59 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

#this works even when there is no equation in input, but the result is equation
ode:=diff(y(t),t)+y(t)-t;
convert(ode,y_x,y(t))

diff(y(t), t)+y(t)-t

diff(t(y), y) = 1/(t(y)-y)

ode:=diff(y(t),t)+y(t)-t=0; #this gives same result as above.
convert(ode,y_x,y(t))

diff(y(t), t)+y(t)-t = 0

diff(t(y), y) = 1/(t(y)-y)

#but now if the input is not equation, the output is not equation. Why
#did it not do the same as above??
ode:=diff(y(t),t)+y(t)-piecewise(0<=t and t<=1,2,t>1,0);
convert(ode,y_x,y(t))

ode := diff(y(t), t)+y(t)-piecewise(0 <= t and t <= 1, 2, 1 < t, 0)

1/(diff(t(y), y))+y-piecewise(0 <= t(y) and t(y) <= 1, 2, 1 < t(y), 0)

 

 

Download strange_behaviour_of_convert_yx_jan_5_20225.mw

I’m trying to solve a stiff system 1-D PDEs numerically in Maple but I’m getting the following error:

“Error, (in pdsolve/numeric/match_PDEs_BCs) cannot handle systems with multiple PDE describing the time dependence of the same dependent variable, or having no time dependence”

I included a picture of the PDEs and their BCs in the attached maple file. For easy reading, the attached file includes highlighted sections for parameters and variables. You can skip those to PDEs, BCs and ICs sections at the end of the document to reach the error I’m facing.

For reference, I used another software to solve the system and I was able to get the results in few seconds, so I think it is solvable. However, personally I prefer to use Maple so any inputs, insights, workarounds that I could use to handle the system in Maple would be of great help to me. Thank you.

question.mw

Dear Maple users

I am using the LinearInterpolation command from the Interpolation package. When I however want to integrate the result from one number to another, I only receive an abstract result. It is probably an easy question, but somehow I can't figure it out. I tried using MakeFunction and evalf command in order to receive a number for the integral. I hope someone can help.

Erik

Download Using_interpolation.mw

Hi,

Is there any other way to interrupt a MapleFlow (2024.2) evaluation, other then the red circled ! icon?

Sometimes MF gets stuck in an "Evaluating" state and the red circled ! icon doesn´t work.

Thanks very much in advance for any help.

How do I explain this:

isolve({a*b=4,a>=1,b>=1});

I noticed a strange (for me) appearence of a dollar:

I know $ as an end of parameters marker, but here its role seems strange.
Is it a typsetting issue?

For plotting phase plot of two system of equations (autonomous), is there an option to increase of reduce number of arrows/line drawn?  I am not able to find such an option from help.

Below is an example. Google AI says stepsize should change the number of arrows, but it does not. It had no effect. Below is worksheet showing one example where I like to reduce number of arrows (not the size of the arrow, which is set to medium now).

I also tried numpoints option and it had no effect of how many arrows are drawn

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

the_sys:=[diff(x(t),t) = -3*x(t)-4*y(t), diff(y(t),t) = 2*x(t)+y(t)]:
DEtools:-DEplot(the_sys,[x(t), y(t)],t =0 .. 10,x = -4 .. 4,y = -4 .. 4,'labels' = [x(t),y(t)],'axes' = 'boxed', 'arrows'='medium')

 

 

Download change_number_of_arrows_jan_4_2025.mw

For reference, I'd like to do something similar using another system as below where it has option to change number of arrows.

On a similar track,

If you have a worksheet that contains a calculation and results that took very long to complete and saved with all the results, is it possible to load the maple worksheet, and let maple load all the results  and not execute all the commands.

Thereby you can immediately work further and dont have to completely recalculate the worksheet. ?

Basically a resume function for the worksheet. Will save a huge amount of time and I cannot see a reason why the worksheet cannot load just using the previously calculated results in the document.

every structure is true but my plot not run where is issue?
plot.mw

I've been trying to explore or animate a bode plot without success.  I kept simplifying things until I'm back to a basic example (attached).  I'm assuming there is an issue with trying to explore or animate a function that uses a system object, and am wondering if there is an apoproach that works with such structures.  I'm not a Maple jock by any means.

simple_bode.mw

thanks,

Brian

Hello

I programmed a sequence a(n). Up to a(42) Maple had no problem to calculate the term, but when calculating a(43), after a while appears the message

`System error, `, "bad id"

What does that mean and what can I do?
Thank you.

First 7 8 9 10 11 12 13 Last Page 9 of 2392