Maple 2018 Questions and Posts

These are Posts and Questions associated with the product, Maple 2018

Hi, 
So I am trying to use Maple to find the integer points in a region(s) bounded buy a set of inequalities. But for a specific set of inequalities, in four variables,
inequalities:= [-a1-a2+a3+a4 <= 2, a1+a2 <= 3, -2*a1 <= -1, -2*a2 <= -1, -2*a3 <= -1, -2*a4 <= -1, -a1+a2+a3-a4 <= 4, -a1+a2-a3+a4 <= 4, a1-a2+a3-a4 <= 4, a1-a2-a3+a4 <= 4]; in four variables, vars :=[a1,a2,a3,a4];

I am getting the following error
Error, (in solver) invalid input: LinearMultivariateSystemInternal expects its 1st argument, eqns, to be of type ({list, set})({`<`, `<=`, `=`}), but received {a1-a2 = 0, -11/2+a1 <> 0}

Also, upon checking the inequalities by hand, I am sure that the region mentioned in the error doesnt come up. as based on the inequalities, it is not possible to have -11/2+a1 > 0. But though I could be wrong about my manual inequality analysis, the error is still suprising and worrying. 
Another point to note is that if I do a variable change, as
t1 := a1-a2;
t2 := a1+a2;
r1 := a3-a4;
r2 := a3+a4;
Then with new variables the inequalities are solved without any errors.

I am working with Maple2018 for this problem. 

Any help or insight into the root of this problem would be a lot of help. 


 

I havev to calculate the intersection of three planes and need to plot them, when I try to plot them I get this error:

Error, (in plot3d) bad range arguments: (Vector(3, {(1) = -4*_t2[3], (2) = 3*_t2[3], (3) = _t2[3]})) = -8 .. 8, y = -20 .. 20

This is my code so far:

with(LinearAlgebra);
A := <1, 1, -2|3, 4, -7|-5, -8, 13>
b := <0,0,0>

x := LinearSolve(A, b)
P1 := x+3*y;
P2 := x+4*y;
P3 := -2*x-7*y;
plot3d([P1, P2, P3], x = -8 .. 8, y = -20 .. 20, plotlist = true, color = [blue, red, green]);
Error, (in plot3d) bad range arguments: (Vector(3, {(1) = -4*_t2[3], (2) = 3*_t2[3], (3) = _t2[3]})) = -8 .. 8, y = -20 .. 20

Hello,

I am currently doing this thing:

unapply(piecewise(x>37-0.25*t and x<37+0.25*t,-(11*sin(t/2+1.145)-10)*((x-37)^2)+(-3.5*sin(t)+ 1),10),x);

(It is used with "for t from 0 to 8 do *things* end do", hence why I use "t")

The problem I have is I don't want this (over) complicated function to go over y=10, but the conditions I tried were not working that well.

I saw on the Help page that it should be possible, but my attempts were unsuccessful...

Maple 2018.2 generates wrong latex in this example. In Latex a space in command name is important. So "\tau L" is not the same as "\tauL".  Since in the later case, Latex will complain that there is no command "\tauL"

Maple generates "\tauL" in the latex, when it should be "\tau L" in the following example, so the latex fails to compile because there is no command called "\tauL" in Latex.

Here is screen shot showing the problem and the Maple command to reproduce it

 

 

restart;
interface(showassumed=0);
pde :=  diff(u(x,t),t)=k*diff(u(x,t),x$2)+(exp(-c*t)*sin(2*Pi*x/L));
ic  :=  u(x,0)=f(x);
bc  :=  D[1](u)(0,t)=0, D[1](u)(L,t)=0;
sol:=pdsolve({pde,ic,bc},u(x,t)) assuming L>0,t>0,k>0;

latex(sol)

Any chance Maplesoft could fix this?

Possible workaround for now is to use something like "\newcommand{\tauL}{\tau L}" in preamble for this specific case.

 

Just a simple use of DataFrames.  Looking for a new flashlight, I decided to compile a small selection of flashlights for comparison.
 

interface(rtablesize = 20)

Type := `<,>`(LED, LED, LED, Incandescent, Incandescent)``

BType := `<,>`(AAA, AA, AAA, AA, AAA)

Make := `<,>`(Maglite, Maglite, Maglite, Maglite, Maglite)

Batteries := `<,>`(1, 2, 3, 2, 1)

Lumens := `<,>`(47, 245, 200, 14, 2)

Model := `<,>`(Solitaire, `Pro+`, XL50, mini, Solitaire)

Minutes := `<,>`(105, 135, 405, 315, 225)

Cost := `<,>`(17.49, 41, 46.99, 16.50, 10)

NULL

Note:The values for cost used is in Canadian dollars, and the stores for the prices taken were from the following - MEC, Lowes, Canadian Tire and Amazon.ca

NULL

NULL

NULL

Flashlight := DataFrame(`<|>`(Make, Model, Type, BType, Batteries, Lumens, Minutes, Cost), columns = `<,>`("Make", "Model", "Type", "BType", "Batteries", "Lumens", "Minutes", "Cost"))

_m652460160

(1)

NULL

numelems(Flashlight)

40

(2)

sort(Flashlight, "Cost")

_m653259008

(3)

sort(Flashlight, "Lumens")

_m629071232

(4)

NULL

No surprise that the cheapest and lowest light outputs were incandescent flashlights.  The list isn't very large so lets add a few more flashlights to our list

NULL

new1 := DataFrame(`<,>`(`<|>`(Thrunite, Ti3, LED, AAA, 1, 130, 30, 26.95), `<|>`(Police*Security, Stealth, LED, AA, 1, 80, 60, 7.99), `<|>`(Police*Security, Shield, LED, AA, 1, 120, 90, 15.99), `<|>`(Fenix, E12, LED, AA, 1, 130, 90, 37), `<|>`(Fenix, E20, LED, AA, 2, 265, 30, 50.75), `<|>`(Fenix, E05, LED, AAA, 1, 85, 45, 31.99), `<|>`(Maglite, mini, LED, AAA, 2, 84, 345, 22)), 'columns' = ["Make", "Model", "Type", "BType", "Batteries", "Lumens", "Minutes", "Cost"], 'rows' = [6, 7, 8, 9, 10, 11, 12])

_m624778752

(5)

F1 := Append(Flashlight, new1)

_m647087136

(6)

sort(F1, "Cost")

_m627084608

(7)

F2 := convert(sort(F1, "Cost", `<`), DataFrame)

_m650479744

(8)

Interesting to note that Police Security generally seems to be the cheapest.

 

 

sort(F2, "BType")

_m629097504

(9)

 

 

Adding yet more flashlights

 

new2 := DataFrame(`<,>`(`<|>`(Pelican, 1910*Gen3, LED, AAA, 1, 106, 150, 38), `<|>`(Pelican, 1920*Gen3, LED, AAA, 2, 224, 135, 41)), 'columns' = ["Make", "Model", "Type", "BType", "Batteries", "Lumens", "Minutes", "Cost"], 'rows' = [13, 14])

_m629911872

(10)

F3 := Append(F2, new2)

_m625417184

(11)

sort(F3, "Cost")

_m641386752

(12)

NULL

Now lets select just the Maglite models

 

F3[`~`[`=`](F3[() .. (), "Make"], Maglite)]

_m650462944

(13)

``

Or select the flashlights that have a burn time longer than 100 minutes

 

F3[`~`[`>`](F3[() .. (), "Minutes"], 100)]

_m689998912

(14)

NULL


 

Download flashlight3.mw

What is the simplest method for adding a color bar for plottings? (a scale that shows the correspondence 
between numbers and colors)

and could you interpret the graphics and the color bar?  I need your valuable comments.


I use Maple 2018.

For example;  

question.mw

I mean

This code used to work OK in an earlier version of Maple 2018. I do not know what changed and if it some change in Physics package that caused it.

restart;
pde:=diff(u(r,theta),r$2)+1/r*diff(u(r,theta),r)+1/r^2*diff(u(r,theta),theta$2)=0;
bc:=u(r,0)=0,u(r,Pi)=0,u(0,theta)=0,u(1,theta)=f(theta);
sol:=pdsolve([pde,bc],u(r,theta),HINT = boundedseries(r = 0));

Now it gives the error 

Error, (in assuming) when calling 'assume'. Received: 'invalid arguments'

Workaround is to remove the HINT above. So the following now works

restart;
pde:=diff(u(r,theta),r$2)+1/r*diff(u(r,theta),r)+1/r^2*diff(u(r,theta),theta$2)=0;
bc:=u(r,0)=0,u(r,Pi)=0,u(0,theta)=0,u(1,theta)=f(theta);
sol:=pdsolve([pde,bc],u(r,theta));

Should this error message show up when using the HINT option?

Maple 2018.2 with Physics package cloud version 205.

Here is screen shot showing it was working in Physics 170

 

How can I calculate the Euler-Lagrange equation from the Lagrangian density from Gauged Baby Skyrme model in maple using the physics package? Here, the rules of the operation in the inner space are the same that of the vectors conventional: dot and cross products, etc...
Following below the Lagrangian density.

Errata:

Never really used the writeto command but what's with all the typesetting gobbledygook in the text file?  It occurs with document and worksheet mode.  Perhaps it's only meant for classic or command line maple?

what is the code of the following equation:

 where h, and g are matrices with positive determenets. 

Hello,

every time I input a formula I get:

Typesetting:-mparsed(x^2 +5 -2,x^2+3; "_noterminate")

I can't get rid of this error: this is very basic, what happened?

TIA, Roberto

 

I am generating a lot of random graphs in Maple, and I need to generate the LaTeX code for these graphs. It has been working very well, until now, when I got to weighted graphs. The LaTeX code does not create the weights. I know I can modify the code to add the weights, but my question is two-fold: why aren't the weights automatically generated? is it possible to have the weight automatically generated, how? Nothing in the documentation appears to address these issues.

 

An example of what I attempting to do is in the attached worksheet.

Thanks!

graph.mw

Hello everyone, I am studying to be an engineer  and I have created this document, where I both write lots of notes and make a lot of exercises. 

Suddenly my document crashed and I got this message "There were problems during the loading process. Your worksheet may be incomplete."

I have made sections for each lection - we have had 5 in total for now, but my documents only loads 2.. :(

I see that @Joe Riel has fixed a similiar problem, but I just can't figure it out myself :(

Hope anyone can help

PS. my document is in danish but there should be 5 sections where Maple only loads 2..

Edit: for some reason I can't upload my maple-file.... I'll try again later

Why can't maple integrate

restart;
`assuming`([int(GAMMA(a, s)*exp(-b*s), s = 0 .. infinity)], [b > 0, a > 0])

which has a simple result obtained by partial integration?

Is het possible to use the circletimes symbol  ⊗ from Maple's Operators palette as an alias for KroneckerProduct(A,B)?

Instead of KroneckerProduct(A,B) :  A ⊗ B

An abbriviation would be convenient for the following expression:

A ⊗ B ⊗ C ⊗ D ⊗ E ⊗ F ⊗ G

 

I tried alias, macro, applyrule but was not successfull.

Is is possible or should I add it to the Maple 2019 wishlist?

Harry

 

First 12 13 14 15 16 17 18 Last Page 14 of 35