Maple 2019 Questions and Posts

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

Hi

I need your help with this problem. The date protocol here in the antipodes is day/month/year.

I get this error...Maybe there is an alternative.

does_not_evaluate.mw

 

Hello, I have a question about converting an output of a expression into another.

solve({-1 < x, 0 < 2*x/(x^2 - 1), x < 1}, {x})

This is my expression which evaluates into: solve({-1 < x, 0 < 2*x/(x^2 - 1), x < 1}, {x}). Which is correct but I would like it to be a classic range, more precisely (-1,0).

Is there a command to do that?

Thanks,

David.

I compared the numerical value of an integral expression in Gradshteyn and Rhyzhik (8.431.5) for the BesselI(v,z) function to the BesselI(v,z) function in Maple 2019.2 and got different answers.  The GR expression is the difference of two integrals and it looks like Maple only evaluates the first integral, which is correct only if the order v is an integer.  Please see the attached.

BesselI.mw

Hello,

I am trying to pass the graphics to .txt format so that I can plot them in Origin (OriginLab).

npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    PA[i] := x[i](t);
    printf("%e %e\n", t[i], PA[i]);
    fprintf(fd, "%e %e\n", t[i], PA[i]);
end do;
0.000000e+00 

Error, (in fprintf) number expected for floating point format
fclose(fd);
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    PB[i] := x[i + n](t);
    printf("%e %e\n", t[i], PB[i]);
    fprintf(fd, "%e %e\n", t[i], PB[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    qA[i] := x[i + 2*n](t);
    printf("%e %e\n", t[i], qA[i]);
    fprintf(fd, "%e %e\n", t[i], qA[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    qB[i] := x[i + 3*n](t);
    printf("%e %e\n", t[i], qB[i]);
    fprintf(fd, "%e %e\n", t[i], qB[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    Tg[i] := x[i + 4*n](t);
    printf("%e %e\n", t[i], Tg[i]);
    fprintf(fd, "%e %e\n", t[i], Tg[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format
npontos := 10;
dt := 0.02;
fd := fopen("out.txt", WRITE);
for i from 0 to npontos do
    t[i] := i*dt;
    Ts[i] := x[i + 5*n](t);
    printf("%e %e\n", t[i], Ts[i]);
    fprintf(fd, "%e %e\n", t[i], Ts[i]);
end do;
fclose(fd);
0.000000e+00 

Error, (in fprintf) number expected for floating point format

trabalho_final_2019.mw

I would like to know how to create a group with some elements (numbers) {1,2,4,...} with a defined operation on it like X_42 (modular  multiplication by 42).

What is the command to yield the expansion of Z^N in terms of x and y.

Z complex = x+iy,

N integer >1

e.g. Z^2 = x^2 - y^2 + 2.i.x.y

 

could you just delete the post !!!!!!!!!!!!!!!!!!!!!!!!!!!x!xxxx!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Hi,

Let's take the last example (Maple 2019) given in help[sparsematrixplot] (representation of the adjacency matrix of a graph).
Vertices of this graph are labelled 1, 2, ...20.
Suppose I change these names as a, b, ...t.
I would like the tickmarks of the sparsematrixplot output match the names of the vertices of the graph, and not the integers 1, 2, ..20

I tried this:
S := [$1..20] =~ StringTools:-Char~(96 +~  [$1..20]);
plots:-sparsematrixplot(..., tickmarks=[S, S])

But the only the tickmars of the columns are changed, not those of the rows.

Is it possible to change the names of the tickmarks ?


Thanks in advance.

Hello,

Please, what is going wrong that it is not graphing the ODE system solution?

eqs := seq(eq[i], i = 1 .. 6*n);
cis := seq(ci[i], i = 1 .. 6*n);
sol := dsolve([eqs, cis], numeric, stiff = true, output = listprocedure);
for i to n do
    graf1[i] := odeplot(sol, [t, x[i](t)], 0 .. 5, color = black);
end do;
for i from 11 to 2*n do
    graf2[i] := odeplot(sol, [t, x[i](t)], 0 .. 5, color = blue);
end do;
for i from 21 to 3*n do
    graf3[i] := odeplot(sol, [t, x[i](t)], 0 .. 5, color = green);
end do;
for i from 31 to 4*n do
    graf4[i] := odeplot(sol, [t, x[i](t)], 0 .. 5, color = red);
end do;
for i from 41 to 5*n do
    graf5[i] := odeplot(sol, [t, x[i](t)], 0 .. 5, color = pink);
end do;
for i from 51 to 6*n do
    graf6[i] := odeplot(sol, [t, x[i](t)], 0 .. 5, color = orange);
end do;

display(seq(graf1[i], i = 1 .. n));
display(seq(graf2[i], i = 11 .. 2*n));
display(seq(graf3[i], i = 21 .. 3*n));
display(seq(graf4[i], i = 31 .. 4*n));
display(seq(graf5[i], i = 41 .. 5*n));
display(seq(graf6[i], i = 51 .. 6*n));


trabalho_final_2019.mw

BIOMAT_project.mw

 

I am looking at an SIR model and an adapted model that has a vaccine for measles. I would like to use Maple to plot the difference between the two models. 

All the work that's been done so far is in the attached file. I would like to have multiple graphs, changing the starting values but I just need the general idea of how to do this first. 

Hi

I'm trying to rearrange a transfer function to get my s^2 term with other specific terms . Below is the denominator of the transfer function. I know that my goal is to get (Izz*u)/m for the s^2 term, so I divide by Df*Dr*(a+b)*u*m, as shown below.

However, if we look at the s^2 terms for now, the equation should be further simplified leaving me with simply (Izz*u)/m, but Maple doesn't want to do this for some reason, and if I use simplify on the above expression it tries to expand everything again, and forgetting about my collect(fun, s).

 

Is there any way to get around this?

 

Many thanks

 

Hi, 

This is a question more or less related to this one Is it possible to define variables with unusual na... but I think it's better to open a new thread. If some think otherwise, please feel free to displace it to the link above.

I want to relabel the vertices of a graph by using special characters.
It happens that this works perfectly if I do not impose the style of the drawing but that it doesn't if I set, for instance, spring=style.
In the attached file you will see that the subsitution of the old vertex names by the new ones doesn't work if apply it directly on the many operators of the PLOT command contains.

Is this behaviour fixed in more recent versions of Maple or it's still present?


Strange-Behaviour-with-SpringStyle.mw

I have a region that can be graphed by A := plots:-inequal([evalc(abs(z)) < 3, evalc(1 < abs(z - 1))], x = -5 .. 5, y = -5 .. 5)

From there, I need to use the transformation 

M := (3 + sqrt(5))/2*(z - x1)/(z - x2) where x1 := (9 - sqrt(45))/2 and x2 := (9 + sqrt(45))/2 

 

How do I do this? Do I need to extract data points from the first graph? Is there an easier way to do this? 

The Library:-RedefineTensorComponent in the physics package has got some serious problems, I guess in the update. It is not assigning the components at the right location for a tensor of rank 4 and above. It is working for tensors of rank 1, 2 and 3. Can someone please look into the issue and help out?

I am attaching the code with an example to indiacate the problem. Redefine.mw

Hi,

Defining variables named H2 or O2 doesn't pose any problem (H__2 for instance), but could it be possible in Maple 2019 to define a variable named H2O2 ?

Thanks in advance

First 25 26 27 28 29 30 31 Last Page 27 of 44