MaplePrimes Questions

Is it possible to output to the console without a new line being added. The code:

prints each number on a separate line. I want to print them all on the same line.

I am unable to integrate this equation

restart:
with(DETools):
with(IntegrationTools):
u[1](r,z):=(C[o]^2*exp(2*lambda*z)-D[o]^2*exp(-2*lambda*z))+(lambda/2)*(C[o]*exp(lambda*z)-D[o]*exp(-lambda*z))*(1-r^4)+A[1](z)*r^2:
M1:=int(u[1](r,z), z):
 

 

Hi

I want to write a code to show that

Please check the following code:

restart;
with(VectorCalculus):
SetCoordinates(cartesian[x, y, z]): 
g1 := proc (u1, u2, u3, s)
local N, u, n, intr1, intr2, intr3, R1, R2:
u := VectorField([u1, u2, u3]): 
N := Gradient(s): 
n := N/sqrt(add(N[k]^2, k = 1 .. 3)): 
intr1 := solve(subs(z = 0, s), y): 
intr2 := solve(subs(z = 0, y = 0, s)): 
R1 := int(int(subs(z = solve(s, z)[1], u . n), y = intr1[1] .. intr1[2]), x = intr2[1] .. intr2[2], numeric):
intr1 := solve(s, z): 
intr2 := solve(subs(z = 0, s), y):
intr3 := solve(subs(z = 0, y = 0, s)): 
R2 := evalf(int(int(int(Del . u, z = intr1[1] .. intr1[2]), y = intr2[1] .. intr2[2]), x = intr3[1] .. intr3[2])):
print(R1, R2) 
end proc

It seems that different answers are obtained.

g1(x, 1, z, x^2+y^2+z^2-2);
                   6.664324407, -23.69537567
 

Hello!

I am trying to determine the type of Lie algebra originating from Killing vectors. However, Maple says that some variable x is protected (though, I guess, it shouldn't even be in the L). Is there any way to solve this issue?

Best regards, 
Nick

error.mw

restart

with(DifferentialGeometry); with(Tensor); with(LieAlgebras); with(GroupActions); with(Library)

DGsetup([x, y], M)

g := evalDG((`&t`(dx, dx)+`&t`(dy, dy))/y^2)

_DG([["tensor", M, [["cov_bas", "cov_bas"], []]], [[[1, 1], 1/y^2], [[2, 2], 1/y^2]]])

(1)

kv := KillingVectors(g)

[_DG([["vector", M, []], [[[1], (1/2)*x^2-(1/2)*y^2], [[2], y*x]]]), _DG([["vector", M, []], [[[1], x], [[2], y]]]), _DG([["vector", M, []], [[[1], 1]]])]

(2)

L := LieAlgebraData(kv, Poincare)

_DG([["LieAlgebra", Poincare, [3]], [[[1, 2, 1], -1], [[1, 3, 2], -1], [[2, 3, 3], -1]]])

(3)

DGsetup(L); MultiplicationTable("LieTable")

Query(Poincare, "Semisimple")

true

(4)

CSA := CartanSubalgebra(Poincare)

[_DG([["vector", Poincare, []], [[[2], 1]]])]

(5)

RSD := RootSpaceDecomposition(CSA)

Error, (in MultiSet:-Entries) attempting to assign to `x` which is protected.  Try declaring `local x`; see ?protect for details.

 

``


 

Download error.mw

 

Hi,

I have this fonction  solve({f(x,y)});  giving this  for example { x = 13, y =259 }

how can reuse the result for a an other fonction.

Thanks

 

 


                              
                     
                                   
 

Hi, 

 

I would like to have some references about the function PolyhedralSets:-PolyhedralSet.
I used it very recently before constructing the convex hull  (PolyhedralSets:-ConvexHull) of a set of 50 points.
After some minutes spent to wait for a solution, I was forced to stop the computation.
I randomly sampled 10 points, next 20, 30, ... from the original set of points and observed that the computational time was growing very fast with the number of points.

Could you please inform me about the algorithm Maple uses and about its complexity?

Last point: the original points are floating numbers and I used the transformation  T: x -->  rounf(10k*x) / 10(PolyhedralSets:-PolyhedralSet operates only on rationals).
It seems that the computational time increases strongly as k increases too.

What are the limitations and best practices to use PolyhedralSets:-PolyhedralSet?

TI1

Hello, 

I am fairly new to using the Maple software, so I apologize if my question is completely idiotic. Apologies, also, because I could not manage to enter my code as code. When I pressed the button it made the whole text as a code. 

I run the following code to seek -if there are any- analytic solutions for the following differential equation.

odeplus := (r^2+L^2)^(5/2)*(diff(f(r), `$`(r, 2)))+((15/4)*r*(r^2+L^2)^(1/2)+3*(r^2+L^2)^(5/2)/r)*(diff(f(r), r))+M^2*f(r)/(r^2+L^2)^(5/2)-((5/2)*((r^2+L^2)^(1/2))(l-1)+(55/64)*r^2/(r^2+L^2)^(3/2)+(r^2+L^2)^(5/2)*(l^2+3*l+3/2)/r^2)*f(r)+(((r^2+L^2)^(1/2))(5+(5/2)*l)+(5/8)*r^2/(r^2+L^2)^(3/2)-(r^2+L^2)^(5/2)*(3/2+l)/r^2)*f(r) = 0

and then I do 

dsolve(odeplus, f(r))

The solutions that Maple returns is given in terms of DESol. Could anyone try and break it down for me? What is this telling me and if I can indeed from the output obtain analytic solutions? Is this some sort of operator acting on something? 

Thank you in advance. 

Hello ,

Iam new with maple, and iam trying to solve an equation using prime numbers. The equation is display as follow.

eqns := {G = x*q, 8695*y = 1341*q};

Iam trying to solve with the condition p and q are prime numbers

So is it posible to add condition prime in the solve fonction ? solve(eqns*[x, y]); 

Thank you for your help

I hate it when a user bumps every Question that they've ever asked over the past five years to the top of Recent (aka Active Conversations) stack! This is not the first time that this has happened. I rely heavily on that stack being truly the threads with the most-recent material. Can't something be done about this short of deleting the threads? That seems too drastic: While this user has occasionally been a pest in the past, they've also posted some decent material. There should be some way for a moderator to just reset the stack positions to what they were previously.

hi.

I can not gain answer for integral.

Best

int.mw
 

restart

PDE := (12*kappa^2*psi^2*(-upsilon^2+1)*((3*Pi^2*Q^2*(nu*psi^2+1)/(32*(-nu^2+1))+Q^2*(Pi^2*cos(2*Pi*y)/(8*psi^2)+psi^2*cos(2*Pi*x)*Pi^2*cos(2*Pi*y)/(4*(psi^2+1)^2)+Pi^2*cos(4*Pi*y)/(32*psi^2)+psi^2*cos(2*Pi*x)*Pi^2*cos(4*Pi*y)/(2*(4*psi^2+1)^2)+psi^2*cos(4*Pi*x)*Pi^2*cos(2*Pi*y)/(8*(psi^2+4)^2)))*(2*Q*Pi^2*sin(Pi*x)^2*cos(Pi*y)^2-2*Q*cos(Pi*x)^2*cos(Pi*y)^2*Pi^2)+(2*Q*cos(Pi*x)^2*Pi^2*sin(Pi*y)^2-2*Q*cos(Pi*x)^2*cos(Pi*y)^2*Pi^2)*(3*Pi^2*Q^2*(psi^2+nu)/(32*(-nu^2+1))+Q^2*((1/8)*psi^2*cos(2*Pi*x)*Pi^2+psi^2*cos(2*Pi*x)*Pi^2*cos(2*Pi*y)/(4*(psi^2+1)^2)+(1/32)*psi^2*cos(4*Pi*x)*Pi^2+psi^2*cos(2*Pi*x)*Pi^2*cos(4*Pi*y)/(8*(4*psi^2+1)^2)+psi^2*cos(4*Pi*x)*Pi^2*cos(2*Pi*y)/(2*(psi^2+4)^2)))-8*Q^3*cos(Pi*x)*cos(Pi*y)*Pi^2*sin(Pi*x)*sin(Pi*y)*(-psi^2*Pi^2*sin(2*Pi*x)*sin(2*Pi*y)/(4*(psi^2+1)^2)-psi^2*Pi^2*sin(2*Pi*x)*sin(4*Pi*y)/(4*(4*psi^2+1)^2)-psi^2*Pi^2*sin(4*Pi*x)*sin(2*Pi*y)/(4*(psi^2+4)^2)))+beta*V^2/(1-Q*cos(Pi*x)^2*cos(Pi*y)^2)^2-8*Q*Pi^4*cos(Pi*x)^2*cos(Pi*y)^2+8*Q*Pi^4*sin(Pi*x)^2*cos(Pi*y)^2-2*psi^2*(4*Q*Pi^4*sin(Pi*x)^2*sin(Pi*y)^2-4*Q*Pi^4*sin(Pi*x)^2*cos(Pi*y)^2-4*Q*cos(Pi*x)^2*Pi^4*sin(Pi*y)^2+4*Q*Pi^4*cos(Pi*x)^2*cos(Pi*y)^2)-psi^4*(-8*Q*cos(Pi*x)^2*Pi^4*sin(Pi*y)^2+8*Q*Pi^4*cos(Pi*x)^2*cos(Pi*y)^2))*(1-Q*cos(Pi*x)^2*cos(Pi*y)^2)^2*cos(Pi*x)^2*cos(Pi*y)^2

int(int(PDE, y = -1/2 .. 1/2), x = -1/2 .. 1/2)


 

Download int.mw

 

I've been googling for a while for a built-in function that computes {binomial(n,k) mod p} in Maple. The closest I've come to finding an answer is here: https://www.mapleprimes.com/questions/200986-Binomial-Coefficients , where the answer is given for p=2 and the method uses Lucas' theorem and relies completely in the binary nature of the problem. Is there any such function? If not, what would the most efficient way to handle this numbers be? Thanks for the help!

This is probably a silly question, but...

given 

GST := AE+AI-ANB-AR-CP

how do i append [i] to each element of the list so I get

AE[i]+AI[i]-ANB[i]-AR[i]-CP[i]

this nearly gets it

(GST@`[]`)~(i);
 

I an unable to get a numerical result out of this triple integral.  Maple runs forever.  I stopped it after about half an hour:

Int(exp(-a^2-b^2-c^2),
    a=b^2/(4*c)..infinity, b=-infinity..infinity, c=0..infinity);
value(%);
evalf(%);

Is there a trick to make it work?

 How to display the result in the desired form in partial differential equation and also collect the same terms

i am attaching sample codes

restart:
with(DETools):
P[o](z):=C[o]*exp(lambda*z)+D[o]*exp(-lambda*z):
u[o](r,z):=(1-r^2)*diff(P[o](z),z):
v[o](r,z):=(2*r-r^3)*diff(P[o](z),z,z):
A1:=P[o](z)*u[o](r,z):
# we want the result out put  like this
A1 := lambda*(C[o]^2*exp(2*lambda*z)-D[o]^2*exp(-2*lambda*z))*(1-r^2):
A2:=P[o](z)*(1+r^2)+v[o](r,z)+A1:
#we want the  resultant output like this
A2:=lambda^2*(C[o]*exp(lambda*z)+D[o]*exp(-lambda*z))*(1+r^2+2*r-r^3)+A1:
 

I am working on expressions with multiple variables ranging between 3 and 10. Each variable has a range for its value. Now I want to find out the possible combination of variable values satisfying expression value which is in certain interval.

I came across how one can find maximum and minimum value of the expression. But, My goal is to find all possible combinations of variables for the given range of expresison value.

f:=2*a*b-3*a-2*b-c;
minimize(f, a = 0 .. 10, b = 1 .. 5, c = 0 .. 1, location);=-13, {[{a = 10, b = 1, c = 1}, -13]}

maximize(f, a = 0 .. 10, b = 1 .. 5, c = 0 .. 1, location); = 60, {[{a = 10, b = 5, c = 0}, 60]}

But when I have a certain range for expression f [15..30].->f>=15 and f<=30

Is there a way to find out all combinations of variables with in this given range??

I have just started to study on Optimization and tried with QPSolve for optimal solution. I observed that QPSolve cannot take variable intervals, but takes inequalities as cnsts.

Optimization:-Interactive(f>=15,f<=30, a=amin..amax,b=bmin..bmax,c=cmin..cmax)

I am able to find the minimum and max possible combination but not all with in the range


EDIT: My final aim is to find out all possible combinations which do not satisfy the given condition. All combinations which fails the condition f>=15,f<=30

First 765 766 767 768 769 770 771 Last Page 767 of 2434