Maple 2020 Questions and Posts

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

Let's consider nonlinear partial differential equations as follows:

It can be reduced into the nonlinear ordinary differential equation

by using the transformation as follows:

How to write a code for transforming the PDE to ODE by Maple?
 

For example; let's consider the following PDE

by using the transformation above we get the following ODE. 

 

restart:
with(PDEtools):
tr1:={x=mu*t + xi,u(x,t)=U(xi) };
PDE := diff(u(x,t),t) +p*u(x,t)*diff(u(x,t),x) +q* diff(u(x,t),x$3)=0;
dchange(tr1,PDE);

 

How I can obtain system (21) in the following pdf file?
In the first step several changes of variables are done to obtain the system (20),
then changes the variables again repeated in the neighborhood (w1 *, w2 *) to gain Eq 21.
I have 3 questuin:
1-The change of variables performed in the neighborhood (w1 *, w2 *)
for system (20) or for system (7) ???
2-What does it mean in the neighborhood (w1 *, w2 *)?
3- How did obtaun Eq (21)?

[upload link replaced by moderator, as violation of Term of Use]

[paperhub.ir]10.1016@j.neucom.2010.06.023.pdf

 

I am using code edit region for parameters but getting this error, can someone help me to solve this issue.

 

So I recently bought a new desktop with Windows 10 installed. The problem is hard to describe so I put a picture. This problem occurs randomly (Mostly occurs after I click the right button, when browsing the option in the pop-up toolbar).

When this problem happens, if I move my mouse to any toolbar which suppose to pop-up a toolbar, the pop-up toolbar wont disspear. And ultmately leads to the picture I showned above.

Sorry for the bad explaintion but it is just like I said, it is hard to describe the problem. This PC arrives around Christmas and I downloaded Maple last week. And it never have been normal. This issue also happens to NetLogo (A model simulation software).

I asked DELL's technique services and they did a remote control to help me fix the issue. However, the problem doesn't solved (They worked on this for about 3 hours). It seems the only choice I have is to reinstall the Windows. 

Does anyone have met this problem or know who met it before? Please let me know and I'm really appreciate it.

 

 

Is there a workaround for this?

restart;
int(sqrt(x)*sin(sqrt(3)*ln(x)/2),x)

The answer according to Mathematica is

Maple 2020.2 on windows 10

 

Here is what I'm trying to do. Say I have a Digraph G1 defined by:

with(GraphTheory):
G1:=Digraph([a,b,c],{[[a,b],2],[[b,c],3],[[c,a],4]});

I would like to produce the undirected graph G2, with the same weights:

G2:=Graph([a,b,c],{[{a,b},2],[{b,c},3],[{c,a},4]});

After looking in the GraphTheory package, I found UnderlyingGraph, which seems to do what I want.

Namely,

G3:=UnderlyingGraph(G1,weighted=true);

I had a first problem: there is a bug in the documentation, as the option is 'weights' in the documentation, whereas the source code shows it must be 'weighted'.

 

But then I had another problem, but maybe I didn't understand the purpose of UnderlyingGraph: apparently, I don't get G2. For instance:

 

DijkstrasAlgorithm(G1,a);
            [[[a], 0], [[a, b], 2], [[a, b, c], 5]]

DijkstrasAlgorithm(G2,a);
              [[[a], 0], [[a, b], 2], [[a, c], 4]]

DijkstrasAlgorithm(G3,a);
            [[[a], 0], [[a, c, b], 0], [[a, c], 0]]

The problem seems to come from the weight matrix, which is not symmetric (it is for G2):

WeightMatrix(G3);
                           [0  2  0]
                           [       ]
                           [0  0  3]
                           [       ]
                           [4  0  0]

Edges(G3,weights=true);

{[{a, b}, 0], [{a, b}, 2], [{a, c}, 0], [{a, c}, 4], [{b, c}, 0], [{b, c}, 3]}

 

However, G3 is undirected:

IsDirected(G3);

          false

So, the graph is undirected, but it has different weights for a-b and b-a. Weird.

Now, I am wondering what UnderlyingGraph is supposed to return. After looking at the source code, it seems the statement EW := EW0 + LinearAlgebra:-Transpose(EW0) builds a symmetric weight matrix, but for some reason it's not what is returned.

Is this a bug in the function? Or did I do something wrong? Is there a better way to achieve what I wanted?

 

>(solve(0 < M^2 - 4*m^2, M) assuming (0 < M, 0 < m))

>with(plots):

>inequal(0 < M^2 - 4*m^2, M > 2*m, m = 1 .. 5)

I know that it won't work:

Error, (in plots:-inequal) invalid input: Plot:-Inequality expects its 2nd argument, r1, to be of type name = range(And(realcons, Not(infinity))), but received 2*m < M

I even try

>inequal(0 < M^2 - 4*m^2, m = 1 .. 5, 2*m < M)

But is it possible to do it another way. Could it be an added functionality.

Of course, if I write values like this:

>inequal(0 < M^2 - 4*m^2, m = 1 .. 5, M = 2 .. 10)

I get a plot, a triangle.

 

Consider the following simple example. It works fine and we get a plot with two blue points and two red points when we run it inside Maple. However, when we right click on it and choose export as `.eps` file, the result is a plot with four black points!

List := [[[0, 0], 1], [[1, 2], 0], [[2, 3], 0], [[3, 1], 1]]:
plots[pointplot]([seq(List[i][1], i = 1 .. nops(List))], color = [seq(`if`(List[j][2] = 1, red, blue), j = 1 .. nops(List))], symbolsize = 12, symbol = solidcircle, labels = [typeset(t), typeset(x[t])]);

Of course one solution is to make a seperate pointplot for each color and then use `plots[display]`. But what if there is a situation with more number of colors or a gradient of colors which you can't know how many colors will be in the end?

Is there any specific reason behind becoming black when I export the output of this plot? I wonder why it is displayed properly inside Maple, but not in the eps output.

Why this fails in solve in Maple 2020.2?

restart;

A:=-ln(u)/2 + ln(3*u - 2)/6;
B:=_C1 + ln(x);
sol := solve(A-B= 0,u) assuming real

No error if I try the above code in Maple 2019.2.

Also, the error goes away if I replace assuming real  with assuming x::real

restart;

A:=-ln(u)/2 + ln(3*u - 2)/6;
B:=_C1 + ln(x);
sol := solve(A-B= 0,u) assuming x::real

Is this a bug in solve?

Maple 2020.2 on windows 10.

 

Why this error shows up when adding assuming?

restart;
expr:= ln(c^2*y/sqrt(c^2)+sqrt(c^2*y^2+1));
simplify(expr,size=true,evaluate_known_functions=false);
simplify(expr,size=true,evaluate_known_functions=false) assuming real;  #error

 

Is this to be expected?

Maple 2020.2

I got the plot of an ellipsis and a hyperbola using the following code:

plot([sqrt((1^2 - 0.5)*(1 - x^2/(2^2 - 0.5))), -sqrt((1^2 - 0.5)*(1 - x^2/(2^2 - 0.5))), sqrt((1^2 - 2.5)*(1 - x^2/(2^2 - 2.5))), -sqrt((1^2 - 2.5)*(1 - x^2/(2^2 - 2.5)))], x = -2 .. 2, scaling = constrained, color = [blue, blue, red, red])

How can I get the two vectors n1,n2 as shown in the following picture (the intersection point of the curves defines the beginning of the vectors)

 

I was trying to use the idea explained in this post (), using `densityplot` to create a barplot. But there are several difficultes specially using new Maple that has problem with exporting plots in pdf format the same as displayed inside Maple.

The example code:

zmin := 0;
zmax := 1;
verthuebar := plots:-densityplot(z, dummy = 0 .. 1, z = zmin .. zmax, grid = [2, 10], style = patchnogrid, size = [90, 260], colorscheme = [ColorTools[Color]([0, 0, 1]), ColorTools[Color]([1, 0, 0])], style = surface, axes = frame, labels = [``, ``], axis[1] = [tickmarks = []], axis[2] = [tickmarks = [aList[1] = "0   ", 0.5 = typeset(alpha*` `), 1 = "1    "]]);

Problems:

1- When I export the bar-plot as `.eps`, it shows white lines as a grid, while I don't want it and it is not the same way it is displayed at Maple! 

test-1.pdf

I tried adding `gridlines=false` and other similar things, but had no effect. I changed `10` to `3` in `grid = [2, 10]`, but it increases the distance of 0 and 1 from the borderies and therefore wrong numbers will be read from the color bar. Exporting the picture as `.pdf` doesn't have that gridlines problem, but destroys the proportions of the image, so I want to stick on the `.eps` one, but without those white lines.

2- How can I have 0 and 1 exactly on the start and end of the color bar and with no distance from the edges? I can use `view=[0..1,0..1]` at the end of the above code, but depending on the number in the `grid=[2,n]` that I choose, the colors may not start and end exactly at the specified colors.

I think Maple's simplify could need much more improvement. 

Here is another example, which I can't get Maple to simplify to zero for positive x, when it is clearly zero there

restart;
ode:=x = (diff(y(x),x)^2+1)^(1/2)*diff(y(x),x);
mysol:=y(x)=_C1+int(  sqrt(-2+2*sqrt(4*a^2+1))/2,a=0..x);
check:=odetest(mysol,ode);

The above is zero for x>0

But I tried every assumption or option on it, and it will not give zero.

simplify(check) assuming x>0;
simplify(check,symbolic);
simplify(check,symbolic,sqrt) assuming x>0;
simplify(check,sqrt) assuming x>0;
simplify(check,radical) assuming x>0;
simplify(check,power) assuming x>0;
etc...

Here it is in Mathematica

ClearAll[x];
check = x - (Sqrt[2 + 2 Sqrt[4 x^2 + 1]]) (Sqrt[-2 + 2 Sqrt[4 x^2 + 1]])/4;
Simplify[check, Assumptions -> x > 0]

Why Maple can't simplify this to zero?  Is there some other specific trick one must use each time?

Maple 2020.2 on windows 10

 

The interval [0,T] is divided into n subintervals [i*h, (i + 1)*h], i = 0,1,2, . . . ,n -1, of equal lengths h where h=T/n.

The first (n + 1) hat functions   is defined as follows:

 

Question:

How to find g_ij ( the value of the following integral)

=

where 

i = 0,1,2, . . . ,n -1,

alpha>0,

0<=t<h.

 

In fact, 

by using the Maple, I want to check whether it is equal to the following expression or not:

There is the following differential equation:

 

where l(t)=2+t,  g=10 and the goal is to find φ(t). I wrote the following code:

M := diff(phi(t), t);

M1 := diff(M, t);
g := 10;
M2 := diff(l(t), t);
ode := M1 + 2*M2*M/l(t) + g*sin(phi(t))/l(t) = 0;
ics := phi(0) = 1, D(phi)(0) = 1;
l := t -> 2 + t;
ode;
dsovle([ode, ics]);
 

But I don't get any result. How can I solve this differential equation?

First 18 19 20 21 22 23 24 Last Page 20 of 55