Maple 2023 Questions and Posts

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

Hi,

is there fix for the following quirk in the Maple 2023 editor:

randomly (hours, days) some characters change their appearance like p.e. the = sign becomes d-bold or sigma becomes s-bold. I have never experienced this in previous versions.

Thanks in advance.

Hi, maybe someone knows how to fix this:

"Error, (in assuming) when calling 'assume'. Received: 'question.mw'"

I am attaching the corresponding maple file. I've never met such an error message, and unfortunately the Maplesoft help does not contain any information about such an issue : 

restart; (2^(1/2+1/2+1)*GAMMA(n+1/2+1)*GAMMA(n+1/2+1))/((2*n+1/2+1/2+1)*GAMMA(n+1/2+1/2+1)*factorial(n))

4*GAMMA(n+3/2)^2/((2*n+2)*GAMMA(n+2)*factorial(n))

(1)

JacobiP(n, 1/2, 1/2, 1)

JacobiP(n, 1/2, 1/2, 1)

(2)

evalf(JacobiP(3, 1/2, 1/2, 1))

2.187500000

(3)

f := proc (n, x) options operator, arrow; (1/4)*JacobiP(n, 1/2, 1/2, x)*4^(1/2)/(GAMMA(n+3/2)^2/((2*n+2)*GAMMA(n+2)*factorial(n)))^(1/2) end proc

proc (n, x) options operator, arrow; (1/4)*JacobiP(n, 1/2, 1/2, x)*4^(1/2)/(GAMMA(n+3/2)^2/((2*n+2)*GAMMA(n+2)*factorial(n)))^(1/2) end proc

(4)

int(f(1, x)^2*sqrt(-x^2+1), x = -1 .. 1)

1

(5)

int(f(2, x)^2*sqrt(-x^2+1), x = -1 .. 1)

1

(6)

int(f(3, x)^2*sqrt(-x^2+1), x = -1 .. 1)

1

(7)

c := proc (n) options operator, arrow; int(sqrt(1+x)*f(n, x)*sqrt(-x^2+1), x = -1 .. 0)+int(f(n, x)*sqrt(-x^2+1), x = 0 .. 1) end proc

proc (n) options operator, arrow; int(sqrt(1+x)*f(n, x)*sqrt(-x^2+1), x = -1 .. 0)+int(f(n, x)*sqrt(-x^2+1), x = 0 .. 1) end proc

(8)

c(12)

(2/450225)*(-208+679*2^(1/2))/Pi^(1/2)

(9)

S := proc (N, x) options operator, arrow; evalf(sum(c(n)*f(n, x), n = 0 .. N)) end proc

proc (N, x) options operator, arrow; evalf(sum(c(n)*f(n, x), n = 0 .. N)) end proc

(10)

S(1, 1)

Error, (in assuming) when calling 'assume'. Received: 'contradictory assumptions'

 

NULL

Download question.mw

https://www.maplesoft.com/support/help/errors/view.aspx?path=Error,%20(in%20assuming)%20when%20calling%20%27assume%27.%20Received%3A%20%27contradictory%20assumptions%27

Many thanks in advance

> ode_sys:=2*diff(x(t),t$2) + 6*x(t) - 2*y(t) = 0, diff(y(t),t$2) + 2*y(t) - 2*x(t) = 0:
> lsol:=inttrans:-laplace({ode_sys},t,s)

The displayed output has an unresolved  "=  inttrans/laplace`(0, t, s)" on the end.

> lsol

Does not. Why?

Dear power users, I am still struggling with relative simple tasks and do hope that some of you can help me in the right direction. Solving an ODE is straightforward in Maple. But how do you solve an ODE with multiple inputs, as shown in the attached worksheet. I would appreciate any help with respect to my question. I would also like to wish all of you a good ending of 2023 and a brilliant start in 2024.

MapleprimesODE_Question.mw

Hi, will happy to find out how can I get the proper answer for the expression following:

abs(exp(I*k*x))?

I expected to get 1

Bu actually I've got

e^R(Ikx)

Futhermore, Maple also doesn't calculate any absolute values of complex expressions, only adds the brackets.

For example, I would like to draw the following figure in Maple.

 

(The above figure is taken from MatLab's documentation.) 
Here are these four graphics objects: 

use plottools, ColorTools in
	l0, l1 := line~([<1 | 0>, <1 | 1>], [<6 | 5>, <6 | 6>], 'color' =~ Color~(["#0072BD", "#D95319"]))[];
	r0, r1 := rectangle~([[2, 0], [4, 0]], [[3, 6], [5, 6]], 'color' =~ Color~([[.6, .7, .9], [.95, .7, .6]]))[]
end:

However, either 

`plots/display`([r1, l1, l0, r0], 'axes' = "boxed", 'size' = ["default", "golden"], 'style' = "patchnogrid")

or 

`plots/display`([r0, l0, l1, r1], 'axes' = "boxed", 'size' = ["default", "golden"], 'style' = "patchnogrid")

outputs the same graphical image where the lines are always rendered on top of each rectangles instead of the other way around.

plots:-display([plottools:-rectangle([2, 0], [3, 6], 'color' = ColorTools:-Color([.6, .7, .9])), plottools:-line([1, 0], [6, 5], 'color' = ColorTools:-Color( 

So how to superimpose the right rectangle over the two lines? To put it differently, how to handle the graphics hierarchy? I have read some similar questions like Order in plots:-display - MaplePrimes, yet I cannot find any workarounds. 

Note that in my opinion, the result should comprise two unbroken line segments rather than four subordinate line segments! 

is it possible to find why Maple fails to solve these two equations in two unknowns? Has this always been the case? I do not have older versions of Maple to check. The trace shows that it found solution but then itg says no solution was found. This is very strange.

17020

interface(version)

`Standard Worksheet Interface, Maple 2023.2, Windows 10, November 24 2023 Build ID 1762575`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1622. The version installed in this computer is 1618 created 2023, November 29, 17:28 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2023\Physics Updates\lib\`

restart;

17020

sol:=1/4*exp(-t) * (c2*(-1+exp(4*t)) + c1*(3+exp(4*t))):
expand(simplify(sol));

-(1/4)*c2/exp(t)+(1/4)*(exp(t))^3*c2+(3/4)*c1/exp(t)+(1/4)*(exp(t))^3*c1

eq1:=-3=eval(sol,t=4):
expand(simplify(eq1));

-3 = (1/4)*c1*exp(12)+(1/4)*c2*exp(12)+(3/4)*exp(-4)*c1-(1/4)*exp(-4)*c2

eq1:=-17=eval(diff(sol,t),t=4);
expand(simplify(eq1));

-17 = -(1/4)*exp(-4)*(c2*(-1+exp(16))+c1*(3+exp(16)))+(1/4)*exp(-4)*(4*c2*exp(16)+4*c1*exp(16))

-17 = (1/4)*exp(-4)*c2+(3/4)*c2*exp(12)-(3/4)*exp(-4)*c1+(3/4)*c1*exp(12)

infolevel[solve]:=5;
solve([eq1,eq2],[c1,c2])

5

Main: Entering solver with 2 equations in 2 variables

Main: attempting to solve as a linear system

Linear: solving 2 linear equations

Algebraic: # equations is: 2

Main: Linear solver successful. Exiting solver returning 1 solution

solve: Warning: no solutions found

[]

Download unable_to_solve_2_equations_dec_26_2023.mw

For reference this is the solution given by Mathematica

 

Maple does not give solution to this first order ode with IC, if asked to do it implicit. It only solves it explicit. 

ode := diff(y(x), x) - 2*(2*y(x) - x)/(x + y(x)) = 0;
ic:=y(0)=2;
dsolve([ode,ic],'implicit'); #maple gives no solution when implicit!

Then I asked Maple for an implicit solution but with no IC. Then solved for the constant of integration myself, and plugged this back in the solution. But odetest now says the initial conditions do not verify. 

Here are the steps I did to solve for the constant of integration. I do not see any error I made. Does any one see where my error is and why odetest does not verify the solution for IC?

This first order ode has unique solution. Here is my worksheet.
 

35220

restart;

35220

ode := diff(y(x), x) - 2*(2*y(x) - x)/(x + y(x)) = 0;
ic:=y(0)=2;
dsolve([ode,ic],'implicit'); #maple gives no solution when implicit!

diff(y(x), x)-2*(2*y(x)-x)/(x+y(x)) = 0

y(0) = 2

#lets now try finding the constant of integration ourself
sol:=dsolve(ode,'implicit')

2*ln(-(-y(x)+x)/x)-3*ln(-(-y(x)+2*x)/x)-ln(x)-c__1 = 0

#setup equation and plugin the IC. Raise both sides to exp. RHS becomes 1
eq:=exp(lhs(sol))=1;

exp(2*ln(-(-y(x)+x)/x)-3*ln(-(-y(x)+2*x)/x)-ln(x)-c__1) = 1

simplify(eq,exp);

(y(x)-x)^2*exp(-c__1)/(y(x)-2*x)^3 = 1

#plugin in y=2 at x=0
eval(%,[y(x)=2,x=0]);

(1/2)*exp(-c__1) = 1

#solve for constant of integration
solve(%,c__1)

-ln(2)

#subtitute back in the solution
sol:=eval(sol,c__1=%);

2*ln(-(-y(x)+x)/x)-3*ln(-(-y(x)+2*x)/x)-ln(x)+ln(2) = 0

#verify. Why it failed check on IC?? Notice it is not [0,0].
odetest(sol,[ode,ic])

[0, 2]

 


 

Download why_fails_to_verify.mw

 

I bought Maple 2023 student version. (I am student) and installed it on windows 10.

I wanted to try it on Linux to see if runs better. So Installed the Linux version. When I tried to activate using the same purchase code I got, I get error that I have no more activations or I exceeded the number of activations.

But I installed Maple 2023 only one time, on windows which is my main OS. Never installed it anywhere else before.

Is one really only allowed one installation?

How would then I can try Maple on Linux but keep my Maple on windows until I decide if Maple works better on Linux or not?

Hello everyone,

Please, I need your help. I want to plot the spectrum of a dataset in #Problem 1.

In #Problem 2 If it is possible, how can I convert that function from the time domain to the frequency domain?

Thank you

Fourier_transform.mw

I think the GF function, input, accepts out-of-range inputs.

From ?GF: The G:-input and G:-output commands convert from an integer in the range 
  "0 .. p^k - 1" to the corresponding polynomial and back

GF_strange.mw

The first GF was from a typo. I think it should have produced an error message, according to help.
If I understand correctly, GF(7,1) should only have 7 members.
The second GF is to allow the input 28856.

Tom Dean

This first order ode is quadrature with initial conditions. By existence theorem it has solution and is unique on some interval that includes the initial conditions (because f and f_y  are continuous on the initial condition).

But for some reason Maple can't find the solution, unless one adds 'implicit' option. Why is that? I thought that Maple will automatically return implicit solution if can't find explicit solution. 

So does one then needs to try with implicit solution again if no solution is returned? I am basically asking if this is expected behavior of dsolve.

Below is worksheet also with the solution that Maple verifies is valid and satisfies the ode and also initial conditions.

ode:=diff(y(x), x) = sin(y(x)) + 1;
ic:=y(0)=Pi;
sol:=dsolve([ode,ic]);

20212

interface(version);

`Standard Worksheet Interface, Maple 2023.2, Windows 10, November 24 2023 Build ID 1762575`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1618 and is the same as the version installed in this computer, created 2023, November 29, 17:28 hours Pacific Time.`

restart;

28544

ode:=diff(y(x), x) = sin(y(x)) + 1;
ic:=y(0)=Pi;
sol:=dsolve([ode,ic]);

diff(y(x), x) = sin(y(x))+1

y(0) = Pi

maple_sol:=dsolve([ode,ic],'implicit');
odetest(maple_sol,[ode,ic])

(2+x*tan((1/2)*y(x))+x)/(tan((1/2)*y(x))+1) = 0

[0, 0]

maple_sol:=dsolve([ode,ic],y(x),'explicit');

mysol:=y(x)=2*arccos(-x/(sqrt(4+4*x+2*x^2)));
odetest(mysol,[ode,ic]) assuming x>=0

y(x) = 2*Pi-2*arccos(x/(2*x^2+4*x+4)^(1/2))

[0, 0]

 


 

Download unable_to_dsolve_quadature_dec_22_2023.mw

 

Why does

restart;
eq:=Z^2=y/x;
solve(eq,Z)

give

I never told maple that y>=0 and x>=0 ?   I was expecting what we will do by hand. which is

Note that sqrt(x*y) is same as sqrt(x)*sqrt(y) only when y and x are not negative. 

Is there an option to make Maple not do this and give same result as above? I tried PDEtools:-Solve and it gives same solution as solve.

Maple 2023.2.1 on windows 10

This worksheet loses contact with the kernel. I asked Tech Support. How do I report a bug?

Hung.mw

The last line was a typo, but, it should not lose contact with the kernel...

After executing the print statement,

> 1

produces the error message.

Tom Dean

For example, here are two equations containing trigonometric functions (Note that they do not form one system!): 

restart; # There are more examples, yet for the sake of briefness, they are omitted here. 
eqn__0 := cos(x)*cos(y)*cos(x + y) = 2*(sin(x)*sin(y) - 1)*2*(sin(x)*sin(x + y) - 1)*2*(sin(y)*sin(x + y) - 1):
eqn__1 := (cos(x + y) - (cos(x) + cos(y)) + 1)**2 + 2*cos(x)*cos(y)*cos(x + y) = 0:

Unfortunately, none of 

(* Tag0 *) RealDomain:-solve(eqn__0, {y, x}):
(* Tag1 *) solve(eqn__0, {y, x}) assuming y + x >= 0, (y, x) <=~ Pi:
(* Tag2 *) RealDomain:-solve(eqn__1, {y, x}):
(* Tag3 *) solve(eqn__1, {y, x}) assuming y + x >= 0, (y, x) <=~ Pi:

outputs concise solutions.
Using `plot3d`, it is easy to check that when "And(y + x >= 0, (y, x) <=~ Pi)", “{y = Pi/2, x = 0}, {y = Pi/3, x = Pi/3}, {y = 0, x = Pi/2}, {y = Pi/2, x = Pi/2}” is both the only solution to "eqn__0" and the only solution to "eqn__1". But how to get Maple to do so without manual intervention?

Edit. The main purpose is to automatically find the generic solutions to each of the two equations (Tag0 and Tag2) (separately). Now that the cosine and sine functions are both periodic with period 2π and both (lhs - rhs)(eqn__0) and (lhs - rhs)(eqn__1) are even symmetric, it is enough to focus only on the region y + x ≥ 0 ∧ (y, x) ≤~ Pi. So, in theory, a second-best workaround should be Tag1 and Tag3. However, why is Maple still unable to find the four exact solutions above?

First 7 8 9 10 11 12 13 Last Page 9 of 30