salim-barzani

1555 Reputation

9 Badges

1 years, 12 days

MaplePrimes Activity


These are questions asked by salim-barzani

This question is actually on behalf of a colleague who works with fuzzy mathematics. He typically computes things like fuzzy derivatives by hand, including for specific functions such as "function 14" (though I'm not familiar with the specific form of that function). He’s interested in whether Maple can symbolically and numerically handle tasks in fuzzy calculus — especially taking and plotting fuzzy derivatives.

I’m not experienced with fuzzy systems myself, but I’d like to recommend Maple to him if it supports these features. So my main questions are:

  1. Can Maple compute and plot fuzzy functions and their derivatives?

  2. Does Maple have built-in support or packages for fuzzy arithmetic or fuzzy calculus?

  3. If not natively, is there a workaround or external library that integrates with Maple to do this?

I’d really appreciate any insights or examples. It seems like a missed opportunity for my friend to be doing all this manually when such software might already handle it.

Thanks in advance!

 

I'm trying to collect all terms involving the expression diff(G(xi), xi)/G(xi) in a symbolic equation using . While it's straightforward to do this by hand, I want to automate it in code — ideally by extracting the coefficient of this entire expression directly. However, when I use collect, Maple treats diff(G(xi), xi) and G(xi) separately, and I can't seem to group terms properly by the full ratio diff(G(xi), xi)/G(xi).

Is there a clean way or built-in Maple function to automatically collect or isolate the coefficient of diff(G(xi), xi)/G(xi) as a whole, without having to manually substitute or restructure the expression?

restart

with(PDEtools)

with(LinearAlgebra)

NULL

with(SolveTools)

undeclare(prime)

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

(1)

L := (-6*f^3*g*a[2]+6*f*g^3*a[2]+6*f*g*a[2]^2)*(diff(G(xi), xi))^4/G(xi)^4+(f*g^3*(10*lambda*a[2]+2*a[1])-f^3*g*(10*lambda*a[2]+2*a[1])+12*f*g*a[1]*a[2])*(diff(G(xi), xi))^3/G(xi)^3+(f*g^3*(2*a[2]*lambda^2+3*lambda*a[1]+10*mu*a[2]+2*a[2]*(lambda^2-mu))-4*f*p*a[2]-6*k*l*a[2]-f^3*g*(2*a[2]*lambda^2+3*lambda*a[1]+10*mu*a[2]+2*a[2]*(lambda^2-mu))+6*f*g*(2*a[0]*a[2]+a[1]^2))*(diff(G(xi), xi))^2/G(xi)^2+(f*g^3*(a[1]*(lambda^2-mu)+3*a[1]*mu+6*lambda*a[2]*mu)-4*f*p*a[1]-6*k*l*a[1]-f^3*g*(a[1]*(lambda^2-mu)+3*a[1]*mu+6*lambda*a[2]*mu)+12*f*g*a[0]*a[1])*(diff(G(xi), xi))/G(xi)+f*g^3*(lambda*mu*a[1]+2*mu^2*a[2])-4*f*p*a[0]-6*k*l*a[0]-f^3*g*(lambda*mu*a[1]+2*mu^2*a[2])+6*f*g*a[0]^2 = 0

(-6*f^3*g*a[2]+6*f*g^3*a[2]+6*f*g*a[2]^2)*(diff(G(xi), xi))^4/G(xi)^4+(f*g^3*(10*lambda*a[2]+2*a[1])-f^3*g*(10*lambda*a[2]+2*a[1])+12*f*g*a[1]*a[2])*(diff(G(xi), xi))^3/G(xi)^3+(f*g^3*(3*lambda*a[1]+2*a[2]*lambda^2+10*mu*a[2]+2*a[2]*(lambda^2-mu))-4*f*p*a[2]-6*k*l*a[2]-f^3*g*(3*lambda*a[1]+2*a[2]*lambda^2+10*mu*a[2]+2*a[2]*(lambda^2-mu))+6*f*g*(2*a[0]*a[2]+a[1]^2))*(diff(G(xi), xi))^2/G(xi)^2+(f*g^3*(a[1]*(lambda^2-mu)+3*a[1]*mu+6*a[2]*lambda*mu)-4*f*p*a[1]-6*k*l*a[1]-f^3*g*(a[1]*(lambda^2-mu)+3*a[1]*mu+6*a[2]*lambda*mu)+12*f*g*a[0]*a[1])*(diff(G(xi), xi))/G(xi)+f*g^3*(lambda*mu*a[1]+2*mu^2*a[2])-4*f*p*a[0]-6*k*l*a[0]-f^3*g*(lambda*mu*a[1]+2*mu^2*a[2])+6*f*g*a[0]^2 = 0

(2)

``

(3)

collect(%, {1/(diff(G(xi), xi)), G(xi)})

(-6*f^3*g*a[2]+6*f*g^3*a[2]+6*f*g*a[2]^2)*(diff(G(xi), xi))^4/G(xi)^4+(f*g^3*(10*lambda*a[2]+2*a[1])-f^3*g*(10*lambda*a[2]+2*a[1])+12*f*g*a[1]*a[2])*(diff(G(xi), xi))^3/G(xi)^3+(f*g^3*(3*lambda*a[1]+2*a[2]*lambda^2+10*mu*a[2]+2*a[2]*(lambda^2-mu))-4*f*p*a[2]-6*k*l*a[2]-f^3*g*(3*lambda*a[1]+2*a[2]*lambda^2+10*mu*a[2]+2*a[2]*(lambda^2-mu))+6*f*g*(2*a[0]*a[2]+a[1]^2))*(diff(G(xi), xi))^2/G(xi)^2+(f*g^3*(a[1]*(lambda^2-mu)+3*a[1]*mu+6*a[2]*lambda*mu)-4*f*p*a[1]-6*k*l*a[1]-f^3*g*(a[1]*(lambda^2-mu)+3*a[1]*mu+6*a[2]*lambda*mu)+12*f*g*a[0]*a[1])*(diff(G(xi), xi))/G(xi)+f*g^3*(lambda*mu*a[1]+2*mu^2*a[2])-4*f*p*a[0]-6*k*l*a[0]-f^3*g*(lambda*mu*a[1]+2*mu^2*a[2])+6*f*g*a[0]^2 = 0

(4)

L1 := %

num := numer(lhs(L)); num := expand(num); num_collected := collect(num, [1/(diff(G(xi), xi)), G(xi)]); eqs := [seq(coeff(num_collected, {1/(diff(G(xi), xi)), G(xi)}, i) = 0, i = 0 .. 8)]

[(-6*f^3*g*a[2]+6*f*g^3*a[2]+6*f*g*a[2]^2)*(diff(G(xi), xi))^4+(-10*f^3*g*lambda*a[2]+10*f*g^3*lambda*a[2]-2*f^3*g*a[1]+2*f*g^3*a[1]+12*f*g*a[1]*a[2])*G(xi)*(diff(G(xi), xi))^3+(-4*f^3*g*lambda^2*a[2]+4*f*g^3*lambda^2*a[2]-3*f^3*g*lambda*a[1]-8*f^3*g*mu*a[2]+3*f*g^3*lambda*a[1]+8*f*g^3*mu*a[2]+12*f*g*a[0]*a[2]+6*f*g*a[1]^2-4*f*p*a[2]-6*k*l*a[2])*G(xi)^2*(diff(G(xi), xi))^2+(-f^3*g*lambda^2*a[1]-6*f^3*g*lambda*mu*a[2]+f*g^3*lambda^2*a[1]+6*f*g^3*lambda*mu*a[2]-2*f^3*g*mu*a[1]+2*f*g^3*mu*a[1]+12*f*g*a[0]*a[1]-4*f*p*a[1]-6*k*l*a[1])*G(xi)^3*(diff(G(xi), xi))+(-f^3*g*lambda*mu*a[1]-2*f^3*g*mu^2*a[2]+f*g^3*lambda*mu*a[1]+2*f*g^3*mu^2*a[2]+6*f*g*a[0]^2-4*f*p*a[0]-6*k*l*a[0])*G(xi)^4 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0]

(5)

Download collect-coe.mw

I am facing an issue with two algorithms: one runs correctly, while the other fails to execute. The only difference is that the second algorithm includes one additional term. I would like to understand what causes the failure in the second case.

 a while i used this without problem but i don't know what is issue now.

ode-not-run.mw

I’m trying to verify a solution given in the form from  using Maple's odeTest. Even though the paper claims the solution satisfies the ODE, Maple does not simplify the result to zero. Could someone explain why the test fails or suggest the correct way to verify it in Maple?

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(u(x, t)); declare(U(xi)); declare(u(x, y, z, t)); declare(Q(xi)); declare(V(xi))

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

 

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 := diff(G(xi), xi) = G(xi)*sqrt(A+B*G(xi)^2)

diff(G(xi), xi) = G(xi)*(A+B*G(xi)^2)^(1/2)

(3)

S1 := G(xi) = -sqrt(A/B)*csch(sqrt(A)*(xi+xi[0]))

G(xi) = -(A/B)^(1/2)*csch(A^(1/2)*(xi+xi[0]))

(4)

res := simplify(odetest(S1, ode))

(A/B)^(1/2)*csch(A^(1/2)*(xi+xi[0]))*(A^(1/2)*coth(A^(1/2)*(xi+xi[0]))+(A*coth(A^(1/2)*(xi+xi[0]))^2)^(1/2))

(5)

S2 := G(xi) = sqrt(-A/B)*sec(sqrt(-A)*(xi+xi[0]))

G(xi) = (-A/B)^(1/2)*sec((-A)^(1/2)*(xi+xi[0]))

(6)

res := simplify(odetest(S2, ode))

(-A/B)^(1/2)*sec((-A)^(1/2)*(xi+xi[0]))*((-A)^(1/2)*tan((-A)^(1/2)*(xi+xi[0]))-(-A*tan((-A)^(1/2)*(xi+xi[0]))^2)^(1/2))

(7)

S3 := G(xi) = sqrt(-A/B)*sech(sqrt(A)*(xi+xi[0]))

G(xi) = (-A/B)^(1/2)*sech(A^(1/2)*(xi+xi[0]))

(8)

res := simplify(odetest(S3, ode))

(-A^(1/2)*tanh(A^(1/2)*(xi+xi[0]))-(A*tanh(A^(1/2)*(xi+xi[0]))^2)^(1/2))*(-A/B)^(1/2)*sech(A^(1/2)*(xi+xi[0]))

(9)

S4 := G(xi) = sqrt(-A/B)*csc(sqrt(-A)*(xi+xi[0]))

G(xi) = (-A/B)^(1/2)*csc((-A)^(1/2)*(xi+xi[0]))

(10)

res := simplify(odetest(S4, ode))

(-(-A)^(1/2)*cot((-A)^(1/2)*(xi+xi[0]))-(-A*cot((-A)^(1/2)*(xi+xi[0]))^2)^(1/2))*(-A/B)^(1/2)*csc((-A)^(1/2)*(xi+xi[0]))

(11)

S5 := G(xi) = cos(sqrt(-A)*(xi+xi[0]))+sin(sqrt(-A)*(xi+xi[0]))

G(xi) = cos((-A)^(1/2)*(xi+xi[0]))+sin((-A)^(1/2)*(xi+xi[0]))

(12)

res := simplify(odetest(S5, ode))

(cos((-A)^(1/2)*(xi+xi[0]))-sin((-A)^(1/2)*(xi+xi[0])))*(-A)^(1/2)+(B*sin(2*(-A)^(1/2)*(xi+xi[0]))+A+B)^(1/2)*(-cos((-A)^(1/2)*(xi+xi[0]))-sin((-A)^(1/2)*(xi+xi[0])))

(13)

S6 := G(xi) = 1/(sqrt(B)*(xi+xi[0]))

G(xi) = 1/(B^(1/2)*(xi+xi[0]))

(14)

odetest(S6, subs(A = 0, ode))

-csgn(1/(xi+xi[0]))/(B^(1/2)*(xi+xi[0])^2)-1/(B^(1/2)*(xi+xi[0])^2)

(15)

S7 := G(xi) = 1/(sqrt(-B)*(xi+xi[0]))

G(xi) = 1/((-B)^(1/2)*(xi+xi[0]))

(16)

odetest(S7, subs(A = 0, ode))

-(-1/(xi+xi[0])^2)^(1/2)*xi[0]/((-B)^(1/2)*(xi+xi[0])^2)-(-1/(xi+xi[0])^2)^(1/2)*xi/((-B)^(1/2)*(xi+xi[0])^2)-1/((-B)^(1/2)*(xi+xi[0])^2)

(17)

ode2 := diff(G(xi), xi) = A+B*G(xi)^2

diff(G(xi), xi) = A+B*G(xi)^2

(18)

S8 := G(xi) = sgn(A)*sqrt(A/B)*tan(sqrt(A*B)*(xi+xi[0]))

G(xi) = sgn(A)*(A/B)^(1/2)*tan((A*B)^(1/2)*(xi+xi[0]))

(19)

res := simplify(odetest(S8, ode2))

(sgn(A)*(A*B)^(1/2)*(tan((A*B)^(1/2)*xi[0])^2+1)*(tan((A*B)^(1/2)*xi)^2+1)*(A/B)^(1/2)-A*((tan((A*B)^(1/2)*xi)+tan((A*B)^(1/2)*xi[0]))^2*sgn(A)^2+(tan((A*B)^(1/2)*xi[0])*tan((A*B)^(1/2)*xi)-1)^2))/(tan((A*B)^(1/2)*xi[0])*tan((A*B)^(1/2)*xi)-1)^2

(20)

NULL

S9 := G(xi) = -sgn(A)*sqrt(A/B)*cot(sqrt(A*B)*(xi+xi[0]))

G(xi) = -sgn(A)*(A/B)^(1/2)*cot((A*B)^(1/2)*(xi+xi[0]))

(21)

res := simplify(odetest(S9, ode2))

(sgn(A)*(A*B)^(1/2)*(cot((A*B)^(1/2)*xi[0])^2+1)*(cot((A*B)^(1/2)*xi)^2+1)*(A/B)^(1/2)-A*((cot((A*B)^(1/2)*xi[0])*cot((A*B)^(1/2)*xi)-1)^2*sgn(A)^2+(cot((A*B)^(1/2)*xi[0])+cot((A*B)^(1/2)*xi))^2))/(cot((A*B)^(1/2)*xi[0])+cot((A*B)^(1/2)*xi))^2

(22)

NULL

S9 := G(xi) = sgn(A)*sqrt(-A/B)*tanh(sqrt(-A*B)*(xi+xi[0]))

G(xi) = sgn(A)*(-A/B)^(1/2)*tanh((-A*B)^(1/2)*(xi+xi[0]))

(23)

res := simplify(odetest(S9, ode2))

(A*(sgn(A)^2-1)*cosh(2*(-A*B)^(1/2)*(xi+xi[0]))-sgn(A)^2*A+2*sgn(A)*(-A/B)^(1/2)*(-A*B)^(1/2)-A)/(1+cosh(2*(-A*B)^(1/2)*(xi+xi[0])))

(24)

NULL

S10 := G(xi) = sgn(A)*sqrt(-A/B)*coth(sqrt(-A*B)*(xi+xi[0]))

G(xi) = sgn(A)*(-A/B)^(1/2)*coth((-A*B)^(1/2)*(xi+xi[0]))

(25)

odetest(S10, ode2)

(sgn(A)^2*A*cosh(2*(-A*B)^(1/2)*(xi+xi[0]))+sgn(A)^2*A-2*sgn(A)*(-A/B)^(1/2)*(-A*B)^(1/2)-A*cosh(2*(-A*B)^(1/2)*(xi+xi[0]))+A)/(-1+cosh(2*(-A*B)^(1/2)*(xi+xi[0])))

(26)

NULL

S11 := G(xi) = -1/(B*(xi+xi[0]))

G(xi) = -1/(B*(xi+xi[0]))

(27)

odetest(S11, subs(A = 0, ode2))

0

(28)

S12 := G(xi) = A*(xi+xi[0])

G(xi) = A*(xi+xi[0])

(29)

odetest(S12, subs(B = 0, ode2))

0

(30)

Download Z1.mw

Why doesn't this ODE return zero when using odetest? Did I do something wrong?

Would you like help checking the equation or debugging the issue?

restart

with(PDEtools)

declare(P(mu))

P(mu)*`will now be displayed as`*P

(1)

assume(A::real, r::real, rho::real, lambda::real)

Psol := P(mu) = 2*A*lambda/((A^2+r)*exp(lambda*rho*mu)+r*exp(-lambda*rho*mu))

P(mu) = 2*A*lambda/((A^2+r)*exp(lambda*rho*mu)+r*exp(-lambda*rho*mu))

(2)

ode := (diff(P(mu), mu))^2-rho^2*P(mu)^2*(1+r*P(mu)^2) = 0

(diff(P(mu), mu))^2-rho^2*P(mu)^2*(1+r*P(mu)^2) = 0

(3)

res := odetest(Psol, ode)

4*A^6*rho^2*lambda^4*exp(6*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4+8*r*A^4*rho^2*lambda^4*exp(6*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-24*A^4*lambda^4*rho^2*exp(4*lambda*rho*mu)*r/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-4*A^6*rho^2*lambda^2*exp(6*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4+4*A^2*r^2*rho^2*lambda^4*exp(6*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-8*A^2*lambda^4*rho^2*exp(4*lambda*rho*mu)*r^2/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4+4*A^2*r^2*rho^2*lambda^4*exp(2*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-8*r*A^4*rho^2*lambda^2*exp(6*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-8*A^4*lambda^2*rho^2*exp(4*lambda*rho*mu)*r/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-4*A^2*r^2*rho^2*lambda^2*exp(6*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-8*A^2*lambda^2*rho^2*exp(4*lambda*rho*mu)*r^2/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-4*A^2*r^2*rho^2*lambda^2*exp(2*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4

(4)

simplify(res)

4*lambda^2*exp(2*lambda*rho*mu)*(((-2*lambda^2-2)*r^2+(-6*lambda^2-2)*A^2*r)*exp(2*lambda*rho*mu)+(lambda+1)*((A^2+r)^2*exp(4*lambda*rho*mu)+r^2)*(lambda-1))*A^2*rho^2/((A^2+r)*exp(2*lambda*rho*mu)+r)^4

(5)

P_hyper := P(mu) = 2*A*lambda/((A^2+r)*cosh(rho*mu)+(A^2-r)*sinh(rho*mu))

P(mu) = 2*A*lambda/((A^2+r)*cosh(rho*mu)+(A^2-r)*sinh(rho*mu))

(6)

res_hyper := simplify(odetest(P_hyper, ode), symbolic)

-16*A^4*lambda^2*rho^2*r*(lambda^2+1)/((A^2+r)*cosh(rho*mu)+(A^2-r)*sinh(rho*mu))^4

(7)
 

NULL

Download ode.mw

4 5 6 7 8 9 10 Last Page 6 of 32