Maple 2016 Questions and Posts

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

 

How can I draw a "regular looking" histogram where all the bars adjacent to each other?

I tried looking into the options for histograms with no luck. I included a picture of what kind of output I am looking for.

Thanks in advance.



I am just confused to be getting this error seeings FileTools does not encounter this error when I use it's ListDirectory command:

 

error_for_primes.mw
 

with(ImageTools):

FileTools:-ListDirectory(currentdir())

["IMG_20200116_015953.jpg", "magetools commands.mw"]

(1)

Read("H:\\MAPLE\\Image_Project", format = JPEG)

Error, (in readbytes) permission denied

 

NULL


 

Download error_for_primes.mw



I couldnt find this command in the number theory package, as far as what i am thinking of doing it should be straight forward but very long winded, so if I have missed this command throughout the packages up to Maple 2016 I would appreciate someone telling me otherwise I suppose it's what i am doing for the next few hours

https://en.wikipedia.org/wiki/Partition_(number_theory)
 

A flexible rope of constant linear density hangs from one fixed end.

The lower end is pulled aside and then released.

The rope swings back and forth with a whip-like action.

What equation of motion can be used to animate this action in Maple?

I cannot find any references through Google to the appropriate math. 

Please explain the logic used to construct the plot below.

plots:-implicitplot(r >= cos(theta), r = 0 .. 1/3, theta = 0 .. 2*Pi, filledregions, coords = polar, numpoints = 5000, scaling = constrained)

The help page for dsolve,numeric,events says that "A call to a procedure-form dsolve numeric procedure" can return the time that one or more events fired by coding the eventfire option.

I do not know how to code for this.

Please provide a simple example of a procedure-form dsolve numeric with an event that exhibits this feature.

 

Hello,

I want to write a code about numerical solving N(for example N=150) coupled differential equations (ODE ) with M boundary conditions in Maple but I do not know how to do it and I cannot find anything useful. in particular, I have trouble inserting boundary conditions which are a lot for N coupled difrential equations.

Does somebody have a code script on this matter? please let me know.

Thanks a bounch in advance.

For a spring hanging vertically from a fixed point, suppose the spring constant, k, is a function of the distance from the fixed point to the other (lowest) end of the spring (for example; the diameter of the spring's coils changes along the length of the spring) .

What ODE reflecting this situation will yield solutions for the harmonic motion of the spring after it is stretched from its equilibrium position?

I have to do a homework on the euler explicite and when I am trying to test it I get an erreor can someone help me please :)

restart;
eulerexp := proc (fin, condin, h, tmax)

local i, n, j, tab, N; N := tmax/h;

for j to 5 do

tab[1, j] := condin[1, j]

end do;

for n from 2 to N do

tab[n, 1] := tab[n-1, 1]+h;

tab[n, 2] = tab[n-1, 2]+h*fin[1](tab[n-1, 1], tab[n-1, 2], tab[n-1, 3], tab[n-1, 4], tab[n-1, 5]);

tab[n, 3] = tab[n-1, 3]+h*fin[2](tab[n-1, 1], tab[n-1, 2], tab[n-1, 3], tab[n-1, 4], tab[n-1, 5]);

tab[n, 4] = tab[n-1, 4]+h*fin[3](tab[n-1, 1], tab[n-1, 2], tab[n-1, 3], tab[n-1, 4], tab[n-1, 5]);

tab[n, 5] = tab[n-1, 5]+h*fin[4](tab[n-1, 1], tab[n-1, 2], tab[n-1, 3], tab[n-1, 4], tab[n-1, 5]);

end do;

return tab end proc;

condin := [25, 1, 2, 3, 4];
                        [25, 1, 2, 3, 4]


fin := proc (t, w, x, y, z) options operator, arrow; [2*t-4*w+5*x-6*y-z, x, z, t] end proc;
(t, w, x, y, z) -> [2 t - 4 w + 5 x - 6 y - z, x, z, t]

h := .1;
                              0.1
tmax := 20;
                               20


eulerexp(fin, condin, h, tmax);
Error, (in eulerexp) invalid subscript selector


 

Hello everyone!

I'm interesting in "zcoloring" funciton in colorscheme option.

I wrote simple programm which compares two results: spectrogram of signal drawn with "colormap" list and spectrogram which was plotted with zcoloring function. I use red, green, blue functions to construct JET-colormap: list and expressions in "zcoloring".

My result:

As I understand, when I use:

colorscheme = ["zcoloring", [z-> Red color function(z), z-> Green color function(z), z-> Blue color function(z)], colorspace = "RGB"]

Maple plots z-value with color RGB color coordinates defined from "zcoloring". For example, if "zcoloring" is

colorscheme = ["zcoloring", [z-> 5*z, z-> 3*z, z-> 2*z], colorspace = "RGB"]

and z value is 10, then 10 value will correspond [50,30,20]-RGB color.

My test program:

Spectrogram_zcoloring.mw

Spectrogram of my test signal:

list_test.txt

The routines for finding nonclassical symmetries of PDE, mentioned in the research articles are not currently available. The routines like GENDEFNC may have been changed to other one. Please tell how to find nonclassical symmetries of a PDE or a system of PDE. I am using Maple 2016.

Hello!

How can I make MAPLE to put out the numerical solution of the following system?
(a =0.12, c = 47.04)  Neither solve nor fsolve does the job!

Thank for your help!

>restart:
>S:=t->c*exp(-a*t)+18;

                      S := t -> c*exp(-a*t)+18

> sys:={S(2)=55,S(8)=36};

        sys := {c*exp(-8*a)+18 = 36, c*exp(-2*a)+18 = 55}

> solve(sys);

         {a = -1/2*ln(18/37*RootOf(18*_Z^3-37)^2), c = 37*RootOf(18*_Z^3-37)}

> fsolve(sys);

         fsolve({c*exp(-8*a)+18 = 36, c*exp(-2*a)+18 = 55},{a, c})

 

Basically it spits out the subset of values for which a division by zero error will occur for the function you specify on  range you specify for each of it's arguments, but I get an ambigous error when ever exponentiation features in the function I specify, which of course dramatically reduces the application of the calculator. Division,addition,substraction and multiplication are currently the only available arithmetic operators availble for the function window that I know the error will not occur.

If some one can help it is much appriciated

 

DIVISION_BY_ZERO_CALCULATOR.mw

Is there something I should be doing whenever I use simplify to avoid things like this, or should I stop using the "is" function all together?

 

interface(showassumed = 0):

 

sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1)

(n-k+1)*binomial(n+1, k)/(k+1) = binomial(n+1, k+1)

(1)

#And we have:
is(sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1))

FAIL

(2)

#And since:
is(simplify(convert(sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1), 'factorial')))

true

(3)

is(sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1)) = is(simplify(convert(sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1), 'factorial')))


 

Download main.mw

My problem is explained with sufficient detail in the below worksheet:

 

restart

Digits := 100:

with(StringTools); with(FileTools); with(ListTools)

``

currentdir("H:\\MAIN DIRECTORY\\ESD-USB\\my_maple_library")

L[1] := ListDirectory(currentdir()):

L[2] := [seq([k, L[1][k]], k = 1 .. nops(L[1]))]:

read L[1][15]:

currentdir("H:\\MAIN DIRECTORY\\ESD-USB\\Computer Science\\MAPLE\\Exponentiation by Squaring"):

 

B := proc (n) options operator, arrow; [seq(d(n, 2, j), j = 0 .. floor(ln(n)/ln(2)))] end proc:

 

 

Identity0 := proc (x, n) options operator, arrow; x^n = piecewise(`mod`(x, 2) = 1, x*(x^2)^((1/2)*n-1/2), `mod`(x, 2) = 0, (x^2)^((1/2)*n)) end proc

NULL

Generate_Equations_List := proc (n) global EquationsList, r, B_n, T; B_n := B(n); T := nops(B_n); r[T] := 1; return [seq(r[u-1] = r[u]^2*x^B_n[u], u = 1 .. T)] end proc:

Exp_by_squares := proc (M, Y) global R; Generate_Equations_List(M); R[1] := max([allvalues(rhs(isolate(F[0](Y, M)[1], r[1])))]); return 'x^n' = R[1]^2*X^B_n[1] end proc:

 

N := (rand(25 .. 33))():

n = 31

 

x = 34

 

x^n = 299120672332806228664106719451209941853702979584

 

x^n = 299120672332806228664106719451209941853702979584

(1)

NULL

st := time[real]():

x^n = 299120672332806228664106719451209941853702979584

 

0.40e-1

(2)

st := time[real]():

x^n = 299120672332806228664106719451209941853702979584

 

0.74e-1

(3)

is(t2 < t1)

false

(4)

``


 

Download slow.mw

 

 

So I know I have obviously done something wrong, but it has proven very difficult to establish where given how little i know about the solve function

 

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