Maple 2017 Questions and Posts

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

Hello,

     The following system of ODEs is handled correctly by dsolve, but PDEtools:-Solve raises an error:

ranking := [{A(), B(x)}]:
eqn_sys := {D(B)(x) = 0, A()* D(B)(x) = 0}:
dsolve(eqn_sys, ranking);
# {A() = A(), B(x) = _C1}
PDEtools:-Solve(eqn_sys, ranking);
#Error, (in dsolve) found many possible indications of the solving variables as [{B(x)}, [{A(), B(x)}]]

In particular, it seems the error is raised when 1) the ranking is a nested list and 2) at least one of the ranking elements is a function without any arguments.

Admittedly, this is a very strange case, but I did run into this earlier today. Of course, the example here is contrived (the nested-list ranking is completely unnecessary for this example), but it illustrates the error.

As a workaround, I found replacing the function A() with its name A in the ranking solves this problem (it can be left as a function in the system of equations). Nevertheless, I thought I would point this out as it seems dsolve handles this just fine even without the workaround, and presumably PDEtools/Solve should be able to as well.

This seems similar to a previous bug; this bug was fixed in Maple 2018. Unfortunately, I haven't updated yet, so I can't verify if the patch solves this problem as well.

Hello,

     So, dsolve is able to pass arguments through to casesplit. Further, PDEtools/Solve is able to pass arguments through to dsolve. However, it appears PDEtools/Solve isn't able to pass arguments through dsolve to casesplit? For instance, consider the following differential equation:

eq := {diff(A(t),t) = A(t)*x}:
dsolve(eq, {A(t)}, ivars={x,t});
PDEtools:-Solve(eq, {A(t)}, ivars={x,t});

Here, I'm considering both x and t to be independent variables (hence, A(t) should not depend on x).

In that case, dsolve correctly gives the only solution as A(t) = 0. However, PDEtools/solve doesn't seem to pass-through the ivars option and incorrectly gives A(t) = _C1*exp(x*t) as a solution.

Is there another way to have PDEtools pass this option through to casesplit?

Thanks!

Hello, when I write a large document block in maple and want to do some operations, maple shows wait cursor (hourglass) for 2-3 minutes again and again. I attached a sample file below. 

I found out when maple is installed , javaw.exe also instal and when I open bellow file, the javaw use 15% of cpu and this cause maple works slowly. 

the attached file is just an example for large document block and I undrestand that it can be simplified. I want to know how to handle large expressions generally?

K-Euler_Lagrange.mw

 

Hello people in mapleprimes,
I have two files: a batchfile named test.command, and a mpl file,
both in <<my home directory>>.

And, the codes written there are, for the test.command,

/Library/Frameworks/Maple.framework/Versions/2017/bin/maple test.mpl > output.txt

And, for the mpl file,

1+1;
diff(x^2,x);
int(x^3,x);

The test.command was made executable with chmod u+x  test.command, in advance.

From my home directory, I can run the test.command, and obtain output.txt with the result of the calculation of 
the mpl file. The above things have no problem. 

My question is a following.

When I moved the two files, the batch file and the mpl file, to /Users/myname/Desktop/maple_test, 
I cannot get maple to exhaust the appropriate output.txt but an error message, saying it could not read the mpl file.
What should be done to the contents of two files?

I hope you will teach me about this.

Thanks in advance.

taro

 

 

 

I tried to open Maple but it just won't launch it just stays in the loading screen but it doesn't load. I tried everything Uninstalled it and installed it again, uninstalled Java and installed it again, updated all my drivers but it just seems like it doesn't work. Please help if you can.

Hi!

I have been using Maple for the last three years with almost no complaints. Great product. 
However recently I have acquired a new laptop and upon installing Maple I noticed the GUI appeared different from my past experience. Some "buttons" are now tiny and severely impractical to click:

 

As you can see the X-icon use to close individual sheets is tiny and so are the "click and drag" squares in the corners of the plot. The problem extends to other objects/buttons not shown in the picture.

The toolbar icons are NOT a problem.

My screen resolution is 3840x2160 and the high resolution must be the problem but when i lower my display resolution nothing changes. 

Any help will be greatly appreciated!

Hello,

     I'm attempting to solve a rather trivial trigonometric equation, but solve seems to be behaving rather inconsistently. If I attempt this equation

eq := G*cos(x+C1) = A*sin(x):
vars :=  {G, C1, x}:

solve(eq, vars);

it returns the correct, expected result

{C1 = -1/2*Pi, G = A, x = x}, {C1 = 1/2*Pi, G = -A, x = x}, {C1 = C1, G = G, x = arctan(cos(C1)*G/(G*sin(C1)+A))}

However, if I remove x from the list vars of variables for which to solve, I expect it to return the first two elements, {C1 = -1/2*Pi, G = A}, {C1 = 1/2*Pi, G = -A}. However, this isn't what happens. Instead, solve returns {C1 = C1, G = A*sin(x)/cos(x+C1)}; it's true that this is a valid solution, but it seems to be missing the two I want. Is there a way to recover the desired solutions?

And a related question: even without removing x from vars, solve appears to have trouble with the equation. Simply changing sin to cos, as so

eq := G*cos(x+C1) = A*cos(x):
vars :=  {G, C1, x}:

solve(eq, vars);

Now only returns

{C1 = C1, G = G, x = arctan((G*cos(C1)-A)/sin(C1)/G)}, {C1 = C1, G = G, x = arctan((-G*cos(C1)-A)/sin(C1)/G)}

That is, it is missing the expected solutions {C1 = 0, G = A}, {C1 = Pi, G = -A}. Is there a reason for this difference?

Thank you very much!

Hi,

I would like to do some computations with Maple using elliptic functions. The implementation in Maple wants me to provide the g2 and g3 invariants. However, what I have is the half-periods. Does Maple have a function, that calculates the invariants from the half-periods? I know I can do that myself, but I'd like to write something concise and probably the output of a built-in function will be precisely, what the other functions are looking for.

Thanks in advance

Hello, I have a simple system that I'm attempting to solve:

eq:={r*cos(c) = a, r*sin(c) = 0}:

If I pass this system to solve(eq, {r,c}), it correctly returns the results {c = 0, r = a}, {c = Pi, r = -a}. However, PDEtools:-Solve(eq, {r,c}) does not find a solution. Even adding the option 'solver'='solve' doesn't help.

According to its help page, PDEtools/Solve is a unified command for solving algebraic or differential equations, so I would expect it to easily handle this system. Is there an additional option I should be passing PDEtools/Solve to make it work like solve in this case?

Thanks!

Hello,

I am trying to plot some movement equations, but the following error keeps happening:

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

when I tryed to rewrite the equation the error became:

Error, (in DEtools/convertsys) invalid specification of initial conditions

Can someone help me with those errors?

Here is the code:


restart;

with(LinearAlgebra);
with(linalg);
with(DifferentialGeometry);
with(VariationalCalculus);
with(Tensor);
with(tensor);
with(Tools);
DGsetup([t, x, y, z], M)

g1 := evalDG(N(t)^2*`&t`(dt, dt)-a(t)^2*(`&t`(dx, dx)+`&t`(dy, dy)+`&t`(dz, dz)))

g1inv := InverseMetric(g1)

C1 := Christoffel(g1)

RM1 := CurvatureTensor(C1)

RM1g := CurvatureTensor(g1)

ContractIndices(RM1, [[1, 3]])

ContractIndices(RM1g, [[1, 3]])

RT := RicciTensor(g1, RM1)

ContractIndices(RT, g1inv, [[1, 1], [2, 2]])

S1 := RicciScalar(g1, RM1)

ContractIndices(RT, g1inv, [[1, 1], [2, 2]])

RM1contra := RaiseLowerIndices(g1inv, RM1, [2, 3, 4])

RM1cov := RaiseLowerIndices(g1, RM1, [1])

Kret1 := ContractIndices(RM1contra, RM1cov, [[1, 1], [2, 2], [3, 3], [4, 4]])

eval(simplify(subs(N(t) = 1, Kret1)))

Lag := a(t)^3*N(t)*Kret1

phi = phi(t)

Lam := -(1/2)*a(t)^3*N(t)*((diff(phi, t))^2/N(t)^2+m^2*phi)

Ltot := Lag+Lam

EqELN := EulerLagrange(Ltot, t, N(t))

EqN := eval(simplify(subs(N(t) = 1, EqELN)))

Eqa := subs(N(t) = 1, Ltot)

EqELa := EulerLagrange(EqaD, t, a(t))

tini := 0

with(DEtools)

with(plots)

tfin = 10

(D(a))(tini) = 0

((D@@2)(a))(tini) = 0

((D@@3)(a))(tini) = 0

phi := a^-3

Dphi := 0

(D(N))(tini) = 0

((D@@2)(N))(tini) = 0

((D@@3)(N))(tini) = 0

sys1 := {EqN, a(tini) = 0.1e-2, (D(a))(tini) = 0.1e-2, ((D@@2)(a))(tini) = 0.1e-2, ((D@@3)(a))(tini) = 1}

tfin = 2

p1 := dsolve(sys1, type = numeric, abserr = 1.*10^(-8), relerr = 1.*10^(-8), range = tini .. tfin)

figN := odeplot(p1, [t, a(t)])

sys2 := {EqELa, a(tini) = 0.1e-6, (D(a))(tini) = 0.1e-4, ((D@@2)(a))(tini) = 0.1e-5, ((D@@3)(a))(tini) = 1, ((D@@4)(a))(tini) = 0.1e-5}

p2 := dsolve(sys2, type = numeric, abserr = 1.*10^(-8), relerr = 1.*10^(-8), range = tini .. tfin)

figa := odeplot(p2, [t, a(t)])

 

For my differential equations class we have to input the following problem into Maple, I've never used maple before and I was wondering if someone who is experienced with maple could help me out with the code to put into Maple. Thanks I appreciate it!

 

Using the Maple program, Write the procedure RungeKutta(f, a, b, aplpha, n) which use the improved Euler's method to approximate the solution of the initial-value problem y'=f(t,y), a\leqt\leqb, y(a)= alpha at (n+1) equally spaced numbers in the interval [a,b]

The input parameters are as follow:

f is the name of the function f(t,y);

a and b are the end points of the interval of integration;

alpha is the initial condition.

The output: array w is the approximation of y at the (n+1) values of t.

Hi, I'm currently studying the dynamics of a system of ODEs and I would like to plot a bifurcation diagram using Maple.

 

The system is:

diff(x(t), t) = -y(t)-z(t)

 diff(y(t), t) = x(t)+a*y(t)

diff(z(t), t) = b+x(t)*z(t)-c*z(t).

 

Can anyone help me with a procedure to output a bifurcation diagram for the system?
Thanks.

Dear Users,

Recently, I started using Maple2017. In Maple 18, I have used the following commands for import/export and it worked fine.

 

Digits := 50;

Rhs:= ImportVector("/home/15_degree_3izto1_fixed/Vec.txt", source = delimited);

MatA:=ImportMatrix("/home/15_degree_3izto1_fixed/Mat.txt", source = delimited) ;

Note : Vec.txt contains float with 50 digits, and Mat.txt contains algebraic equation eg. 123456716798271394816*y+173974937*10^(-16)

 

While maple 18 used to import all the informations with 50 digits of accuracy, Maple2017 only import float[8] ?It only imports first 20 digits and so on..? What has changed in 2017?

Thanks and regards,

 


 

Suppose I want to do some manipulations on this inequality:

 

(1/2)*k*n <= m

(1/2)*k*n <= m

(1)

I know I can use the map() function to move terms around, like so:

 

map(proc (x) options operator, arrow; 2*x end proc, (1/2)*k*n <= m)

k*n <= 2*m

(2)

map(proc (x) options operator, arrow; x/n end proc, k*n <= 2*m)

k <= 2*m/n

(3)

map(proc (x) options operator, arrow; x/m end proc, k <= 2*m/n)

k/m <= 2/n

(4)

But this method fails if I want to multiply both sides of the inequality by a negative number, for example:

map(proc (x) options operator, arrow; -x end proc, k/m <= 2/n)

-k/m <= -2/n``

(5)

How do I get Maple to switch the inequality sign to ≥ ?


 

Download tmp.mw

Say I have an expression like

diff(f(x),x)*cos(f(x));

and I want to evaluate it where the function f(x)=0 (without a priori knowing f(x)). Since cos(0)=1, I expect the answer to be simply diff(f(x),x); in general this won't be identically zero. However, if I try

eval(%,f(x)=0);

it replaces f(x) with zero everywhere, including in the derivative (as expected from the documentation) and returns 0.

So, my question: is there a way to evaluate an expression at a known value of a function (f(x)=0) without knowing the function?

It seems using convert/D manages to solve it, but I imagine there's a better way to do this. I've tried using RootOf(f(x)), but can't seem to make that work.

5 6 7 8 9 10 11 Last Page 7 of 30