dharr

Dr. David Harrington

9269 Reputation

22 Badges

21 years, 320 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are answers submitted by dharr

Here's a hack, by substituting into the MathML

c:=Unit('mm');
subs("∗"=" ",InertForm:-Display(`%*`(Units:-Split(c))));

gives

 

@Rouben Rostamian  Since I just finished a more extended explanation, I'll add it in case it is useful to others

restart;

with(PDETools):

Differential equation over 0 < x and x < 5: The function u(x) is unknown

de := diff(u(x),x) + x*u(x) = 0;

diff(u(x), x)+x*u(x) = 0

Transform the domain from 0 < x and x < 5 to 0 < xi and xi < 1:

tr := x = 5*xi;

x = 5*xi

The result contains u(xi), not u(5*xi) because we don't know the function, it is just some function to be determined.
But implicitly we mean the image of x is the same as the image of the xi value that is equivalent to x.

dchange({tr}, de, {xi});

(1/5)*(diff(u(xi), xi))+5*xi*u(xi) = 0

This is made explicit in the transformation you used. We have a new name for the transformed function, but the result is essentially the same.

tr2 := x = 5*xi, u(x) = v(xi);
dchange({tr2}, de, {xi, v(xi)});

x = 5*xi, u(x) = v(xi)

(1/5)*(diff(v(xi), xi))+5*xi*v(xi) = 0

Now consider a slightly different de, involving the known function sin

de2 := diff(u(x),x) + x*sin(x) = 0;

diff(u(x), x)+x*sin(x) = 0

The transformed equation involves sin(5*xi)

dchange({tr}, de2, {xi});

(1/5)*(diff(u(xi), xi))+5*xi*sin(5*xi) = 0

In the next case, we know the function, we just don't want to tell Maple.

de3 := diff(u(x),x) + x*f(x) = 0;

diff(u(x), x)+x*f(x) = 0

Then the following is not what we want

dchange({tr}, de3, {xi});

(1/5)*(diff(u(xi), xi))+5*xi*f(xi) = 0

But if we tell Maple the function is known we get the required result

dchange({tr}, de3, {xi}, known = f);

(1/5)*(diff(u(xi), xi))+5*xi*f(5*xi) = 0

So a generic first order ODE, if we mean that the function is known

DE := F(x,u(x),diff(u(x),x));

F(x, u(x), diff(u(x), x))

and we tell Maple that, then we get the expected 5*xi

dchange({tr2}, DE, {xi, v(xi)}, known=F);

F(5*xi, v(xi), (1/5)*(diff(v(xi), xi)))

 

Download dchange-problem.mw

One solution is to move the ode inside MoveRod as you had in the Rod_triangle code. But a better solution is just to move the ics and dsolve outside MoveRod and then get rid of MoveRod altogether - it was defined and then immediately invoked only once.  Like this:

Rod_parabola.mw

The problem is that when ode is defined outside MoveRod, x is a global. Then inside MoveRod you declare x as a local, so the dsolve command has two x's that look the same but are not. You can confirm this by changing dsolve to ddsolve, then after MoveRod(); add indets(%,function). Towards the end you will see x(t) appears twice.

You should be able to update to 2025.2 through Tools -> check for updates.

If you mean the Customer Support Updates and the SupportTools package that makes small updates between numbered updates, that was brought in in Maple 2026. I recall it was experimental during 2025, someone may be able to help you install it manually (search Mapleprimes, perhaps?), but probably there wasn't much beyond the 2025.2 update.

The message means there are two variables (nu and x) and it does not know which to expand in. It does not seem to know the general nu case. But this can be done in other ways:

Download Bessel.mw

Simplest way is seq:

seq(ithprime(b), b = 1..19);

It is hard to find but is at ?dsolve,numeric,interactive.

I'm not sure I completely understand what you want to do. The simplest is to just open your 2016 worksheet in Maple 2026. You may get a warning message but I think almost everything will work the same; if not you can ask a specific question about that here.

Since you want to use 1D input in 2026, go to the File tab in the top ribbon, and then in the bottom-right corner of the drop-menu choose "options". That brings up a popup menu. Choose its Display tab, and then choose Input Display as Maple Notation and choose Apply Globally or Apply to Session. The output display could also be changed, though that seems more unusual.

If you just want to copy a few lines you can directly copy from 2016 to 2026. If you haven't set your Input Display to Maple Notation, you need to use Ctrl-m on the input line just before you paste to ensure that input line is in 1D mode.

As you used, the pde2 paper must be using the ordinary derivative. With some additional assumptions it can give Eq 3.5.

Download pde2.mw

I'm assuming the notation (lambda - nu)r means pochhammer. If so, straightforward evaluation of the double sum works in some cases.

restart

F := proc (lambda, nu, kappa, mu, alpha, beta, x) options operator, arrow; GAMMA(kappa+lambda+1)*GAMMA(mu+nu+1)*(Sum(Sum(pochhammer(lambda-kappa, r)*pochhammer(nu-mu, s)*BesselJ(kappa+lambda+r, alpha*x)*BesselJ(mu+nu+s, beta*sqrt(1-x^2))*((1/2)*alpha*x)^(kappa+lambda+r)*((1/2)*beta*sqrt(1-x^2))^(mu+nu+s)/(2^(r+s)*factorial(r)*factorial(s)*GAMMA(lambda+r+1)*GAMMA(nu+s+1)), r = 0 .. infinity), s = 0 .. infinity)) end proc

proc (lambda, nu, kappa, mu, alpha, beta, x) options operator, arrow; GAMMA(kappa+lambda+1)*GAMMA(mu+nu+1)*(Sum(Sum(pochhammer(lambda-kappa, r)*pochhammer(nu-mu, s)*BesselJ(kappa+lambda+r, alpha*x)*BesselJ(mu+nu+s, beta*sqrt(1-x^2))*((1/2)*alpha*x)^(kappa+lambda+r)*((1/2)*beta*sqrt(1-x^2))^(mu+nu+s)/(2^(r+s)*factorial(r)*factorial(s)*GAMMA(lambda+r+1)*GAMMA(nu+s+1)), r = 0 .. infinity), s = 0 .. infinity)) end proc

Success:

F(1/2, 1/2, 1/2, 1/2, alpha, beta, x); value(%)

Sum(Sum(pochhammer(0, r)*pochhammer(0, s)*BesselJ(1+r, alpha*x)*BesselJ(1+s, beta*(-x^2+1)^(1/2))*((1/2)*alpha*x)^(1+r)*((1/2)*beta*(-x^2+1)^(1/2))^(1+s)/(2^(r+s)*factorial(r)*factorial(s)*GAMMA(3/2+r)*GAMMA(3/2+s)), r = 0 .. infinity), s = 0 .. infinity)

BesselJ(1, alpha*x)*BesselJ(1, beta*(-x^2+1)^(1/2))*alpha*x*beta*(-x^2+1)^(1/2)/Pi

Success

F(-1/2, 1/2, 1/2, 1/2, alpha, beta, x); value(%)

Sum(Sum(pochhammer(-1, r)*pochhammer(0, s)*BesselJ(r, alpha*x)*BesselJ(1+s, beta*(-x^2+1)^(1/2))*((1/2)*alpha*x)^r*((1/2)*beta*(-x^2+1)^(1/2))^(1+s)/(2^(r+s)*factorial(r)*factorial(s)*GAMMA(1/2+r)*GAMMA(3/2+s)), r = 0 .. infinity), s = 0 .. infinity)

BesselJ(0, alpha*x)*BesselJ(1, beta*(-x^2+1)^(1/2))*beta*(-x^2+1)^(1/2)/Pi-(1/2)*BesselJ(1, alpha*x)*BesselJ(1, beta*(-x^2+1)^(1/2))*alpha*x*beta*(-x^2+1)^(1/2)/Pi

Success

F(1/2, -1/2, 1/2, 1/2, alpha, beta, x); value(%)

Sum(Sum(pochhammer(0, r)*pochhammer(-1, s)*BesselJ(1+r, alpha*x)*BesselJ(s, beta*(-x^2+1)^(1/2))*((1/2)*alpha*x)^(1+r)*((1/2)*beta*(-x^2+1)^(1/2))^s/(2^(r+s)*factorial(r)*factorial(s)*GAMMA(3/2+r)*GAMMA(1/2+s)), r = 0 .. infinity), s = 0 .. infinity)

BesselJ(1, alpha*x)*BesselJ(0, beta*(-x^2+1)^(1/2))*alpha*x/Pi-(1/2)*BesselJ(1, alpha*x)*BesselJ(1, beta*(-x^2+1)^(1/2))*alpha*x*beta*(-x^2+1)^(1/2)/Pi

Reduces to a single sum

F(1/2, 1/2, -1/2, 1/2, alpha, beta, x); value(%)

Sum(Sum(pochhammer(1, r)*pochhammer(0, s)*BesselJ(r, alpha*x)*BesselJ(1+s, beta*(-x^2+1)^(1/2))*((1/2)*alpha*x)^r*((1/2)*beta*(-x^2+1)^(1/2))^(1+s)/(2^(r+s)*factorial(r)*factorial(s)*GAMMA(3/2+r)*GAMMA(3/2+s)), r = 0 .. infinity), s = 0 .. infinity)

sum(pochhammer(1, r)*BesselJ(r, alpha*x)*BesselJ(1, beta*(-x^2+1)^(1/2))*((1/2)*alpha*x)^r*beta*(-x^2+1)^(1/2)/(2^r*factorial(r)*GAMMA(3/2+r)*Pi^(1/2)), r = 0 .. infinity)

NULL

Download Hughes2.mw

restart

interface(version)

`Standard Worksheet Interface, Maple 2026.1, Windows 11, April 28 2026 Build ID 2011354`

expr := sqrt(x__0+1)*sqrt(-2*beta^2*x__0-2*beta^2+4)*sqrt(-(x__0+1)*(beta^2-1))/((beta^2*x__0+beta^2-2)*(beta^2*x__0+beta^2-x__0-1)); result := 2/(sqrt(-beta^2+1)*sqrt(-2*beta^2*x__0-2*beta^2+4)); assumptions := 0 < x__0 and x__0 < 1, 0 < beta and beta < 1

(x__0+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2)*(-(x__0+1)*(beta^2-1))^(1/2)/((beta^2*x__0+beta^2-2)*(beta^2*x__0+beta^2-x__0-1))

2/((-beta^2+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2))

0 < x__0 and x__0 < 1, 0 < beta and beta < 1

The result has square roots on the denominator. Removal of square roots from the denominor and putting them on the numerator is a task for evala or rationalize, so try applying these to the reciprocal.

recip := evala(1/expr); rationalize(1/expr)

(1/2)*(-(x__0+1)*(beta^2-1))^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2)/(x__0+1)^(1/2)

(1/2)*(-beta^2*x__0-beta^2+x__0+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2)/(x__0+1)^(1/2)

The evala result needs only cancellation of the common factor sqrt(x__0+1) to give the required result, suggesting it will work with the required assumptions

`assuming`([simplify(recip)], [assumptions])

(1/2)*(-beta^2+1)^(1/2)*(4-2*(x__0+1)*beta^2)^(1/2)

So the following works

`assuming`([1/simplify(evala(1/expr))], [assumptions]); simplify(%-result)

2/((-beta^2+1)^(1/2)*(4-2*(x__0+1)*beta^2)^(1/2))

0

NULL

Download simplify.mw

[Edit: [4,2,1] corrected to [4,3,1]]. Here is the procedure for the [4,3,1] case. I assumed the Hirota transformation result was given correctly in the paper.

Download t1.mw

@salim-barzani The paper seems to have several errors

fp2.mw

Here for (1): [edit: updated to use the InRadius.]

restart

with(geom3d); _local(O)

Define o as the origin, and C and O as cube and octahedron. The cube has sides of length 1. The corners of the octahedron will touch the centres of the faces of the cube, so the circumsphere of the octahedron will be equal to 1/2, which can be found as the radius of the in-sphere of the cube.

point(o, 0, 0, 0); cube(C, o, side = 1); inR := InRadius(C); octahedron(O, o, inR)

1/2

draw([C(cutout = .85), O])

And the ratio of the volumes is

vOvC := volume(O)/volume(C)

1/6

For the cube inside the octahedron, its corners touch the centres of faces of the octahedron. So we want the distance of the centre of a face from the origin, which is the InRadius

d := InRadius(O)

(1/6)*3^(1/2)

So the cube inside has circumsphere of radius d

cube(C__2, o, d)

draw([C(cutout = .85), O(cutout = .85), C__2])

The ratio of volumes of successive cubes is

rc := volume(C__2)/volume(C)

1/27

And so the sum of all the volumes of the cubes is a geometric series "1+1/(27)+(1/(27))^(2)+..."

cubesvol := 1/(1-rc)

27/26

The volume of the next octahedron is 1/6 of the volume of C__2, from which we get the ratio of volumes of successive octahedra is also 1/27

vO2 := vOvC*volume(C__2); ro := vO2/volume(O)

1/162

1/27

Summing the geoemetric series, starting at the volume of the first octahedron gives

octsvol := volume(O)/(1-ro)

9/52

And the grand total volume is

allvol := cubesvol+octsvol

63/52

For the surface areas we have for the cubes

ac := area(C__2)/area(C); cubesarea := area(C)/(1-ac)

1/9

27/4

and for the octahedra it is again the same ratio

aO2 := area(O)*area(C__2)/area(C); ao := aO2/area(O)

(1/9)*3^(1/2)

1/9

octsarea := area(O)/(1-ao)

(9/8)*3^(1/2)

And the grand total area is

cubesarea+octsarea

27/4+(9/8)*3^(1/2)

``

Download cubeoct2.mw

The error message mentions a problem with Statistics:-Remove, so the problem is that the dataframe Remove and the Statistics Remove commands are being confused. If you remove your with(Statistics) line, you will see that many of your Removes now work. To use it while the Statistics package is loaded you can use

df1:-Remove(df1, A);

or

DataFrame:-Remove(df1, A);

This syntax is because the dataframes are implemented as Maple Objects, but this use of Remove doesn't seem to be well documented. 

1 2 3 4 5 6 7 Last Page 1 of 88