Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

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.

For example, I'd like to do something like this (and then plot the graph): 

 # display LaTeX markup
label__1 := '"\[\cfrac{\biguplus_\LaTeX}{{\color{red}\leadsto}^\unicode{2254}}\]"':
 # display non-executable notation
label__2 := '(Product(Int(i, j), Sum(k, l)) %assuming convert(log2(1 - 'x'), confrac, subdiagonal))':
 # display graphical object
label__3 := 'plots:-display(plottools:-stellate(plottools:-icosahedron()))':
 # note that the desired one is  instead of 
GraphTheory:-RelabelVertices(`some graph with 3 nodes`, [label__1, label__2, label__3]):

But unfortunately, the second argument of GraphTheory:-RelabelVertices must be of type list({indexed, integer, string, symbol}), and the GraphTheory:-SetVertexAttribute command doesn't work here. Is it possible to do so in Maple® (rather than in other mathematical softwares)?

 

min_problem.mw

Hi everyone 

I am trying to solve the following problem. I want to evaluate the time when the function Sx(t) drops (the last vertical drop at about 0.45 sec) 

The minimize command doesnt work because the function slightly deacreases afterwards but I am interested in the drop. For a miniization (evaluate the relevant time). I do it as follows:

Does anyone have an idea how to evaluete the time of drop? Is there an other command than minimize to solve this? 

Thanks in advance!

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....

Is it correct that element wise operators just work on the first element, and not in nested elements?

Do I need to manually go through the nested lists, or are there any other tricks to simplify this operation?

fasteners := [Vector(2, {(1) = -25.0*Units:-Unit(mm), (2) = 0.}), Vector(2, {(1) = 25.0*Units:-Unit(mm), (2) = 0.})]

[Vector[column](%id = 36893490765018711092), Vector[column](%id = 36893490765018711212)]

(1)

`~`[convert](fasteners, unit_free)

[Vector[column](%id = 36893490764941411500), Vector[column](%id = 36893490764941411620)]

(2)

x := Vector(2, {(1) = -25.0*Units:-Unit(mm), (2) = 0.})

Vector[column](%id = 36893490765009212828)

(3)

`~`[convert](x, unit_free)

Vector[column](%id = 36893490764944766844)

(4)

NULL

Download elementwise.mw

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
 

The result of is said to be the Catalan constant, but unfortunately, Maple® only returns a lengthy output, so I have to apply the simplify command to get a shorter (and equivalent) form of it. However, I find that these do not work here: 

restart;

expr__1 := expand(value(student[Doubleint](sec(x+y)*sec(x-y)/(sec(x)*sec(y)), x = 0 .. (1/4)*Pi, y = 0 .. (1/4)*Pi)))

MmaTranslator:-Mma:-Chop(evalf(expr__1-Catalan))

((1/2)*I)*dilog(1-(1/2)*2^(1/2)+((1/2)*I)*2^(1/2))+((1/2)*I)*dilog(1-(1/2)*2^(1/2)-((1/2)*I)*2^(1/2))-((1/2)*I)*dilog(1+(1/2)*2^(1/2)+((1/2)*I)*2^(1/2))-((1/2)*I)*dilog(1+(1/2)*2^(1/2)-((1/2)*I)*2^(1/2))-((1/8)*I)*Pi^2+Catalan

 

0

(1)

simplify(expr__1, size = false)-Catalan; Physics:-Simplify(expr__1)-Catalan; simplify(expr__1-Catalan, size = false); Physics:-Simplify(expr__1-Catalan); verify(expr__1, Catalan, equal); is(expr__1 = Catalan); verify(expr__1-Catalan, 0, equal); is(expr__1-Catalan, 0)

((1/2)*I)*dilog(1-(1/2)*2^(1/2)+((1/2)*I)*2^(1/2))+((1/2)*I)*dilog(1-(1/2)*2^(1/2)-((1/2)*I)*2^(1/2))-((1/2)*I)*dilog(1+(1/2)*2^(1/2)+((1/2)*I)*2^(1/2))-((1/2)*I)*dilog(1+(1/2)*2^(1/2)-((1/2)*I)*2^(1/2))-((1/8)*I)*Pi^2

 

((1/2)*I)*dilog(1-(1/2)*2^(1/2)+((1/2)*I)*2^(1/2))+((1/2)*I)*dilog(1-(1/2)*2^(1/2)-((1/2)*I)*2^(1/2))-((1/2)*I)*dilog(1+(1/2)*2^(1/2)+((1/2)*I)*2^(1/2))-((1/2)*I)*dilog(1+(1/2)*2^(1/2)-((1/2)*I)*2^(1/2))-((1/8)*I)*Pi^2

 

((1/8)*I)*(-Pi^2+4*dilog(1-(1/2)*2^(1/2)+((1/2)*I)*2^(1/2))+4*dilog(1-(1/2)*2^(1/2)-((1/2)*I)*2^(1/2))-4*dilog(1+(1/2)*2^(1/2)+((1/2)*I)*2^(1/2))-4*dilog(1+(1/2)*2^(1/2)-((1/2)*I)*2^(1/2)))

 

((1/8)*I)*(-Pi^2+4*dilog(1-(1/2)*2^(1/2)+((1/2)*I)*2^(1/2))+4*dilog(1-(1/2)*2^(1/2)-((1/2)*I)*2^(1/2))-4*dilog(1+(1/2)*2^(1/2)+((1/2)*I)*2^(1/2))-4*dilog(1+(1/2)*2^(1/2)-((1/2)*I)*2^(1/2)))

 

FAIL

 

FAIL

 

FAIL

 

FAIL

(2)

expr__2 := expand(convert(expr__1, polylog, simplifier = NONE))

((1/2)*I)*polylog(2, (1/2)*2^(1/2)-((1/2)*I)*2^(1/2))+((1/2)*I)*polylog(2, (1/2)*2^(1/2)+((1/2)*I)*2^(1/2))-((1/2)*I)*polylog(2, -((1/2)*I)*2^(1/2)-(1/2)*2^(1/2))-((1/2)*I)*polylog(2, -(1/2)*2^(1/2)+((1/2)*I)*2^(1/2))-((1/8)*I)*Pi^2+Catalan

(3)

simplify(expr__2, size = false)-Catalan; Physics:-Simplify(expr__2)-Catalan; simplify(expr__2-Catalan, size = false); Physics:-Simplify(expr__2-Catalan); verify(expr__2, Catalan, equal); is(expr__2 = Catalan); verify(expr__2-Catalan, 0, equal); is(expr__2-Catalan, 0)

0

 

((1/2)*I)*polylog(2, (1/2-(1/2)*I)*2^(1/2))+((1/2)*I)*polylog(2, (1/2+(1/2)*I)*2^(1/2))-((1/2)*I)*polylog(2, (-1/2-(1/2)*I)*2^(1/2))-((1/2)*I)*polylog(2, (-1/2+(1/2)*I)*2^(1/2))-((1/8)*I)*Pi^2

 

0

 

-((1/8)*I)*(Pi^2+4*polylog(2, (-1/2+(1/2)*I)*2^(1/2))+4*polylog(2, (-1/2-(1/2)*I)*2^(1/2))-4*polylog(2, (1/2+(1/2)*I)*2^(1/2))-4*polylog(2, (1/2-(1/2)*I)*2^(1/2)))

 

true

 

true

 

true

 

true

(4)

NULL

Download Unable_to_simplify_expressions_containing_dilog.mw

(By the way, Mathematica's Integrate cannot compute this double integral explicitly.)

Hi,

I am struggling with a task of creating a 2D contourplot of temperature values showing Iso-Lines (lines of equal temperatures in steps of 100°C).

I have a set of temperature values with corresponding x and y coordinates of a cross section. The data is given as an unsorted set of X-Y-Temperature data:

[[177.80000,0.,967.3266667],[169.80000,0.,963.5900000],[100.00000,0.,188.8933333],[176.92000,17.703000,967.3266667],[174.27000,35.230000,967.3200000],[169.90000,52.407000,967.3566667],[163.84000,69.064000,967.3366667],[156.15000,85.034000,967.3100000],[146.91000,100.16000,967.3366667],[136.20000,114.29000,967.3666667],...]

I can plot the data as a 3D pointplot and assign colors based on the temperature value:

plots:-pointplot3d(<ThermRes(2 .. (), 2) | ThermRes(2 .. (), 3) | ThermRes(2 .. (), TimeCol)>, colorscheme = ["zgradient", ["blue", "green", "yellow", "orange", "red"]], style = point, symbol = solidsphere, symbolsize = 20)

For better visualization, I would like to plot this data in a 2D contourplot showing coloured Iso-lines in 100°C steps, similar to the following scheme:

I know this is not directly possible from xyz datapoints. Therefore, I was trying to create an interpolation function using the Interpolation package. I have tried to find out if it is possible to get a working interpolation function for my data, but it seems like the x and y coordinates must be always in increasing order and there has to be a z value (temperature data point) for each pair of coordinates in matrix form, is that correct? Unfortunately, as you can see above, my x-y coordinate pairs are irregular and unsorted and I do not have a temperature value for every combination of x and y coordinate values.

Is there any way how to find an interpolation function for this kind of data that would enable a contourplot? Or any other ideas how to create a coloured 2D plot from this data with a legend showing the 100°C temperature color values?

Greetings, Oliver

Could you help me how to deal with this problem?

restart;

with(plots):with(plottools):with(DETools):

 

Sys:=diff(T(R),R)=((1-1/R)*(sqrt(1-(alpha/R)^2*(1-1/R))))^(-1),diff(Phi(R),R)=(alpha/R)^2*(sqrt(1-(alpha/R)^2*(1-1/R)))^(-1);

diff(T(R), R) = 1/((1-1/R)*(1-alpha^2*(1-1/R)/R^2)^(1/2)), diff(Phi(R), R) = alpha^2/(R^2*(1-alpha^2*(1-1/R)/R^2)^(1/2))

(1)

 

inits:=[[T(0)=0.5,Phi(0)=0],[T(0)=0.5,Phi(0)=Pi/4]];

[[T(0) = .5, Phi(0) = 0], [T(0) = .5, Phi(0) = (1/4)*Pi]]

(2)

K:=dsolve([Sys,op(op(1,inits))],[Phi(R),T(R)],numeric,parameters=[alpha],output=listprocedure);

Error, (in dsolve/numeric/make_proc) ode system is singular at the initial point

 

 

Download HW6.m

The linearfit in Maple has the option to output the covariance matrix.  I do not see that option for nonlinear fitting.  Am I missing something?

what is wrong..in the past ..this equations was solved..now it doesnt' solved anymore...integral equations

total_PE.mw

hello sir..i'm new..and i want to know how to put command prompt ..between two command line .i read but i didn't find..

Essentially, this issue is only about how to make the graph look relatively more aesthetically pleasing.

It seems that the color of the arrowheads in a directed graph is consistent with the color of the edges, and their shape also seems to be unchangeable. I wonder if I missed something.

with(GraphTheory):
G := Digraph({[1, 2], [2, 3], [3, 4], [4, 1]});
DrawGraph(G, stylesheet=[vertexborder=false,vertexpadding=5,edgecolor = "Black",vertexcolor="MistyRose",edgethickness=2],size=[250,250]);

 

For example, I would like to draw it in the following style, where the arrowhead color of the directed edge "[1,2]" is red, and the arrowhead of the edge [3,4] is hollow.

Interestingly, the layer where the arrowhead is located seems to always be below the layer of the straight edge, making it impossible to cover it. I prefer the following style (adjusted using Inkscape).

 

 

 

 

 

 

 

 

 

 

Of course, it would be better if the two black arrowheads could be further apart. This can be easily achieved with other vector software. I wonder if it is easy to implement in Maple.

First 89 90 91 92 93 94 95 Last Page 91 of 2097