Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I have a n cross n matrix M I need help to write a function f say which takes the Matrix M as input function and Normalize each column of independent data.

Here normalization is  subtract by mean and divide by Standard deviation kind help if possible

If anyone has  idea of other different types of normalization please help it will help me a lot 

Kind help your ideas will all be acknowledge Please help

Hello everyone,

I am facing an issue while installing Maple on my Intel Evo laptop. The installation process starts but then it fails and I get an error message. I have tried to install it multiple times but the issue persists. I have also checked for any updates or patches but there are none available.I am not sure what could be causing this issue. Has anyone else faced a similar problem? If so, could you please share your experience and any solutions that worked for you? I would appreciate any help or suggestions on how to resolve this issue.

Thank you in advance for your time and assistance.

I read the article "ONEOptimal: A Maple Package for Generating One-Dimensional Optimal System of Finite Dimensional Lie Algebra", and also searched out in Maplesoft website, but couldn't found. Does anyone have the package?

I am trying to see if there is a way to submit maple code as a worksheet and get results back as worksheets in a cluster. 

The following 2D integrals of 0 are seemingly trivial and one would expect them to evaluate to zero, but Maple evaluates them to undefined

int(0, x=0..infinity, y=0..1) # undefined
int(0, x=0..1, y=0..infinity) # undefined

When the 2D integral is split into two 1D integrals, it does evaluate to zero, as the following examples show

int(0,x=0..infinity) # 0
int(int(0,x=0..infinity), y=0..1) # 0
int(int(0,x=0..1),y=0..infinity) # 0

If infinity is replaced by a variable (say 'c'), the first two integrals are also evaluated to zero.

It may be connected by the following

int(a, x=0..infinity, y=0..1) # a*infinity
int(a, x=0..1, y=0..infinity) # a*infinity
int(a,x=0..infinity) # signum(a)*infinity

So for the 1D integrals the signum is applied to 'a' when the interval is infinite, but not for the 2D integrals. I'm not sure about this difference.

Is it possible to read in specific parts of a bmp image? 

Given a constant gamma, gaussian random variables S[1] and S[2], and a linear combination of gaussian random variables Omega, I need to compute Exp[ Omega | S[1], S[2] ] - (gamma/2)*Var[ Omega | S[1], S[2] ]. I am not experienced in Maple. In the attached script I include many step-by-step details on what I need to do, as well as some notes where I get stuck:

150423_OptimizationProblem.mw

It would be convenient if you could directly fix this and share the working version. Thanks!

The conditional means and variance terms are calculated according to the 2D version of the script 3_gaussian_mmcdara.mw provided by @mmcdara.

As usual, I have a tricky question. There is an integral that Maple can take numerically

R0 := 1/(a-sqrt(b+c*cos(x)));

Now let's put the coefficients, e.g.

 a := 0.9; b := 4.5; c :=0.1

and take the integral from 0 to 2*Pi

R1 := evalf(int(R0, x = 0 .. 2*Pi));

Also, there is an exact analytical result that Maple gives (I give it after simplifying it to avoid division by zero for the limit x=0 and x=2*Pi)

R2:=-4*((a^2-b+c)*EllipticK(sqrt(-2*c/(b-c)))-a^2*EllipticPi(2*c/(a^2-b+c), sqrt(-2*c/(b-c))))/((a^2-b+c)*sqrt(b-c));

As it turns out, the results are completely different. In the first case -5.145818656, while for the second case -3.612771378+0.I

Moreover, If we change the coefficients to a := 0.9; b := 4.5; c := -4 then I obtain Float(undefined)+3.662506136*I and -2.362349457+3.662506117*I , respectively.

My question: how to avoid this descepancy?

According to the Wikipedia article

transitive reduction of a directed graph D is another directed graph with the same vertices and as few edges as possible ...

However, I find that in Maple 2023, things become strange:
 (33 arcs or 40 arcs?)

restart;

with(GraphTheory):

showstat(TransitiveReduction, 4)


GraphTheory:-TransitiveReduction := proc(G::GRAPHLN, $)
local D, V, T, i, j, k, A, M, n, flags, B;
       ...
   4   if _EnvDisableExt <> true then
           ...
       elif D <> (':-directed') then
           ...
       else
           ...
       end if;
       ...
end proc
 

 

G__0 := Digraph({[2, 8], [3, 1], [4, 9], [5, 10], [6, 19], [7, 12], [8, 13], [9, 3], [10, 4], [10, 14], [11, 5], [11, 15], [12, 6], [12, 16], [13, 7], [13, 17], [14, 9], [15, 10], [15, 18], [16, 19], [17, 12], [17, 20], [18, 14], [19, 11], [19, 21], [20, 22], [21, 18], [22, 16], [22, 23], [23, 19]})

G__0 := `Graph 1: a directed graph with 23 vertices and 30 arc(s)`

(1)

G__1 := TransitiveReduction(G__0)

G__1 := `Graph 2: a directed graph with 23 vertices and 33 arc(s)`

(2)

_EnvDisableExt := trueG__2 := TransitiveReduction(G__0)

G__2 := `Graph 3: a directed graph with 23 vertices and 40 arc(s)`

(3)

IsIsomorphic(G__1, G__2)

false

(4)

 


 

Download TransReduction.mws

Any bugs? 

G__0 := GraphTheory:-Digraph({[3, 1], [9, 3], [4, 9], [14, 9], [10, 4], [5, 10], [15, 10], [11, 5], [19, 11], [12, 6], [7, 12], [17, 12], [13, 7], [8, 13], [2, 8], [10, 14], [18, 14], [11, 15], [6, 19], [16, 19], [23, 19], [13, 17], [15, 18], [21, 18], [12, 16], [22, 16], [22, 23], [20, 22], [19, 21], [17, 20]}):

How to find the similarity matrix that applies A in N, B in P, C in C and B in M;
 

restart;  
with(geometry):  
with(plots):  
_EnvHorizontalName = 'x':  _EnvVerticalName = 'y':
#Vdot := proc(U, V) local i; add(U[i]*V[i], i = 1 .. 2); end proc
;

with(LinearAlgebra):
point(A, 0, 1);
point(B, 1, 1);
point(C, 1, 0);
point(E, 0, 0);
square(Sq, [A, B, C, E]);
Phi := (1 + sqrt(5))/2;
point(N, (2 - Phi)/(Phi - 1), 1);
line(BE, [B, E]);
MakeSquare(s1, [N, C, 'diagonal']);
point(M, (3 - sqrt(5))/(2*sqrt(5) - 2), (3 - sqrt(5))/(2*sqrt(5) - 2));
point(P, (1 + sqrt(5))/(2*sqrt(5) - 2), (3*sqrt(5) - 5)/(2*sqrt(5) - 2));
                               A

                               B

                               C

                               E

                               Sq

                             1   1  (1/2)
                      Phi := - + - 5     
                             2   2       

                               N

                               BE

                               s1

                               M

                               P

 display(draw([
A(color = black, symbol = solidcircle, symbolsize = 12),   
B(color = black, symbol = solidcircle, symbolsize = 12),   
C(color = black, symbol = solidcircle, symbolsize = 12),    
E(color = black, symbol = solidcircle, symbolsize = 12), 
N(color = black, symbol = solidcircle, symbolsize = 12 ),  
Sq(color=red),BE(color=green),  
s1(color = blue)]),   
textplot([[coordinates(A)[], "A"],   
[coordinates(B)[], "B"], 
[coordinates(E)[], "E"], 
[coordinates(N)[], "N"],
[coordinates(P)[], "P"],
[coordinates(M)[], "M"],   
[coordinates(C)[], "C"]], align = [above, right]), axes = none); Thank you.

I can derive a symbolic solution by hand for the following ODE, but cannot get Maple to do it for me.  Any tricks?

restart;

Velocity field, -infinity < x and x < infinity,  t > 0.

v := (x,t) -> piecewise(x <= -t, 0, x < t, 1 - 1/2*(1 - x/t));

v := proc (x, t) options operator, arrow; piecewise(x <= -t, 0, x < t, 1/2+(1/2)*x/t) end proc

Position x(t):

de := diff(x(t),t) = v(x(t),t);

de := diff(x(t), t) = piecewise(x(t) <= -t, 0, x(t) < t, 1/2+x(t)/(2*t))

Initial condition, assuming a > 0

ic := x(0) = -a;

x(0) = -a

Symbolic solution, calculated by hand:

x__exact := t -> piecewise(t < a, -a, t - 2*sqrt(t)*sqrt(a));

x__exact := proc (t) options operator, arrow; piecewise(t < a, -a, t-2*sqrt(t)*sqrt(a)) end proc

Verify exact solution by comparing it against the numeric solution for some a > 0:

a := 3;  # any a>0 should do
dsol := dsolve({de,ic}, numeric):
plots:-odeplot(dsol, t=0..5);   # dsolve solution
plot(x__exact(t), t=0..5);      # symbolic solution (calculated by hand)
a := 'a';

3

a

Can Maple's dsolve find the exact solution?  This one returns empty in Maple 2022:

dsolve({de, ic}) assuming a > 0, t > 0;

Download ode-piecewise.mw

 

I need your help....

I want to use the maple 2023 kernel in jupyter lab. I followed, to knowledge, the maple installation in windows10 and could not get it to work
after numerous attempts. Maybe it is a path issue that I am getting wrong.
I decided to use it with EndeavourOS distro for Linux as Sagemath interest me. Here it recognizes the kernel but gives syntax errors when
running code; it does not understand ‘:-’ for example. 
Again I used maple suggested installation to no avail.
I used the alternative following comands and it recognizes Maple2023 in the kernels menu but to repeat does not run code, simply gives errors.
sudo pacman -S python-jupyterlab
python -m venv maple2023
source maple2023/bin/activate
pip install jupyter ipykernel
python -m ipykernel install --user --name=maple2023
jupyter kernelspec list
 

If I have a pde with multiple constants (for example a and b) in them such that some are fixed constants (say k) and some terms are undetermined constants , how do I put that in a PDE such that Maple knows to solve the equation not for arbritary k (in case no solution exists), but any k such that k is not a function of the differentiating variable.

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