MaplePrimes Questions

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.

I currently have a document in which controls and a plot are displayed "inline".  I need more controls and more control over where they appear.  Ideally I need my code to display a window in which the controls are laid out and in which the plot can be displayed.  Is this possible with Maple (I know it can be done with other products)?

This is really a question on getting index positions of a sub list from the main list.

Have a list of Vertices and a list of populations for each vertes.

Then from the Neighbours list I need the respective positions in the Vertex list to sum to corresponding values from the population list.

2nd Question  Can the population values be displayed near its vertex or in the vertes circle? e.g y=5

restart

NULL

with(GraphTheory)

with(SpecialGraphs)

Vs := [x, y, z, w]

[x, y, z, w]

Popvs := [-2, 1, 6, 3]

[-2, 1, 6, 3]

newPopsvs := Popvs

[-2, 1, 6, 3]

``

X := Graph(Vs)

GRAPHLN(undirected, unweighted, [x, y, z, w], Array(1..4, {(1) = {}, (2) = {}, (3) = {}, (4) = {}}), `GRAPHLN/table/1`, 0)

``

AddEdge(X, {{w, y}, {w, z}, {x, y}, {y, z}})

GRAPHLN(undirected, unweighted, [x, y, z, w], Array(1..4, {(1) = {2}, (2) = {1, 3, 4}, (3) = {2, 4}, (4) = {2, 3}}), `GRAPHLN/table/1`, 0)

Nbs := [seq(Neighbors(X, Vs[i]), i = 1 .. nops(Vs))]

[[y], [x, z, w], [y, w], [y, z]]

``

vp := [[0, 0], [1, 0], [1.5, 1], [2, 0]]

[[0, 0], [1, 0], [1.5, 1], [2, 0]]

SetVertexPositions(X, vp)

DrawGraph(X)

k := rand(1 .. 4)

NULL

for c to nops(Nbs) do Nbs[c]; select(proc (i) options operator, arrow; Vs[i] = Nbs[c, 1 .. -1] end proc, [`$`(1 .. nops(Vs))]) end do

[]

NULL

Download Q_23-12-22_Test_Graph_indices_.mw

with(ImageTools);
U1 := Read("C:/Users/S/Desktop/StarPicture.jpg"):

ttt0 := textplot([0 + 0.5, (5 + 0) - 0.5, " Star ", color = "blue", font = ["times", "roman", "bold", 40]]):
display(ttt0, U1, axes = none, size = [400, 160]);

This is the error I get:

Error, (in plots:-display) cannot display array with other plots

I can see Maple doesn't allow adding images to plots. But is there a way around that?

I want to be able to virtually have a white box that I can add plots to such as curves, text, and images at certain locations etc? I want to do that with actual Maple code in the worksheet, without having to mouse-clicking Menu, insert, etc.

Thanks

As we know, choosing different generators can all represent the same group. But how can I get the combination of these different generators by maple? For example, how do I get the following different combinations of generators of C6?

How do I characterize this equation set? I think it has 6 solutions, equal in pairs, or 3 distinct solutions.

restart;

eq1 := x = (((72*5^(3/2)+270)*a^2-1344*5^(3/2)*a)*w+(9*5^(5/2)-1485)*a^2-2016*5^(3/2)*a-12544*5^(5/2))/(((288*sqrt(5)+216)*a^2-5376*sqrt(5)*a)*w+(36*5^(3/2)-1188)*a^2-8064*sqrt(5)*a+6272*5^(3/2)):

eq2:= a^3 = -(128*5^(5/2)*w)/9+(1600*w)/3+(544*5^(3/2))/9+15200/27:

eq3:=1+w+w*w = 0:##   or w = (sqrt(3)*%i)/2-1/2;

for s1 in [solve(eq2,a)] do
    for s2 in [solve(eq3,w)] do
        subs(a=s1, eq1):
        subs(w=s2,%):
        lprint("sol",simplify(%));
    end do;
end do;
 

The loop for HFS _data_2 and SFS_data_2 and the loop for HFS _data_3 and SFS_data_3 do not seem to be terminated. I do not know what it is the issue here. Anyone who can help this?

Negativity_(v12_beta_gamma_mu).mw

Thank you in advance,

simplify(sqrt((x^2 + y^2)/x)/sqrt(x^2 + y^2)) assuming x>0, y>0

is not sqrt(1/x), why?

Warning, data could not be converted to float Matrix

If we have two univariate polynomials $f(x)$ and $g(x)$ such that

$gcd(f(x),g(x))=1$

then we know there exist two other polynomials $a(x)$ and $b(x)$ such that $a(x)f(x)+b(x)g(x)=1$. For example, if $f(x)=x^3−1$ and $g(x)=x^2+2$, then we can set

$a(x)=\frac{2x−1}{9}$, $b(x)=\frac{−2x^2+x+4}{9}$

Here the polynomials $a(x)$ and $b(x)$ are known as Bezout polynomials and they can be found using the extended Euclidean algorithm, which I know how to do using pen and paper, but not in Maple.

So my question is: in Maple, is there a way, given $f(x)$ and $g(x)$, to solve for $a(x)$ and $b(x)$?

Another training example (number 2 and last) for finding all solutions to a system of equations:

f1 := x3^2-0.1*x1^4-0.05*x2^4+1;
f2 := x1^3+x2^3+0.05*x3^3-1; 
f3 := -2*cos(3*x1)+2*cos(3*x2)-2*cos(3*x3)+1;

In my version, there are 116 solutions.
Is it so?

What kind of solution is it (see (3))? Why is there no solution when I put the initial condition v(0)=C1? Secondly, eq. (2) can be reduced to a first-order differential equation?

restart

interface(showassumed = 0)

declare(v(y))

(1)

q := v(y)*(diff(diff(diff(v(y), y), y), y))+(2*v(y)-(diff(v(y), y)))*(diff(diff(v(y), y), y))+(diff(v(y), y))*(v(y)^3+v(y)-(diff(v(y), y))) = 0

v(y)*(diff(diff(diff(v(y), y), y), y))+(2*v(y)-(diff(v(y), y)))*(diff(diff(v(y), y), y))+(diff(v(y), y))*(v(y)^3+v(y)-(diff(v(y), y))) = 0

(2)

dsolve(q)

v(y) = ODESolStruc(_a, [{(diff(diff(_b(_a), _a), _a))*_b(_a)^2+_b(_a)*((diff(_b(_a), _a))^2*_a+_a^3-(diff(_b(_a), _a))*_b(_a)+2*(diff(_b(_a), _a))*_a-_b(_a)+_a)/_a = 0}, {_a = v(y), _b(_a) = diff(v(y), y)}, {y = Int(1/_b(_a), _a)+_C1, v(y) = _a}])

(3)

NULL

dsolve({q, v(0) = C1})

v(y) = C1

(4)

NULL

Download CD_ode.mw

File:

PCA.mw

I am a student in the middle of a projekt, where math is an essential part of the task. I have done a lot of work in a maple document, but this document suddenly became corrupted. I've tried restarting and loading backups and f ollowed Can I repair a corrupted Maple document/worksheet file? (maplesoft.com) but the solutions didn't work on my document.

Also tried the DeleteBadCharacters() proccess, but i get the error "Error, (in XMLTools:-ParseString) Element type "Equation" must be followed by either attribute specifications, ">" or "/>"."

Is there a way to fix this issue, and prevent the same issue occuring in the future? 

Thanks in advance!

This is a training example for finding all solutions to a system of equations. If you look at the graph, you can count 36 solutions, but I managed to find 20 relatively good approximations. No attempts to get more solutions, which are also visible as intersections of graphs, did not lead to success. Therefore, there is a suspicion that there are only 20 solutions.
Is it so?

 restart: with(plots):
 a:=8.:
 f1 := x1^4-1.999*x1^2*x2^2+x2^4-1; 
 f2 := tan(x1+x2)-x2*sin(x1);
 implicitplot([f1, f2], x1 = -a .. a, x2 = -a .. a, numpoints = 25000, scaling = constrained,  color = [red, blue], thickness = 1);
   1, (3.192246883291975), (-3.0395187374365404)
   2, (3.0952031367176476), (-3.2447717313041897)
   3, (0.5881900748267959), (-1.160066226905079)
   4, (-0.936866718243322), (-1.3700058362814254)
   5, (-2.555853694651265), (-2.7399958564861953)
  6, (-3.2556241416421168), (-3.3964651254113774)
   7, (-3.583319843955091), (-3.7077839724189228)
   8, (-5.364827188794712), (-5.401998918608201)
   9, (-5.398295356665546), (-5.360818510223991)
  10, (-3.769206506106412), (-3.6477855329362683)
  11,(-1.3978806247566642), (-0.9772190664843745)
   12, (-1.192159295544978),(0.6492335177657542)
   13, (-3.0867255059416623),(2.927375855548188)
    14, (-3.18519036357835), (3.329801919022179)
   15, (2.0108268901120754), (2.243492422396739)
   16, (3.1133812329649766), (3.261937603184373)
   17, (4.0265558604742715), (4.130826167761226)
    18, (4.124539552922121), (4.019977762680433)
    19, (3.172338340844501), (3.018365965761908)
   20, (2.1945695320368097), (1.9558412553082192)


 

First 128 129 130 131 132 133 134 Last Page 130 of 2308