MaplePrimes Questions

The series to ode using 'series' option (if it exists) should always be series(...), i.e. with big O at end. but sometimes Maple forgets to add this. Here is an example

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1862 and is the same as the version installed in this computer, created 2025, April 25, 10:33 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 15 and is the same as the version installed in this computer, created April 27, 2025, 23:18 hours Eastern Time.`

restart;

ode:=diff(y(x),x)+y(x)=1+x;
IC:=y(0)=0;
sol:=dsolve([ode,IC],y(x),'series')

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

y(0) = 0

y(x) = x

lprint(sol); # notice solution is not series, it should be

y(x) = x

#above solution should be
y(x) = series(x+O(x^6),x,6)

y(x) = series(x+O(x^6),x,6)

#this example below is correct
ode:=diff(y(x),x)+y(x)=1+x;
IC:=y(0)=1;
sol:=dsolve([ode,IC],y(x),'series')

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

y(0) = 1

y(x) = series(1+(1/2)*x^2-(1/6)*x^3+(1/24)*x^4-(1/120)*x^5+O(x^6),x,6)

lprint(sol); #solution is series

y(x) = series(1+1/2*x^2-1/6*x^3+1/24*x^4-1/120*x^5+O(x^6),x,6)

 

 

Download bug_report_dsolve_series_april_28_2025.mw

In this work, I do not intend to expand all the variables across the monomials. Instead, I want to restrict the distribution to only the variables x,y,z,tx, y, z, tx,y,z,t, possibly raising them to appropriate powers as needed, until I obtain the desired solution and satisfy the conditions of my PDE tests. However, I am uncertain whether "monomial" is the correct term to use here.

S1.mw

trail-1.mw

These two expressions are the same, just pulled minus sign out

But look what happens when integrating them. the anti derivative of one is much more complicated than the other and contains complex numbers and logs. And no matter what I tried, I could not convert the complicated one to look same as the simpler result. Also could not verify the complicated one by back differentiating.

integrand_1:=x^2*(-arctan(x) + x)*exp(-arctan(x) + x)/(x^2 + 1);

x^2*(-arctan(x)+x)*exp(-arctan(x)+x)/(x^2+1)

integrand_2:=evala(integrand_1);

-x^2*(arctan(x)-x)*exp(-arctan(x)+x)/(x^2+1)

simplify(integrand_1 - integrand_2)

0

anti_1:=int(integrand_1,x);

(-arctan(x)+x)*exp(-arctan(x)+x)-exp(-arctan(x)+x)

anti_2:=int(integrand_2,x);

-(1-x+((1/2)*I)*ln(1-I*x)-((1/2)*I)*ln(1+x*I))*(1-I*x)^(-(1/2)*I)*(1+x*I)^((1/2)*I)*exp(x)

simplify(diff(anti_1,x)-integrand_1);

0

simplify(diff(anti_2,x)-integrand_2);

Error, (in simpl/simpl/ReIm/sum) too many levels of recursion

simplify(anti_1 - anti_2)

Error, (in simpl/simpl/ReIm/sum) too many levels of recursion

simplify(anti_2);

(1/2)*(I*ln(1+x*I)-I*ln(1-I*x)+2*x-2)*(1-I*x)^(-(1/2)*I)*(1+x*I)^((1/2)*I)*exp(x)

simplify(anti_2,ln);

(1/2)*(I*ln(1+x*I)-I*ln(1-I*x)+2*x-2)*(1-I*x)^(-(1/2)*I)*(1+x*I)^((1/2)*I)*exp(x)

 

 

Download int_strange_result_april_27_2025.mw

I would have expected same anti derivative to show.  To check, I used another software, and that one gave same anti-derivative for both integrands.

The questions I have: Why Maple gives such different result for same integrand? And how could one convert the one with the logs and complex numbers to the first one?

Maple 2025

Dear all 
I have a double integral, i want to compute this integral and verify if the pproposed solution verify the proposed equation or not. 
I can modify the right hand side of my equation or the exact solution, so that my equation has an exact solution with simple form of right hand side. 

exact_solution.mw

Thank you for your help 

 I am writing notes on complex analysis, I need to use figures of contour paths to integrate on them, i want to create something like this

I tried to plot the contour for 
\oint_{|z|=2} \frac{1}{z^2+1}\,dz
I need to have connecting lines all around because the poles can not be isolated

with(plots); circle1 := plot([2*cos(t), 2*sin(t), t = 0 .. 2*Pi], color = blue, thickness = 2); circle2 := plot([(1/2)*cos(t), 1+(1/2)*sin(t), t = 0 .. 2*Pi], color = "Green", thickness = 2); circle3 := plot([(1/2)*cos(t), -1+(1/2)*sin(t), t = 0 .. 2*Pi], color = "Red", thickness = 2); sing1 := plottools[disk]([0, 1], 0.2e-1, color = white); sing2 := plottools[disk]([0, -1], 0.2e-1, color = white); label1 := textplot([.1, 1.1, "z = i"], font = [Arial, Bold, 12]); label2 := textplot([.1, -1.1, "z = -i"], font = [Arial, Bold, 12])

display(circle1, circle2, circle3, sing1, sing2, label1, label2, scaling = constrained, labels = ["Re", "Im"])

 
 

restart; f := proc (z) options operator, arrow; 1/(z^2+1) end proc; z := 2*exp(I*t); dz := diff(z, t); integrand := f(z)*dz; simplify(integrand); value(Int(integrand, t = 0 .. 2*Pi))

0

(1)

Download CIF.mw

Hello all,

After updating the Physics package I have this error :

Physics:-Version();
The "Physics Updates" version "1862" is installed in the

   directory C:\Users\jm\maple\toolbox\2025\Physics Updates but

   is not active. The active version of Physics is within the

   library C:/Users/jm/maple/toolbox/2025/Physics Updates/lib\Ph\

  ysics Updates.maple.

What am I supposed to do next?

Thanks a lot and kind regards to all,

Jean-Michel

FYI;

 

You might have to try the command more than one time to see the above crash. Here is the worksheet

restart;

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1862 and is the same as the version installed in this computer, created 2025, April 25, 10:33 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 13 and is the same as the version installed in this computer, created April 22, 2025, 15:14 hours Eastern Time.`

restart;

ode:=x^2-2*x*y(x)+5*y(x)^2 = (x^2+2*x*y(x)+y(x)^2)*diff(y(x),x);

x^2-2*x*y(x)+5*y(x)^2 = (x^2+2*x*y(x)+y(x)^2)*(diff(y(x), x))

sol:=y(x) = (-1/2*exp(RootOf(-exp(_Z)^2*ln(x*(exp(_Z)-2))+2*_C7*exp(_Z)^2+_Z*exp(_Z)^2+4*exp(_Z)*ln(x*(exp(_Z)-2))-8*_C7*exp(_Z)-4*exp(_Z)*_Z-2*exp(_Z)-4*ln(x*(exp(_Z)-2))+8*_C7+4*_Z+6))^2+3*exp(RootOf(-exp(_Z)^2*ln(x*(exp(_Z)-2))+2*_C7*exp(_Z)^2+_Z*exp(_Z)^2+4*exp(_Z)*ln(x*(exp(_Z)-2))-8*_C7*exp(_Z)-4*exp(_Z)*_Z-2*exp(_Z)-4*ln(x*(exp(_Z)-2))+8*_C7+4*_Z+6))-6+2*(exp(RootOf(-exp(_Z)^2*ln(x*(exp(_Z)-2))+2*_C7*exp(_Z)^2+_Z*exp(_Z)^2+4*exp(_Z)*ln(x*(exp(_Z)-2))-8*_C7*exp(_Z)-4*exp(_Z)*_Z-2*exp(_Z)-4*ln(x*(exp(_Z)-2))+8*_C7+4*_Z+6))^2-6*exp(RootOf(-exp(_Z)^2*ln(x*(exp(_Z)-2))+2*_C7*exp(_Z)^2+_Z*exp(_Z)^2+4*exp(_Z)*ln(x*(exp(_Z)-2))-8*_C7*exp(_Z)-4*exp(_Z)*_Z-2*exp(_Z)-4*ln(x*(exp(_Z)-2))+8*_C7+4*_Z+6))+9)^(1/2))/(1/2*exp(RootOf(-exp(_Z)^2*ln(x*(exp(_Z)-2))+2*_C7*exp(_Z)^2+_Z*exp(_Z)^2+4*exp(_Z)*ln(x*(exp(_Z)-2))-8*_C7*exp(_Z)-4*exp(_Z)*_Z-2*exp(_Z)-4*ln(x*(exp(_Z)-2))+8*_C7+4*_Z+6))^2-3*exp(RootOf(-exp(_Z)^2*ln(x*(exp(_Z)-2))+2*_C7*exp(_Z)^2+_Z*exp(_Z)^2+4*exp(_Z)*ln(x*(exp(_Z)-2))-8*_C7*exp(_Z)-4*exp(_Z)*_Z-2*exp(_Z)-4*ln(x*(exp(_Z)-2))+8*_C7+4*_Z+6)))*x:

odetest(sol,ode);

 

Download crash_maple_2025_april_27_2025.mw

Hopefully a fix could be found for this.

When generating a file to update parts of maple (for example constants) is it best to put it in an initialization file or make a library archive .mla?

I fail to see the logic of using short form symbols for the scientific constants and then not being able to use that short form.  One manually has to equate the two as I show below.  Anyone see a reason not to do that in the internal programming?  Just wondering. 

with(ScientificConstants):

GetConstant(M__Sun)             

One has to use the names associated with those short forms described by the command

GetConstant(mass_of_Sun)

I would much rather like to use MSun , so what one has to do is manually equate them

MSun:=mass_of_Sun:

GetConstant(MSun)

I have a list of candidate solutions. Some of them satisfy my PDE test (i.e., they make the PDE equal to zero), while others do not. How can I separate the solutions that satisfy the PDE from those that do not?

Trail-pdetest.mw

ABC is an equilateral triangle of side 3 units. The points P, Q lie on BC, CA re-
spectively and are such that AQ = CP = 2units. If the point R lies on AB produced

so that BR = 1unit, prove that P, Q, R are collinear.

How to modify the ND procedure to handle derivatives with respect to more than three independent variables for higher-dimensional PDEs, it is work for [x,t] i want  it work for [x,y,z,t] , 

restart

with(PDEtools)

with(LinearAlgebra)

NULL

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

alias(F=F(x, t), G=G(x, t))

F, G

(2)

with(PDEtools):
undeclare(prime):

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(3)

ND := proc(F, G, U)
  local v, w, f, g, a:
  v := op(F):
  if v[1] in U then w := -v[1] else w := v[1] end if:
  if v[2] in U then w := w, -v[2] else w := w, v[2] end if:
  f := op(0, F):
  g := op(0, G):
  a := diff(f(w)*g(v), U);
  convert(subs([w]=~[v], a), diff)
end proc:

ND(F, G, [x]);
ND(F, G, [t]);

-(diff(F, x))*G+F*(diff(G, x))

 

-(diff(F, t))*G+F*(diff(G, t))

(4)

ND(F, F, [x]);
ND(F, F, [x, x]);

0

 

2*F*(diff(diff(F, x), x))-2*(diff(F, x))^2

(5)

ND(F, G, [x$3]);

-(diff(diff(diff(F, x), x), x))*G+3*(diff(diff(F, x), x))*(diff(G, x))-3*(diff(F, x))*(diff(diff(G, x), x))+F*(diff(diff(diff(G, x), x), x))

(6)

ND(F, F, [x$3, t]);

2*F*(diff(diff(diff(diff(F, t), x), x), x))-2*(diff(diff(diff(F, x), x), x))*(diff(F, t))-6*(diff(diff(diff(F, t), x), x))*(diff(F, x))+6*(diff(diff(F, x), x))*(diff(diff(F, t), x))

(7)

NULL

NULL

#if i collect P1+P1+...+P7 it must get equation 26 in paper so i want define the up proc to open but is not for (3+1) dimesnion,

P1 := 9*ND(F, F, [x, t])

18*F*(diff(diff(F, t), x))-18*(diff(F, x))*(diff(F, t))

(8)

NULL

P2 := -5*ND(F, F, [`$`(x, 3), y])

0

(9)

P3 := ND(F, F, [`$`(x, 6)])

2*F*(diff(diff(diff(diff(diff(diff(F, x), x), x), x), x), x))-12*(diff(diff(diff(diff(diff(F, x), x), x), x), x))*(diff(F, x))+30*(diff(diff(diff(diff(F, x), x), x), x))*(diff(diff(F, x), x))-20*(diff(diff(diff(F, x), x), x))^2

(10)

P4 := -5*ND(F, F, [`$`(y, 2)])

0

(11)

P5 := alpha*ND(F, F, [`$`(x, 2)])

alpha*(2*F*(diff(diff(F, x), x))-2*(diff(F, x))^2)

(12)

P6 := beta*ND(F, F, [x, y])

0

(13)

P7 := gamma*ND(F, F, [x, z])

0

(14)

Download define.mw

L.B.J. once said: “There are no problems we cannot solve together, and very few we can solve by ourselves.”

I've used Maple since the mid 90's when I found a Maple book with a working floppy disk containing V2, Student version in the UWaterloo Library. There was a version of Maple which stated that "you harnessed the power of ten thousand mathematicians" to which the initial quote applies.

The Certicom Challenge is still extant with prizes but the RSA Challenge has since been deprecated. General integer factorization seems to exist within a complexity class that is neither P nor NP. The following two values are associated with RSA-230 and RSA-232 and can be used to factor each of them simply and swiftly within an algebraic context:

4492372899485266683229032112393311539091890452003150017722229708882931615085372733373343061967162688807713966063216561545461119244883848142568154156987418243095913219694108294875951005535802313105656690937568115044857082104972025

252470349467980886727391223577367145704558455488893488785280129051457755334632136343591527439288590916228345021238946062776419447984711784388150390053253805338284074179548687684017542311453314919778156125323310987123004623216624367

These two values are very specific examples of a general solution structure and I have not yet seen anything written on this topic that I can recognize. If someone knows how to use these two values appropriately then please provide the solution context, otherwise, I shall revisit this post in the near future and provide the required equations.

This is my second post on this topic as I was notified that my initial post was deleted by a moderator. Hopefully this post passes through the gauntlet.

I am very confused by the y-value of the rightmost point on the plot below.

restart

I'd like to find the values of x for which x^2/(10^(-8)-x) = 5*10^(-3).

So I ask Maple to solve this equation.

evalf(solve(x^2/(10^(-8)-x) = 5*10^(-3)))

-0.5000010000e-2, 0.10000e-7

(1)

Do these solutions work?

eval(x^2/(10^(-8)-x), x = 1.0000*10^(-8)) = Float(infinity) 

eval(x^2/(10^(-8)-x), x = -0.5000010000e-2) = 0.5000000000e-2 NULL

Suppose I define the function

f := proc (x) options operator, arrow; x^2/(1/100000000-x) end proc = proc (x) options operator, arrow; x^2/(1/100000000-x) end proc 

f(10^(-8))

Error, (in f) numeric exception: division by zero

 

f(.999999*10^(-8)) = 0.9999980000e-2NULL

f(.99999*10^(-8)) = 0.9999800001e-3NULL

Now, the function seems continuous between these two points

plot(f, .99999*10^(-8) .. .999999*10^(-8))

 

It is late, and perhaps I am just tired and not seeing things clearly. I expected the topmost point on the right to have a y-value of 0.00999998, ie almost 0.01.

I expected that the bottom leftmost point to be 0.0009999800001, ie almost 0.001, and it is.

And I thus expected to show that there must be some x for which we have f(x)=0.005, which if I am not mistaken is between the two numbers. After all, 0.999998e-2-0.5e-2 = 0.499998e-2NULL

0.5e-2-0.9999800001e-3 = 0.4000020000e-2NULL

what am i missing here?


Download plotq.mw

I have a question about a calculation I was just trying to do. For some context, I am trying to calculate the pH of a solution of a weak acid in water. When the concentration of the weak acid is low enough, we need to consider the effect of ionization of the water itself (ie, autoprotolysis of water), since the order of magnitude of this ionization is the same as the order of magnitude of the ions due to the weak acid in this case of very low concentration.

There is a specific formula that can be used for this, which is shown below.

K_a is a constant that depends on the weak acid being considered, and K_w is a constant as well (for the autoprotolysis of water). I am interested in solving for the concentration of hydronium, given an initial concentration of the weak acid [HA]_initial.

I'd like to solve the equation for different values of [HA]_initial.

In the calculations below, I am trying to solve for [H__3*LinearAlgebra:-Transpose(O)] in the expression

K__a = ([H__3*LinearAlgebra:-Transpose(O)])([H__3*LinearAlgebra:-Transpose(O)]-K__w/[H__3*LinearAlgebra:-Transpose(O)])/(HA__initial+[-H__3*LinearAlgebra:-Transpose(O)]+K__w/[H__3*LinearAlgebra:-Transpose(O)])

Below, I use x as the concentration of hydronium [H__3*LinearAlgebra:-Transpose(O)] and K__a = 5*10^(-3), K__w = 10^(-14), HA__initial = 10^(-3)

evalf(solve((x^2-10^(-14))/(10^(-3)-x+10^(-14)/x) = 5*10^(-3), x))

0.854101976e-3-0.4e-11*I, -0.5854101969e-2-0.465063510e-12*I, -0.9e-11+0.3865063510e-11*I

(1)

If I use a manual simplification (noting that K__w is extremely small compared to reasonable values of [H__3*LinearAlgebra:-Transpose(O)], then I am able to get real solutions.

evalf(solve(x^2/(10^(-3)-x) = 5*10^(-3), x))

-0.5854101966e-2, 0.854101966e-3

(2)

Now, looking at the complex solutions, the imaginary parts are very small and the real parts of two of the three solutions match the real solutions above, so I guess perhaps I could have just ignored those complex parts.

On the other hand, if I try to do similar calculations but with HA__initial = 10^(-6), I get

evalf(solve((x^2-10^(-14))/(10^(-6)-x+10^(-14)/x) = 5*10^(-3), x))

0.1009702e-5-0.3e-11*I, -0.5000999802e-2-0.332050808e-12*I, -0.9902e-8+0.3132050808e-11*I

(3)

evalf(solve(x^2/(10^(-6)-x) = 5*10^(-3), x))

-0.5000999800e-2, 0.999800e-6

(4)

So here, I don't see a complex solution that looks like the positive real solution above. Which means that I am not sure if the equation with the complex solutions (which is not simplified) is useful to me (I am doing various such calculations with different values of "`HA__initial`)".

Download concentrations.mw

First 13 14 15 16 17 18 19 Last Page 15 of 2424