Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Dear all

I have a first sequence alpha, I would like to define a second sequence beta using a general formula of beta[i]

sequence.mw

Thank you

This is the sort of thing that drives me nuts with Maple.

in the example below, how do I factor (L-Lm) so that the answer is in the form L1 :=L(1-k) instead of -L(k-1)?

Lm := (simplify(k*sqrt(L*L)) assuming (0 < L));
                           Lm := k L

L1 := (factor(L - Lm) assuming (0 < L and 0 < Lm and 0 <= k));
                        L1 := -L (k - 1)

in this simple case, it is easy to understand the result.  However, these kind of  representations in more complex solutions may obfuscate the result making it difficult to interpret its meaning, where as the meaning may be more obvious if the simplification or factorization led to a result formatted more similarly to the way a human would do it.  How do I get Maple to simplify things the more "traditional" way?

Hi,I am looking to create an exercise involving the pairing of 'expressions-figures,' and I want to keep the names f(x), g(x), h(x), and i(x) fixed, with the expressions randomly shuffling. Thank you for your guidance

S6QCMFonctions.mw

Dear Maple experts, I want to write text in a specific location within a Maple plot like p<c. To do that, I use 'plots:-textplot' as follows:

plots:-textplot([[0.1, 0.80, p < c, color = black]], font = [times, 11], rotation = 'horizontal');

The issue is that in my code, 'p' and 'c' are parameters with specific values. Therefore,  in my plot, their values appear instead of p<c. Even if I use 'p<c' or "p<c" it does not work.

Would you please guide me on how to solve the issue?

I am reading (and enjoying) this:

"On the computation of the nth decimal digit of various transcendental numbers" by

Simon Plouffe, 1996 (2009)

On the third page Simon calculates this:


a := 1/binomial(100, 50);
                                 1               
              a := ------------------------------
                   100891344545564193334812497256

ifactor(denom(a));
                                                           
(8)  (81)  (11) (13) (17) (19) (29) (31) (53) (59) (61) (67) (71) (73) (79) (83) (89) (97)

and builds a sum of fractions where the above primefactors are the denominators in this sum.

5/8 + 20/81 + 10/11 + 2/13 + 13/17 + 10/19 + 4/29 + 5/31 + 23/53 + 41/59 + 29/61 + 37/67 + 33/71 +19/73 + 36/79 + 7/83 + 13/89 + 88/97

Solving a diophantine equation and using continued fractions are the steps to get that fractions (see link above).

May someone explain these steps to me ?

Thanks

I am creating an user interface with embedded components (Labels, Buttons, plotwindow ...).

All works well.

Now I need to include a combobox selection in that code. I can't get any further with that.

The specific question is what to type here (this is "edit selected code", in the combobox options)

use DocumentTools in 

end use; 

to get the choosen value as a variable in the rest of the code (startup code and other code in buttons with edit click code).

A simple example explaining that would be very helpfull:)

When I try to solve the determinant the system hangs and Maple doesn't give any result. Here $\lambda_1,2$ is not a function of 'x' and 't'.

restart

with(LinearAlgebra)

with(plots)

with(Physics)

``

Setup(mathematicalnotation = true)

[mathematicalnotation = true]

(1)

assume(x::real); assume(t::real); assume(`&alpha;__1`::real); assume(`&alpha;__2`::real); assume(nu::real)

alias(v = v(x, t))

v

(2)

``

B1 := Matrix([[exp(I*v__11)/(`&lambda;__1`-conjugate(`&lambda;__1`)), 0, 0, 0, exp(I*v__12)/(`&lambda;__2`-conjugate(`&lambda;__1`)), 0, 0, 0], [0, exp(I*v__11)/(`&lambda;__1`-conjugate(`&lambda;__1`)), 0, 0, 0, exp(I*v__12)/(`&lambda;__2`-conjugate(`&lambda;__1`)), 0, 0], [0, 0, exp(-I*v__11)/(`&lambda;__1`-conjugate(`&lambda;__1`)), 0, 0, 0, exp(-I*v__12)/(`&lambda;__2`-conjugate(`&lambda;__1`)), 0], [0, 0, 0, exp(-I*v__11)/(`&lambda;__1`-conjugate(`&lambda;__1`)), 0, 0, 0, exp(-I*v__12)/(`&lambda;__2`-conjugate(`&lambda;__1`))], [exp(I*v__21)/(`&lambda;__1`-conjugate(`&lambda;__2`)), 0, 0, 0, exp(I*v__22)/(`&lambda;__2`-conjugate(`&lambda;__2`)), 0, 0, 0], [0, exp(I*v__21)/(`&lambda;__1`-conjugate(`&lambda;__2`)), 0, 0, 0, exp(I*v__22)/(`&lambda;__2`-conjugate(`&lambda;__2`)), 0, 0], [0, 0, exp(-I*v__21)/(`&lambda;__1`-conjugate(`&lambda;__2`)), 0, 0, 0, exp(-I*v__22)/(`&lambda;__2`-conjugate(`&lambda;__2`)), 0], [0, 0, 0, exp(-I*v__21)/(`&lambda;__1`-conjugate(`&lambda;__2`)), 0, 0, 0, exp(-I*v__22)/(`&lambda;__2`-conjugate(`&lambda;__2`))]]); H := Matrix([[H__11, H__12, H__13, H__14, H__15, H__16, H__17, H__18], [H__12, H__11, H__14, H__13, H__16, H__15, H__18, H__17], [H__13, H__14, H__33, H__34, H__17, H__18, H__55, H__38], [H__14, H__13, H__34, H__33, H__18, H__17, H__38, H__55], [H__15, H__16, H__17, H__18, H__11, H__12, H__13, H__14], [H__16, H__15, H__18, H__17, H__12, H__11, H__14, H__13], [H__17, H__18, H__55, H__38, H__13, H__14, H__33, H__34], [H__18, H__17, H__38, H__55, H__14, H__13, H__34, H__33]]); B := H.B1; idn8 := Matrix([[1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1]])

Omeg := B+idn8

``

vvalue := {v__11 = (conjugate(`&lambda;__1`)-`&lambda;__1`)*x+(4*`&alpha;__1`*(conjugate(`&lambda;__1`)^3-`&lambda;__1`^3)+2*`&alpha;__2`*(conjugate(`&lambda;__1`)^2-`&lambda;__1`^2)-8*nu*(conjugate(`&lambda;__1`)^4-`&lambda;__1`^4))*t, v__12 = (conjugate(`&lambda;__1`)-`&lambda;__2`)*x+(4*`&alpha;__1`*(conjugate(`&lambda;__1`)^3-`&lambda;__2`^3)+2*`&alpha;__2`*(conjugate(`&lambda;__1`)^2-`&lambda;__2`^2)-8*nu*(conjugate(`&lambda;__1`)^4-`&lambda;__2`^4))*t, v__21 = (conjugate(`&lambda;__2`)-`&lambda;__1`)*x+(4*`&alpha;__1`*(conjugate(`&lambda;__2`)^3-`&lambda;__1`^3)+2*`&alpha;__2`*(conjugate(`&lambda;__2`)^2-`&lambda;__1`^2)-8*nu*(conjugate(`&lambda;__2`)^4-`&lambda;__1`^4))*t, v__22 = (conjugate(`&lambda;__2`)-`&lambda;__2`)*x+(4*`&alpha;__1`*(conjugate(`&lambda;__2`)^3-`&lambda;__2`^3)+2*`&alpha;__2`*(conjugate(`&lambda;__2`)^2-`&lambda;__2`^2)-8*nu*(conjugate(`&lambda;__2`)^4-`&lambda;__2`^4))*t}

B2 := Determinant(B)

Omegdet := Determinant(Omeg)

NULL

NULL

Download determinant.mw

Hi everyone, Is it possible to extract data by using Maple from any figure published by any author in different papers and then ussed that to reprouced same graph in Maple?

Given a metric tensor, is there a quick way to find the signature of the metric?

Question about using the command „ExtremPoints“

I am using Maple 2019.

Using the command ExtremPoints I got different list when defining the function over a closed intervall piecewise or with f(x), x=a..b.

Maple desciption states:
ExtremePoints(f(x), x = a..b) command returns all extreme points of f(x) in the interval [a,b] as a list of values.

An extreme point is defined as any point which is a local minimum or maximum, which includes any finite end points.

So I expected, Maple returns the same list, independend of how the same function is defined (see example below). Instead: with the piecewise definition Maple returns as extrempoints only the local extrempoints without the finite endpoints.
Defining the same function with f(x),x=a..b Maple returns the list with local minimum or maximum, which includes any finite end points.

Example:

f := x -> piecewise(-1 <= x and x <= 2, x^2, undefined);

Return:  ExtremePoints(f(x));

                              [0] 

g := x -> x^2

ExtremePoints(g(x), x = -1 .. 2);

                           [-1, 0, 2]

The following code effectively converts the image to the JPG format.
with(GraphTheory):
s:=DrawGraph(CompleteGraph(5),size=[250,250])
Export("D:\\s1.jpg",s)

But I would like to export it using PDF format. However, the modified code below seems to be quite unsuccessful. I am aware that Maple has export options in the front end, but I still prefer to use code for this purpose.

Export("D:\\s1.pdf",s)

Error, (in Export) invalid input: member received _ImportExport:-InfoTable["PDF"][4], which is not valid for its 2nd argument, s

There are two reasons for this.

with(GraphTheory):
Graphs:=[NonIsomorphicGraphs(6,8,output=graphs,outputform = graph)]:
num_g:=nops(Graphs):
num:=ceil((num_g)/5.):
Matrix (num,5,(i,j)->`if`((i-1)*5+j<=num_g, DrawGraph(Graphs[(i-1)*5+j],size=[250,250] ,overrideoptions ,showlabels=false,style=planar, stylesheet =  [
 vertexcolor     = orange
,vertexfontcolor = black
,vertexborder    = false
,edgethickness   = 0.6
,edgecolor       = MidnightBlue
,vertexshape     =  "circle"
,vertexfont      = [Arial, 4],
vertexthickness=5], caption = cat(H__,5*(i-1)+j),captionfont=["ROMAN",7]),plot(x = 0 .. 1, axes = none))):
DocumentTools:-Tabulate (M1[1..5,.. ],widthmode=percentage ,width=80 , exterior =all):

In a dataframe you can easily replace 'undefined' by another value using FillMissing. However, if you want to remove the row in which a cell contained 'undefined' this seems not to be possible. 'DropMissing' will remove the complete column in which one of the cells contains 'undefined'. Is there another command that removes the row of the dataframe as a column contains an 'undefined'? Sorry for the simplistic question but I am still in my learning curve. 

Hello. I am trying to solve the following polynomial system. Maple solution is empty but when I add the polynomial X4_4-2^(1/2)/10 to the list then maple gives me a set of solutions. What could I be doing wrong?

with(SolveTools):
F:=[
10*X4_4 + Y1_1,
10*X4_4*Y1_1 + 2,
20*X4_4*Y3_1,
2*Y3_1,
10*X4_4*Y1_2,
20*X4_4*Y3_2 + 2,
10*X4_4 + 2*Y3_2,
4*L2 - 7*L1 + 5*L3 - 6*L4 + 5*L5 + 9*L6 - 6*L7 - 1,
L1 + 10*L2*X4_4,
10*L5*X4_4,
2*L4 + 20*L3*X4_4,
2*L7 + 20*L6*X4_4
]:
V:=[X4_4, Y1_1, Y1_2, Y3_1, Y3_2, L1, L2, L3, L4, L5, L6, L7]:

Sols := PolynomialSystem(F, V);

Here's a few commands you can use within Maple to collect information about your computer.  This is on a Windows 7 machine but should work for most Win7+ systems.  Not sure how far back the WMIC commands can be used, and it won't work on Mac or Linux. 

kernelopts(version)

`Maple 2022.0, X86 64 WINDOWS, Mar 8 2022, Build ID 1599809`

(1)

interface(version)

`Standard Worksheet Interface, Maple 2022.0, Windows 7, March 8 2022 Build ID 1599809`

(2)

ssystem("WMIC CPU Get Name, NumberOfCores, NumberOfLogicalProcessors")[2]

"Name                                             NumberOfCores  NumberOfLogicalProcessors  

Intel(R) Core(TM)2 Duo CPU     P8700  @ 2.53GHz  2              2                          


"

(3)

ssystem("WMIC computersystem get totalphysicalmemory")[2]

"TotalPhysicalMemory  

8517836800           


"

(4)

ssystem("WMIC memorychip get devicelocator, capacity, speed")[2]

"Capacity    DeviceLocator  Speed  

4294967296  DIMM 0         800    

4294967296  DIMM 1         800    


"

(5)

````

Download Maple_-_computer-info.mw

Dear all

I have a system that I want to solve it, 
But I get 

''too many levels of recursion''

code_solve_system_of_equations.mw

Thank you for your help 

1 2 3 4 5 6 7 Last Page 1 of 2051