## A simplification / reduction question...

I know this question has been asked time and time again. Starting of with the expr . That is the end goal I want to achieve.  How would I reduce the expansion to get it into 1-f(x,y,z)/g(x,y,z) format?. I have tried all sorts of approaches.

 > restart
 > #
 > expr:=1 - (x__1*x__2 + y__1*y__2 - z__1*z__2)^2/((x__1^2 + y__1^2 - z__1^2)*(x__2^2 + y__2^2 - z__2^2))
 (1)
 > normal( (1) );
 (2)
 > simplify( (2) );
 (3)
 (4)
 > Test:=combine(%)
 (5)
 >
 > n:={op(numer(Test))}
 (6)
 > d:={op(expand(denom(Test)))}
 (7)
 > d subset n
 (8)
 > d intersect n
 (9)
 (10)
 > factor( (10) );
 (11)
 > n minus d
 (12)
 >

## Maple Conference 2024 - Registration is now open

by: Maple , Maple Learn

We are pleased to announce that the registration for the Maple Conference 2024 is now open.

Like the last few years, this year’s conference will be a free virtual event. Please visit the conference page for more information on how to register.

This year we are offering a number of new sessions, including more product training options and an Audience Choice session.
You can find an overview of the program on the Sessions page. Those who register before September 10th, 2024 will have a chance to vote for the topics they want to learn more about during the Audience Choice session.

We hope to see you there!

## Result to be square root...

Good afternoon, please I have the following question to see if someone can help me.

I am calculating an integral with a root and when Maple gives me the result it does so in power. I want the result to be given in square root, both this integral and others that I am going to solve.

## Maple 2024.1 crashes with "RandomGraph"...

Whenever I call RandomGraph(20,200), Maple crashes both on the laptop and on the PC: any suggestion?

 >
 >
 (1)
 >

## Wrong Latex generated when using _C1 for constant...

This is some serious problem in Latex in Maple 2024.1

I went back to using _C1, _C2 for my own constants of integration.

But I want to get the nice latex for c__1,c__2.

So to do that, my understanding is that I just need to call Maple's dsolve after restart on some random ode in order to set c__1,c__2 for display only and also for latex.

This below seems to confirm this.  But now the latex generated is all wrong and messed up on some places.

My question is: I want to use use _C1,_C2 (i.e. the traditional constants) in my own code I write which generates solution to an ode, but for Latex, I'd like these to come out as c__1,c__2 since they look nicer.

What is the correct way to do this? What Am I doing wrong here? I do not see it.

 > interface(version);

 > #EXAMPLE showing using _C1 for input and latex. All works OK restart;
 > sol:=y(x) = x+_C1/x^2;

 > #correct latex. No problem compiling, but not nice looking _C1 latex(sol)

y \! \left(x \right) = x +\frac{\textit{\_C1}}{x^{2}}

 > #Example showing what happens when making call to dsolve initially restart;
 > dsolve(diff(y(x),x$2)=0); #this call is used to just activate display of nicer constants  > sol:=y(x) = x+_C1/x^2;  > #bad latex, gives error when compiling with texlive latex(sol) y \! \left(x \right) = x +\frac{c}{_} Download latex_problem_maple_2024_july_18_2024.mw And to confirm this is new problem in Maple 2024, I run the same exact worksheet now in Maple 2023.2, and there it works correctly. i.e. Latex generated is correct in both cases. Here is the Maple 2023.2 worksheet, you can see below the difference in Latex.  > interface(version);  > #EXAMPLE showing using _C1 for input and latex. All works OK restart;  > sol:=y(x) = x+_C1/x^2;  > #correct latex. No problem compiling, but not nice looking _C1 latex(sol) y \! \left(x \right) = x +\frac{\textit{\_C1}}{x^{2}}  > #Example showing what happens when making call to dsolve initially restart;  > dsolve(diff(y(x),x$2)=0); #this call is used to just activate display of nicer constants

 > sol:=y(x) = x+_C1/x^2;

 > #good Latex now in Maple 2023.2. latex(sol)

y \! \left(x \right) = x +\frac{c_{1}}{x^{2}}

If it makes any difference to Maple, I am using the typesetting EXTENDED now for everything. But I do not think Latex should care about this, but thought to mention it just in case.

## How to retrieve the coefficients of a transcedenta...

Hello

Consider,  as an example,  the following (simple) transcendental equation.

alpha*((epsilon-1)*x+y-3*x*z-epsilon/3*x^3+b*sin(w)+3)

How to retrieve the coefficients and the terms considering that the unknowns are x,y,z and w?   Something like [x,y,x*z,x^3,sin(w),1] and their coefficients.

many thanks

## dsolve does not return solution unless given impli...

I have thought before that Maple's dsolve will try to return implicit solution automatically if unable to find explicit one or for some  other reasons it prefers implicit.

But In this ode, we see Maple returns no solution at all for this first order quadrature ode, even though it can find solution when given implicit option.

Is this a correct behaviour? Should it not have returned this solution automatically?

 > interface(version);

 > Physics:-Version();

 > restart;
 > ode:=diff(y(x),x)=sin(y(x)); IC:=y(a)=b;

 > maple_sol:=dsolve([ode,IC]);

 > maple_sol:=dsolve([ode,IC],explicit);

 > maple_sol:=dsolve([ode,IC],implicit);

## partial derivative of a piecewise function...

I want to obtain the partial derivative of a piecewise function. How it is possible to calculate  the derivative in (0,0) with diff?

I should get, as answer,  a new piecewise function

with(student);
f := (x, y) -> piecewise((x, y) = (0, 0), 0, (x^3*y - x*y^3)/(y^2 + x^2));
f := proc (x, y) options operator, arrow; piecewise((x, y) =

(0, 0), 0, (x^3*y-x*y^3)/(y^2+x^2)) end proc

fx := (x, y) -> diff(f(x, y), x);
fx := proc (x, y) options operator, arrow; diff(f(x, y), x) end

proc

fx(0, 0);
Error, (in fx) invalid input: diff received 0, which is not valid for its 2nd argument

but i obtain an error

anna rita

## How do I compute a transformation matrix in comput...

Hi

I know that (G, A)=Basis(F,output=extended) computes reduced Groebner basis for polynomial ideal F, while  A is a list of lists.  If A is converted to a matrix, we get G=FA. Is there a command to compute matrix B such that F=GB?

Thank you.

This is a simplified case from a colleague who could not get has to work.

While this

I/sqrt(a);
has(%, sqrt(a));
I
------
(1/2)
a

false



is a technically correct output from Maple, false is mathematically an incorrect statement (IMO).

I think new users cannot find the explanation for that on their own because in other instances the output is true

has(I/(1 - sqrt(a)), sqrt(a))

true



Are there better ways than

I/sqrt(a);
has(%, sqrt(a))or has(%,1/sqrt(a));
I
------
(1/2)
a

true



Its a bit complicated to include allways the inverse of an expression to capture all instances of an expression.

Should has do this an give a warning that also the inverse is present?

## How do I solve the error : "could not store", in a...

Hello,

I'm trying to perform a nonlinear curve-fit on a data(named Data in the code) in Maple, but I get an error :

Error, (in Statistics:-NonlinearFit) could not store .476190476190476164*(4.41000000000000014*(4410./[2.08075582127286]^(2/3)+952.380952380952294*[2.08075582127286]^(1/3)+1000.)/[2.08075582127286]^(5/3)-19448.1000000000022/[2.08075582127286]^(7/3)+[1040.37791063642999]-500.-166.666666666666657*(8.82000000000000028/[2.08075582127286]^(2/3)+1.90476190476190466*[2.08075582127286]^(1/3))/[2.08075582127286]-166.666666666666657*(16.8000000000000007/[2.08075582127286]^(1/3)+.907029478458049820*[2.08075582127286]^(2/3))/[2.08075582127286])*[2.08075582127286]-.500000000000000000 in a floating-point rtable

I suspect there's a problem associated with the variable "r". I am trying to find J by solving the equation p__3 = 0. Then J(stored in "r") is used in P__eng1 to perform the curve-fit operation. I have tried using fsolve, and NLPSolve but they ended up in errors. I read the documents but I was unable to solve the problem.

I'm new to Maple and I'd appreciate any comment that helps me solve p__3=0 and to use the J in P__eng1. I have also attached the code.test.mw

Code and data : mapp.zip

Thanks,

## Maple 2024.1 locks up completely when using timeli...

I called dsolve with timelimit on this ode.  All of Maple instantly locks up.

I do not mean the worksheet, but everything. I have each worksheet using its own engine,. Not able to open new worksheet, nothing clicks. The whole front end locks up. Can't click on anything.

Killing every mserver.exe does not even resolve this. I had to terminate all of Maple from the task manager. The strange thing, is that looking at task manager I see mserver.exe doing nothing. zero CPU. Only the front end process is at high CPU (the one with the Java icon).  It looks like the Java frontend is locked up for some reason.

Do others see the same thing? does this happen on the mac also? Please make sure to save all your work before trying to run this on your PC.

Maple 2024.1 on windows 10. This is first order Riccati ode.

 > interface(version);

 > Physics:-Version();

 > ode:=(a2*x^2+b2*x+c2)*diff(y(x),x)=y(x)^2+(a1*x+b1)*y(x)+a0*x^2+b0*x+c0;

 > #WARNING. This will freeze all of Maple. timelimit(30,dsolve(ode));

These are GUI options on my end.

UPDATE 1

in Maple 2023.2 also on windows 10,  there is no lock up at all. same code. The solution to the ode is very large. I tried using both typesetting level  to EXTENDED  and  typesetting level MAPLE STANDARD and no hang.

I wonder if this has something to do with why Maple 2024.1 locks up? But I have not changed anything in my end. I made no change in options or anything else. same PC, same graphics card.

UPDATE 2

Found the BUG!!

In Maple 2024.1, if I change the display option typesetting level  to EXTENDED, the front end do not hang.

If I change the display typesetting level MAPLE STANDARD, the ftont end hangs.

But why??

 > interface(version);

 > Physics:-Version();

 > ode:=(a2*x^2+b2*x+c2)*diff(y(x),x)=y(x)^2+(a1*x+b1)*y(x)+a0*x^2+b0*x+c0;

 > interface(typesetting=extended):
 > timelimit(30,dsolve(ode));

 > interface(typesetting=standard):
 > #WARNING, this will hang MAPLE now. WHY?? timelimit(30,dsolve(ode));

ps. Reported to Maplesoft support. July 17, 2024. Hopefully this will be fixed in Maple 2024.2

## finding loop for a function when parameter are cha...

i am looking for all outcome of this function how i can do it



phi := (\p_1,p__2, q__1, q__2, xi) -> p__1*exp(q__1*xi) - p__2*exp(q__2*xi);
for p[1 ] in [0,1,-1,I,-I] do ;
for p[2 ] in [0,1,-1,I,-I] do ;

for q[1 ] in [0,1,-1,I,-I] do ;
for q[2 ] in [0,1,-1,I,-I] do ;
result1 := evalf(phi(\p_1,p__2, q__1, q__2, xi));
print('result1);


my code is not correct and not run in fact but it is my try

## find arbitrary coieficent with condition ...

i am looking for special solution i want give the maple equation and give what answer i want with condition for example i just want thus solution which is A_0,A_1,B_1 not equal to zero and other parameter like (w,lambda,k) are free just this three not equal to zero.

restart
with(SolveTools);
with(LinearAlgebra);
eq12 := -alpha*k^2*A[0] - alpha*k^2*A[1] - alpha*k^2*B[1] + A[0]^3*beta[4] + (3*A[0]^2)*A[1]*beta[4] + (3*A[0]^2)*B[1]*beta[4] + (3*A[0])*A[1]^2*beta[4] + (6*A[0])*A[1]*B[1]*beta[4] + (3*A[0])*B[1]^2*beta[4] + A[1]^3*beta[4] + (3*A[1]^2)*B[1]*beta[4] + (3*A[1])*B[1]^2*beta[4] + B[1]^3*beta[4] + A[0]^2*beta[3] + (2*A[0])*A[1]*beta[3] + (2*A[0])*B[1]*beta[3] + A[1]^2*beta[3] + (2*A[1])*B[1]*beta[3] + B[1]^2*beta[3] - w*A[0] - w*A[1] - w*B[1] = 0

eq10 := (2*alpha)*k^2*A[1] - (2*alpha)*k^2*B[1] - (8*alpha)*lambda^2*A[1] + (8*alpha)*lambda^2*B[1] - (8*gamma)*lambda^2*A[1] + (8*gamma)*lambda^2*B[1] - (6*A[0]^2)*A[1]*beta[4] + (6*A[0]^2)*B[1]*beta[4] - (12*A[0])*A[1]^2*beta[4] + (12*A[0])*B[1]^2*beta[4] - (6*A[1]^3)*beta[4] - (6*A[1]^2)*B[1]*beta[4] + (6*A[1])*B[1]^2*beta[4] + (6*B[1]^3)*beta[4] - (4*A[0])*A[1]*beta[3] + (4*A[0])*B[1]*beta[3] - (4*A[1]^2)*beta[3] + (4*B[1]^2)*beta[3] + (2*w)*A[1] - (2*w)*B[1] = 0

eq8 := -(3*A[1]^2)*B[1]*beta[4] - (3*A[1])*B[1]^2*beta[4] - (2*A[0])*A[1]*beta[3] - (2*A[0])*B[1]*beta[3] + w*A[1] + w*B[1] - (3*A[0]^2)*B[1]*beta[4] + alpha*k^2*A[1] + alpha*k^2*B[1] - (3*A[0]^2)*A[1]*beta[4] + (3*alpha)*k^2*A[0] + (32*alpha)*lambda^2*A[1] + (32*alpha)*lambda^2*B[1] + (32*gamma)*lambda^2*A[1] + (32*gamma)*lambda^2*B[1] - (3*A[0]^3)*beta[4] + (15*A[0])*A[1]^2*beta[4] - (18*A[0])*A[1]*B[1]*beta[4] + (15*A[0])*B[1]^2*beta[4] + (15*A[1]^3)*beta[4] + (15*B[1]^3)*beta[4] - (3*A[0]^2)*beta[3] + (5*A[1]^2)*beta[3] - (6*A[1])*B[1]*beta[3] + (5*B[1]^2)*beta[3] + (3*w)*A[0] = 0

eq6 := -(4*alpha)*k^2*A[1] + (4*alpha)*k^2*B[1] - (48*alpha)*lambda^2*A[1] + (48*alpha)*lambda^2*B[1] - (48*gamma)*lambda^2*A[1] + (48*gamma)*lambda^2*B[1] + (12*A[0]^2)*A[1]*beta[4] - (12*A[0]^2)*B[1]*beta[4] - (20*A[1]^3)*beta[4] + (12*A[1]^2)*B[1]*beta[4] - (12*A[1])*B[1]^2*beta[4] + (20*B[1]^3)*beta[4] + (8*A[0])*A[1]*beta[3] - (8*A[0])*B[1]*beta[3] - (4*w)*A[1] + (4*w)*B[1] = 0

eq4 := -(3*A[1]^2)*B[1]*beta[4] - (3*A[1])*B[1]^2*beta[4] - (2*A[0])*A[1]*beta[3] - (2*A[0])*B[1]*beta[3] + w*A[1] + w*B[1] - (3*A[0]^2)*B[1]*beta[4] + alpha*k^2*A[1] + alpha*k^2*B[1] - (3*A[0]^2)*A[1]*beta[4] - (3*alpha)*k^2*A[0] + (32*alpha)*lambda^2*A[1] + (32*alpha)*lambda^2*B[1] + (32*gamma)*lambda^2*A[1] + (32*gamma)*lambda^2*B[1] + (3*A[0]^3)*beta[4] - (15*A[0])*A[1]^2*beta[4] + (18*A[0])*A[1]*B[1]*beta[4] - (15*A[0])*B[1]^2*beta[4] + (15*A[1]^3)*beta[4] + (15*B[1]^3)*beta[4] + (3*A[0]^2)*beta[3] - (5*A[1]^2)*beta[3] + (6*A[1])*B[1]*beta[3] - (5*B[1]^2)*beta[3] - (3*w)*A[0] = 0

eq2 := (2*alpha)*k^2*A[1] - (2*alpha)*k^2*B[1] - (8*alpha)*lambda^2*A[1] + (8*alpha)*lambda^2*B[1] - (8*gamma)*lambda^2*A[1] + (8*gamma)*lambda^2*B[1] - (6*A[0]^2)*A[1]*beta[4] + (6*A[0]^2)*B[1]*beta[4] + (12*A[0])*A[1]^2*beta[4] - (12*A[0])*B[1]^2*beta[4] - (6*A[1]^3)*beta[4] - (6*A[1]^2)*B[1]*beta[4] + (6*A[1])*B[1]^2*beta[4] + (6*B[1]^3)*beta[4] - (4*A[0])*A[1]*beta[3] + (4*A[0])*B[1]*beta[3] + (4*A[1]^2)*beta[3] - (4*B[1]^2)*beta[3] + (2*w)*A[1] - (2*w)*B[1] = 0

eq0 := alpha*k^2*A[0] - alpha*k^2*A[1] - alpha*k^2*B[1] - A[0]^3*beta[4] + (3*A[0]^2)*A[1]*beta[4] + (3*A[0]^2)*B[1]*beta[4] - (3*A[0])*A[1]^2*beta[4] - (6*A[0])*A[1]*B[1]*beta[4] - (3*A[0])*B[1]^2*beta[4] + A[1]^3*beta[4] + (3*A[1]^2)*B[1]*beta[4] + (3*A[1])*B[1]^2*beta[4] + B[1]^3*beta[4] - A[0]^2*beta[3] + (2*A[0])*A[1]*beta[3] + (2*A[0])*B[1]*beta[3] - A[1]^2*beta[3] - (2*A[1])*B[1]*beta[3] - B[1]^2*beta[3] + w*A[0] - w*A[1] - w*B[1] = 0

COEFFS := solve({eq0, eq10, eq12, eq2, eq4, eq6, eq8}, {k, lambda, w, A[0], A[1], B[1]})


## How to correct the code for Delay Differential Equ...

Good day, all.

Please I want to solve the following delay differential equation:

ODE := diff(y(t), t\$2) = (2*(1-y(t-1)^2))*(diff(y(t), t))-y(t)

ics := y(0) = 1, (D(y))(0) = 0

using the following codes but there is an error. Please kindly help to modify the codes.

restart;
Digits:=30:

f:=proc(n)
2*(1-(y[n-1])^2)*delta[n]+y[n]:
end proc:

g:=proc(n)
-4*y[n-1]*delta[n-1]+2*(1-(y[n-1])^2)*f(n)-delta[n]:
end proc:

e1:=y[n+2] = -y[n]+2*y[n+1]+(1/120)*h^2*(-3*h*g(n+2)+3*g(n)*h+16*f(n+2)+16*f(n)+88*f(n+1)):
e2:=h*delta[n] = -y[n]+y[n+1]-(1/1680)*h^2*(-128*h*g(n+1)-11*h*g(n+2)+59*g(n)*h+40*f(n+2)+520*f(n)+280*f(n+1)):
e3:=h*delta[n+1] = -y[n]+y[n+1]+(1/1680)*h^2*(-152*h*g(n+1)-10*h*g(n+2)+32*g(n)*h+37*f(n+2)+187*f(n)+616*f(n+1)):
e4:=h*delta[n+2] = -y[n]+y[n+1]+(1/1680)*h^2*(128*h*g(n+1)-101*h*g(n+2)+53*g(n)*h+744*f(n+2)+264*f(n)+1512*f(n+1)):

inx:=0:
ind:=0:
iny:=1:
h:=1/2:
n:=1:
omega:=10:
u:=omega*h:
N:=solve(h*p = 10, p):

err := Vector(round(N)):
exy_lst := Vector(round(N)):
numerical_y1:=Vector(round(N)):

c:=1:
for j from 0 to 2 do
t[j]:=inx+j*h:
end do:

vars:=y[n+1],y[n+2],delta[n+1],delta[n+2]:

step := [seq](eval(x, x=c*h), c=1..N):
printf("%6s%45s%45s\n",
"h","Num.y","Num.z");
#eval(<vars>, solve({e||(1..4)},{vars}));

st := time():
for k from 1 to N/2 do

par1:=x[0]=t[0],x[1]=t[1],x[2]=t[2]:
par2:=y[n]=iny,delta[n]=ind:
res:=eval(<vars>, fsolve(eval({e||(1..4)},[par1,par2]), {vars}));

for i from 1 to 2 do
printf("%6.5f%45.30f%45.30f\n",
h*c,res[i],res[i+2]):

numerical_y1[c] := res[i]:

c:=c+1:
end do:
iny:=res[2]:
ind:=res[4]:
inx:=t[2]:
for j from 0 to 2 do
t[j]:=inx + j*h:
end do:
end do:
v:=time() - st;
v/4;
printf("Maximum error is %.13g\n", max(err));
NFE=evalf((N/4*3)+1);
#get array of numerical and exact solutions for y1
numerical_array_y1 := [seq(numerical_y1[i], i = 1 .. N)]:
#exact_array_y1 := [seq(exy[i], i = 1 .. N)]:

#get array of time steps
time_t := [seq](step[i], i = 1 .. N):

#display graphs for y1
with(plots):
numerical_plot_y1 := plot(time_t, numerical_array_y1, style = [point], symbol = [asterisk],
color = [blue,blue],symbolsize = 20, legend = ["TFIBF"]);

Thank you, and best regards.

 3 4 5 6 7 8 9 Last Page 5 of 2131
﻿