Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

SS.mw

How to rectify this error,I want a downfall curve ,Please help.

indets(I, anything^Non(integer)) = {I};

How does one return this to proper form?

 

restart;

q := (u,v) -> u^2 + v^2;

proc (u, v) options operator, arrow; v^2+u^2 end proc

D[3](q);

Error, (in D/procedure) index out of range: function takes only 2 arguments

Question: How does D know that q takes two arguments?

In general, if I pass q to another proc, how can I find out, within
that proc, that q takes only two arguments?

download number-of-arguments.mw

Dear,

I would like to do equation of motion calculations using spin matrices.

I would like to do calculations using the  coupling.

Thanks for listening.

Given a vector-valued function z(u,v), I want to calculate the derivative of z with respect to its first argument by applying the D operator to it. I don't see how.  Any suggestions?

restart;

z := (u,v) -> < a(u,v), b(u,v) >;

proc (u, v) options operator, arrow; `<,>`(a(u, v), b(u, v)) end proc

Calculate the derivative of z with respect to its first argument:

P := diff(z(u,v), u);

Vector(2, {(1) = diff(a(u, v), u), (2) = diff(b(u, v), u)})

Express P through the D operator:

Q := convert(P, D);

Vector(2, {(1) = (D[1](a))(u, v), (2) = (D[1](b))(u, v)})

Question:  How do we obtain Q directly by applying the D operator to z

without the help of diff?  This one doesn't work:

D[1](z)(u,v);
type(%, Vector);

(D[1](`<,>`))(a(u, v), b(u, v))*(D[1](a))(u, v)+(D[2](`<,>`))(a(u, v), b(u, v))*(D[1](b))(u, v)

false

Download diff.mw

restart;
with(Physics[Vectors]);
Setup(mathematicalnotation = true);
with(Physics);

Setup(op = {Omega, r});

lprint(m*Omega^2*r);

which outputs this:

i want to substitute  Physics:-`*` which is an overloaded version of matrice multiplication with the default one which is `.` so I wrote the following code :

use   `*`= :-`.` in
a := m*Omega^2*r
end use

the result is the same and its not substitute the physics product with the default one. what is the mistake here?

I also tried the following code and its worked. but I want to make it work with the 'use' function for general purposes

lprint(m . (:-`.`(Omega^2, r)))

thanks in advance

How do I draw this polyhedron knowing all vertices?
https://artofproblemsolving.com/wiki/index.php/2022_AMC_10A_Problems/Problem_21?fbclid=IwAR2bdHwJEpjarZEwope1hYOcnnXqnvzae38Y8ZrfWKCKQunfAuT9s30q32o

[[-1.5, -0.5, 0.], [-1.5, 0.5, 0.], [-1., -1., -0.707107], [-1., 1., -0.707107], [-0.5, -1.5, 0.], [-0.5, -0.5, -1.41421], [-0.5, 0.5, -1.41421], [-0.5, 1.5, 0.], [0.5, -1.5, 0.], [0.5, -0.5, -1.41421], [0.5, 0.5, -1.41421], [0.5, 1.5, 0.], [1., -1., -0.707107], [1., 1., -0.707107], [1.5, -0.5, 0.], [1.5, 0.5, 0.]]

 

I want to write a program in differential geometry that get g as a metric matrix then calculate christoffel.

Thank you for your consideration.

I'm trying to use Maple to take the following integral for positive values of a, b, c and non-negative integers i and j.

I know that for fixed values of j and k this doable — for example, for j=k=0 Mathematica gives

I'm trying the following code in Maple:

int(exp(-(x + y)/2)/(a*x + b*y + c), [x = 0 .. infinity, y = 0 .. infinity]) assuming (a::real, 0 < a, b::real, 0 < b, c::real, 0 < c)

Am I doing anything wrong?

This is probably trivial but I can't find how to display and allow user input of numeric values in a table.  There doesn't appear to be a component for this and I can't find a way to make text areas work for numeric values.  I am sure I must be overlooking something very simple but I checked the documentation and googled and still can't find the answer.

Hi dears

I have a pde system and want to get the solution of this system step by step. is there any command or bunch of commands that could help me?

(pde = partial differential equations)

My document contained an inline plot component named Plot0 and was referenced in the following code

DocumentTools:-SetProperty("Plot0", value, calculatePlot())

This worked as expected. I selected and cut the plot and pasted it into a cell in a table.  Now the same line of code generates this error

Error, (in DocumentTools:-GetProperty) Attempted to retrieve property of unknown component Plot0.

The plot has presumably changed name but I can't find its new name.  I have tried changing the code to refer to Plot1 instead of Plot0 but the error persists.  I am completely mystified.

Maple 2022.2 on windows 10. I found another serious problem with timelimit. When changing the timelimit value, solve hangs.

i.e. timelimit do not timeout.  But that is not all. Unable to terminate the process running the worksheet. Clicking on the little ! circle at the top does nothing.  But that is not all. Killing the server.exe from the task manager, now I am not even able to close the worksheet. Maple hangs on closing the worksheet.

This code below on  my PC produces this. I used 60 seconds to make it hang. When using 10 seconds it does not hang. You might have to change these values depending on how fast/slow your PC is. If it does not hang for you using 60, you might to try 100 and so on.

Why does it hang so bad? This really makes using Maple for development not practical if one can't even put a timeout on an operation like this. What is a user to do?  Not use solve? reduce the timelimit to avoid maple lockin? To what value? If I reduce all timelimits to 5 seconds, this will cause problems as I could lose solutions that will show up with more time.

Anyone else can produce this? Make sure to save all your work before because you might not be able to close the worksheet after this.  I use worksheet mode only.
 

interface(version);

restart;

interface(warnlevel=4);
kernelopts('assertlevel'=2):

eq:=1/24*ln(9*u + 2) + 1/8*ln(u) - 1/24*ln(3*sqrt(4*u + 1) + 1) - 1/8*ln(sqrt(4*u + 1) - 1) + 1/24*ln(3*sqrt(4*u + 1) - 1) + 1/8*ln(sqrt(4*u + 1) + 1) - 1/2*ln(x) - c[1] = 0;

try
   the_sol := timelimit(60,[solve(eq,u)]);
   print("finished before timeout");
  catch:
    print("Timed out OK");
end try;

 


 

Download solve_hangs_different_timing_dec_23_2022.mw

To get optimum value (maximum) of 3 variable p, q and w. Where p and q are from the function E1(p,q) and w from the function M1(p,q). The algorithm to obtain the optimum value is described below:-
step 1: Initialize w = c = 20

step2: Evaluate E1(p,q) by substituting w in it.

step3: Find optimum value of p and q from function E1(p,q) using NLPsolve or any other optimiztion method.

step 4: Substitute q optimum value into function M1(p,q) and evaluate it.

step 5: find optimum value of w from optimizing function M1(p,q).

step 6: substitute optimum value of w to E1(p,q) and evaluate it.

step 7: do step 3

step 8: do step 5 and 6

step 9: stop the loop when (w final - w previous) <0.05

I have done this through NLPsolve but it is showing error "Error, (in int) integration range or variable must be specified in the second argument, got 5000 = -3500 .. 1500*p+q-100000"

I am attaching the worksheet below. Please see the numerical analysis part below in the sheet. maple_question.mw

Is there a command to generate a second-difference matrix of size n by n?

This matrix has 2s on its main diagonal and -1 above and below each main diagonal element.

First 8 9 10 11 12 13 14 Last Page 10 of 1981