Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

This is something that has been a problem using Maple for decades.

Is it at all possible to create indexed variables ?
e.g.

R1, R2, R3 etc by defining for example R$index and then varying $index for 1.....n to get the required
R1,R2 .... Rn  I can assign to equations or filenames?

It will really simplify batch work.

Thanks

Hello

I am experiencing some problems with procedures that are saved to a file and are read back to a new worksheet.  Grid:-Map and Grid:-Set, which work just fine when the procedures were defined in the same worksheet, complain about the input parameters.  I have tried to define the procedures again in the same worksheet, call Grid:-Set and etc but to no avail.   I would like to try to save all user variables except for the user-defined procedures and defined them again in the new worksheet, and see if that works. Is there an easy way to do that?

I am open to try whatever is suggested.

Many thanks.

Ed

Hey dear friends, in the following code (which is also attached at bottom of this post)

restart;
with(Physics[Vectors]);
Setup(mathematicalnotation = true);
with(Physics);
Setup(op = {H, I__C, I__G, Omega, R, a_, p, r, rho, v_, `α_`, `ω_`, `ϰ_`})
Newton_generalized_MatForm := m*(Omega*rho*H(t)*diff(`ϰ_`(t), t) - rho*diff(H(t), t)*diff(`ϰ_`(t), t) - rho*H(t)*diff(`ϰ_`(t), t, t) + diff(v_(t), t)) = f_[c] + f_[g]

 i wish to get the  (kappa-dot) coefficients 

so I used the "Coefficients" function as follows:

Coefficients(Newton_generalized_MatForm, diff(varkappa_(t), t))

but the results aren't as expected and it's this:

so is there a way around this , thanks in advance
Coeff.mw

Hello!
I have a document which can't be opened that contains several things I need to take my exam in a couple of days. The document has crashed and keeps telling this message: "There were problems during the loading process. Your worksheet may be incomplete". The only thing left in the document is a command and there should be several solved tasks.

I have tried to open the launch.ini file and add some script which MapleSoft suggested could sovle the problem, but I dont have access to the file by some reason. I read somewhere that danish letters such as æøå could be the reason for the document crashing. Is there any way to save the file or is it just lost? Eksamenssæt.mw

I embed Maple code in Mobius for test questions. A simple 2-step CRR tree gives significantly different answer from the calculated by hand or by R's fOptions. Here is the piece of Mobius/Maple:

$ct = maple("
    with(Finance):
    S0:=50; X:=50; Ty:=6./12; r:=0.07; sig:=0.3156; n:=1;
    dt := Ty/n;
    u  := exp(sig*sqrt(dt));
    d  := 1/u;
    pu := (exp(r*dt) - d)/(u - d);
    pd := 1 - pu;
    BT := BinomialTree(Ty,n,S0,u,pu,d,pd);
    cT := ST -> max(ST - $X,0);
    Ec := EuropeanOption(cT, $Ty):
    LatticePrice(Ec,BT,$r);
    ");

The answer is: 6.545478168.  Exactly the same with BlackScholesBinomialTree

The correct answer should be 6.32

In this case the solution by hand is simply e^(-0.07*05)*0.5236*$12.50

R confirms 6.32:

CRRBinomialTreeOption(TypeFlag = "ce", S=S, X=X, Time=T, r=r, b=b, sigma=sig, n=n)@price

The error decreases with the increase of number of steps. All quantities before LatticePrice are calculated corectly. Any idea of what the reason might be?

Thanks.

Where to store a collection of 100 matrices of different orders in Python language.

Then I need to pass that file as input to Maple for so kind of analysis here.

If possible an example with 3 to 4 matrices in python stored in some file I don't know which will be good and how say excel or database or any other (This only mainly I am not getting any idea)

Then the maple program here takes that file as input and does calculations here in maple 

Say as example Eigen values of those matrices

Here my matrices are all square matrices of various different orders

This code can draw the subgroup lattice:

DrawSubgroupLattice(GaloisGroup(x^3 - 2, x), 'indices')

But I really want to know what the extension of field about each subgroup corresponds to, like this:

The root of the polynomial r1=21/3, r2=21/3(-1+sqrt(3) I)/2, r2=21/3(-1-sqrt(3) I)/2 in the above graph. Further, how do we draw the extension relation of this polynomial:

x5+15x+44

The maple can draw this graph? If maple can't draw it, what software can?

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.

First 246 247 248 249 250 251 252 Last Page 248 of 2218