Maple 2024 Questions and Posts

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

I put together the attached worksheet to help me determine the cheapest way to buy "refreshments" for a party by comparing price and volume of different bottle size options.  The spreadsheet works fine as is.  However, when I right click on the output of line (14) and format pct_difference as percent with 2 decimal places and execute the worksheet, Maple hangs on that line and progresses no further.  This doesn't happen in Maple 2018 but the problem does show up in Maple 2024.  Suggestions please?

cost_comparison_-_liquid_(v01MP).mw

This question is as much an observation of somthing I accidently stumbled across. I was using eval[recurse] to evaluate expressions reduced with LargeExpressions. I found eval['recurse'](eval['recurse']([Expr1 , Expr2] , [Q=.. Q1=.....])[]) to be better than simplify(eval['recurse']([Expr1 , Expr2] , [Q=.. Q1=.....])[]).

I only realised what was happening  when I put the below together. Then I could see the wood from the trees. 

It would be interesting to know why.

restart

 

Pt:=[[(sqrt(2*sqrt(Q[2]) + 2*Q[10])*sqrt(Q[6])*(t^2 + 1)/(sqrt(sqrt(Q[2])/(4*a*c - b^2)^2)*sqrt((2*sqrt(Q[2])*a*c^2*e^2 + 2*sqrt(Q[2])*b^2*c^2*f - 8*sqrt(Q[2])*a^3*c*f + 2*sqrt(Q[2])*a^2*b^2*f + 16*sqrt(Q[2])*a^2*c^2*f + 2*sqrt(Q[2])*a^2*c*d^2 - 4*sqrt(Q[2])*a^2*c*e^2 - 8*sqrt(Q[2])*a*c^3*f - 4*sqrt(Q[2])*a*c^2*d^2 + 2*sqrt(Q[2])*a^3*e^2 + 2*sqrt(Q[2])*c^3*d^2 - 2*sqrt(Q[2])*b*c^2*d*e + 4*sqrt(Q[2])*a*b*c*d*e - 2*sqrt(Q[2])*a^2*b*d*e - 4*sqrt(Q[2])*a*b^2*c*f + sqrt(Q[2])*sqrt(2*sqrt(Q[2]) + 2*Q[10])*sqrt(2*sqrt(Q[2]) - 2*Q[10])*Q[7] - 2*Q[11])*signum((sqrt(Q[2])*sqrt(2*sqrt(Q[2]) + 2*Q[10])*sqrt(2*sqrt(Q[2]) - 2*Q[10])*Q[7] - 8*((a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5]/4)*Q[8])*Q[4])*Q[4])*(t^2 - 1)) - 2*a*e + b*d)/(4*a*c - b^2)],

[Q[2] = (a^2 - 2*a*c + b^2 + c^2)*(4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)^2, Q[4] = 1/((a^2 - 2*a*c + b^2 + c^2)*(4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)^2), Q[5] = (a^2 - 2*a*c + b^2 + c^2)*(4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)*(a + c), Q[6] = signum((4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)/(4*a*c - b^2))*(4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)/(4*a*c - b^2), Q[7] = csgn((4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)*(b*I + a - c)*I)*b, Q[8] = 4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2, Q[9] = csgn((4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)*(b*I + a - c)*I), Q[10] = (a - c)*(4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2), Q[11] = (a + c)*(a^2 - 2*a*c + b^2 + c^2)*(4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)^2]]:

length(Pt);  # was >27,000

5002

(1)

valsh:=[a = -9, b = -9, c = 16, d = -10, e = 7, f = -36]

[a = -9, b = -9, c = 16, d = -10, e = 7, f = -36]

(2)

S1:=eval['recurse'](Pt,valsh)[];

length(%)

 

[-(1/657)*(2*Q[2]^(1/2)+2*Q[10])^(1/2)*Q[6]^(1/2)*(t^2+1)*431649^(1/2)/(Q[2]^(1/4)*((-28903750*Q[2]^(1/2)+Q[2]^(1/2)*(2*Q[2]^(1/2)+2*Q[10])^(1/2)*(2*Q[2]^(1/2)-2*Q[10])^(1/2)*Q[7]-2*Q[11])*signum((Q[2]^(1/2)*(2*Q[2]^(1/2)+2*Q[10])^(1/2)*(2*Q[2]^(1/2)-2*Q[10])^(1/2)*Q[7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])^(1/2)*(t^2-1))-24/73], [Q[2] = 377479229074, Q[4] = 1/377479229074, Q[5] = 114273866, Q[6] = 23123/657, Q[7] = -9, Q[8] = 23123, Q[9] = 1, Q[10] = -578075, Q[11] = 2642354603518]

 

2074

(3)

simplify(S1);# this is  simplify with side retations
length(%)

[-(257/248003853501618)*377479229074^(3/4)*((377479229074^(1/4)*(t^2-1)*((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)+14)^(1/2)+(1/168849)*657^(1/2)*23123^(1/2)*431649^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(t^2+1))*((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)-14)^(1/2)+(2/168849)*23123^(1/2)*657^(1/2)*431649^(1/2)*((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)+14)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)*t)/(((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)-14)^(1/2)*((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)+14)^(1/2)*(t-1)*(t+1)), -(12/13777991861201)*377479229074^(3/4)*((377479229074^(1/4)*(t^2-1)*((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)+14)^(1/2)-(1/141912)*657^(1/2)*23123^(1/2)*431649^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)*(t^2+1))*((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)-14)^(1/2)+(1/70956)*(2*377479229074^(1/2)-1156150)^(1/2)*t*23123^(1/2)*657^(1/2)*431649^(1/2)*((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)+14)^(1/2))/(((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)-14)^(1/2)*((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)+14)^(1/2)*(t-1)*(t+1))]

 

2316

(4)

simplify(%%);
length(%)

[-(1/71716466988)*(-2471*706^(1/2)+249218)^(1/2)*(2471*706^(1/2)+249218)^(1/2)*((73^(1/2)*(t^2+1)*(46246*706^(1/2)-1156150)^(1/2)+(257/3)*706^(1/4)*(14+2*706^(1/2))^(1/2)*t^2)*(-14+2*706^(1/2))^(1/2)+2*73^(1/2)*(t*(46246*706^(1/2)+1156150)^(1/2)*(14+2*706^(1/2))^(1/2)-257*706^(1/4)))*706^(1/4)/(t^2-1), (1/71716466988)*(-2471*706^(1/2)+249218)^(1/2)*((73^(1/2)*(t^2+1)*(46246*706^(1/2)+1156150)^(1/2)-72*706^(1/4)*(14+2*706^(1/2))^(1/2)*t^2)*(-14+2*706^(1/2))^(1/2)-2*73^(1/2)*((14+2*706^(1/2))^(1/2)*(46246*706^(1/2)-1156150)^(1/2)*t-216*706^(1/4)))*(2471*706^(1/2)+249218)^(1/2)*706^(1/4)/(t^2-1)]

 

744

(5)

 

S2:=eval['recurse'](eval['recurse'](Pt,valsh)[]);# I find this interesting
length(%)

[-(1/162938531750563026)*(2*377479229074^(1/2)-1156150)^(1/2)*23123^(1/2)*657^(1/2)*(t^2+1)*431649^(1/2)*377479229074^(3/4)/(((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)+14)^(1/2)*(t^2-1))-(1/81469265875281513)*(2*377479229074^(1/2)+1156150)^(1/2)*t*23123^(1/2)*657^(1/2)*431649^(1/2)*377479229074^(3/4)/(((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)-14)^(1/2)*(t^2-1))-257/657, (1/162938531750563026)*(2*377479229074^(1/2)+1156150)^(1/2)*23123^(1/2)*657^(1/2)*(t^2+1)*431649^(1/2)*377479229074^(3/4)/(((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)+14)^(1/2)*(t^2-1))-(1/81469265875281513)*(2*377479229074^(1/2)-1156150)^(1/2)*t*23123^(1/2)*657^(1/2)*431649^(1/2)*377479229074^(3/4)/(((9/377479229074)*377479229074^(1/2)*(2*377479229074^(1/2)-1156150)^(1/2)*(2*377479229074^(1/2)+1156150)^(1/2)+(625/8162419)*377479229074^(1/2)-14)^(1/2)*(t^2-1))-24/73]

 

1283

(6)

simplify(S2); #
length(%)

 

[-(1/406325592)*(14+2*706^(1/2))^(1/2)*(((181442/3)*(14+2*706^(1/2))^(1/2)*t^2+706^(3/4)*73^(1/2)*(46246*706^(1/2)-1156150)^(1/2)*(t^2+1))*(-14+2*706^(1/2))^(1/2)+2*(46246*706^(1/2)+1156150)^(1/2)*73^(1/2)*706^(3/4)*(14+2*706^(1/2))^(1/2)*t-362884*73^(1/2))*(-14+2*706^(1/2))^(1/2)/(t^2-1), (14+2*706^(1/2))^(1/2)*((-2*706^(3/4)*73^(1/2)*(46246*706^(1/2)-1156150)^(1/2)*t-50832*(-14+2*706^(1/2))^(1/2)*t^2)*(14+2*706^(1/2))^(1/2)+(304992+(t^2+1)*(46246*706^(1/2)+1156150)^(1/2)*706^(3/4)*(-14+2*706^(1/2))^(1/2))*73^(1/2))*(-14+2*706^(1/2))^(1/2)/(406325592*t^2-406325592)]

 

705

(7)
 

 

Download 2024-05-31_Eval_Recurse_vs_Simplify_Side_Rels.mw

counts_and_bins_data_output_from_histogram().mw

The Historgram( ) function is the combination of a binning computation and a visualization of the result of the binning computation. In order to generate any histogram you need to know the set of bin boundaries and the number of counts in each bin.

 

These bin boundaries look like: bin_bounds := [[`x__1,min`, `x__1,max`], [`x__2,min`, `x__2,max`], () .. (), [`x__N,min`, `x__N,max`]]where there are N bins in total.

The counts data looks like: counts := [H__1, H__2, () .. (), H__N]where there are N bins in total.

 

The Histogram( ) command passed this data around internally. Can I have Histogram( ) output this data? In other words, can I get the x-y data from the histogram, the bins-counts data?


Download counts_and_bins_data_output_from_histogram().mw

Can_I_change_the_location_of_the_color_bar_caption_in_Maple_2024.mw

In Maple 2024,

can I change the location of the color bar caption in Maple 2024? It conflicts with the color bar labels sometimes. See the attached maple sheet for an example.

I have some long expressions that would be more readable if common sections were substituted out. There are many sets of radicals often stacked inside each other.  The other one is (a*x..........) I see repeated in some other expressions. indets is good, but is there a way to use it to select  (a*x..........) types
At these eexpressions are returned from procdures would probably put them in an array/table with their substitution components. 
I dont need to substitute everything. What I have done below is reasonable for reading and seeing the structure.

What would be a good approact here?

restart

 

18*x^2+21*x*y+7*y^2-29*x-37*y-56

(1)

vals:=[a=18,b=21,c=7,d=-29,e=-37,f=-56]

[a = 18, b = 21, c = 7, d = -29, e = -37, f = -56]

(2)

vars[1]:=x:vars[2]:=y:

eqn:= 8*(2*((a^2-2*a*c+b^2+c^2)*(4*a*c*f-a*e^2-b^2*f+b*d*e-c*d^2)^2)^(1
                /2)+(-8*a*f+2*d^2)*c^2+(8*a^2*f-2*a*d^2+2*a*e^2+2*b^2*f-2*b*d*e)*c-2*a^2*e^2-2*
                a*b^2*f+2*a*b*d*e)^(1/2)*(a*c-1/4*b^2)/(4*a*c-b^2)^2*(vars[1]-(1/4*b*e-1/2*c*d)/(a*c-\
                1/4*b^2))-8*csgn((4*a*c*f-a*e^2-b^2*f+b*d*e-c*d^2)*(Complex(1)*a+Complex(-1)*c-
                b))*(a*c-1/4*b^2)*(2*((a^2-2*a*c+b^2+c^2)*(4*a*c*f-a*e^2-b^2*f+b*d*e-c*d^2)^2)^
                (1/2)+(8*a*f-2*d^2)*c^2+(-8*a^2*f+2*a*d^2-2*a*e^2-2*b^2*f+2*b*d*e)*c+2*a^2*e^2+
                2*a*b^2*f-2*a*b*d*e)^(1/2)/(4*a*c-b^2)^2*(vars[2]-(-1/2*a*e+1/4*b*d)/(a*c-1/4*b^2))

8*(2*((a^2-2*a*c+b^2+c^2)*(4*a*c*f-a*e^2-b^2*f+b*d*e-c*d^2)^2)^(1/2)+(-8*a*f+2*d^2)*c^2+(8*a^2*f-2*a*d^2+2*a*e^2+2*b^2*f-2*b*d*e)*c-2*a^2*e^2-2*a*b^2*f+2*a*b*d*e)^(1/2)*(a*c-(1/4)*b^2)*(x-((1/4)*b*e-(1/2)*c*d)/(a*c-(1/4)*b^2))/(4*a*c-b^2)^2-8*csgn((4*a*c*f-a*e^2-b^2*f+b*d*e-c*d^2)*(I*a-I*c-b))*(a*c-(1/4)*b^2)*(2*((a^2-2*a*c+b^2+c^2)*(4*a*c*f-a*e^2-b^2*f+b*d*e-c*d^2)^2)^(1/2)+(8*a*f-2*d^2)*c^2+(-8*a^2*f+2*a*d^2-2*a*e^2-2*b^2*f+2*b*d*e)*c+2*a^2*e^2+2*a*b^2*f-2*a*b*d*e)^(1/2)*(y-(-(1/2)*a*e+(1/4)*b*d)/(a*c-(1/4)*b^2))/(4*a*c-b^2)^2

(3)

length(eqn)

962

(4)

simplify(eval(eqn,vals))

(4/567)*(9*x+53)*(-63382+5762*562^(1/2))^(1/2)+(4/1323)*(-21*y+241)*(63382+5762*562^(1/2))^(1/2)

(5)

indets(eqn)

{a, b, c, d, e, f, x, y, ((a^2-2*a*c+b^2+c^2)*(4*a*c*f-a*e^2-b^2*f+b*d*e-c*d^2)^2)^(1/2), (2*((a^2-2*a*c+b^2+c^2)*(4*a*c*f-a*e^2-b^2*f+b*d*e-c*d^2)^2)^(1/2)+(-8*a*f+2*d^2)*c^2+(8*a^2*f-2*a*d^2+2*a*e^2+2*b^2*f-2*b*d*e)*c-2*a^2*e^2-2*a*b^2*f+2*a*b*d*e)^(1/2), (2*((a^2-2*a*c+b^2+c^2)*(4*a*c*f-a*e^2-b^2*f+b*d*e-c*d^2)^2)^(1/2)+(8*a*f-2*d^2)*c^2+(-8*a^2*f+2*a*d^2-2*a*e^2-2*b^2*f+2*b*d*e)*c+2*a^2*e^2+2*a*b^2*f-2*a*b*d*e)^(1/2), csgn((4*a*c*f-a*e^2-b^2*f+b*d*e-c*d^2)*(I*a-I*c-b))}

(6)

Subs:=[((a^2 - 2*a*c + b^2 + c^2)*(4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)^2)=A^2,
         (-8*a*f + 2*d^2)*c^2 + (8*a^2*f - 2*a*d^2 + 2*a*e^2 + 2*b^2*f - 2*b*d*e)*c - 2*a^2*e^2 - 2*a*b^2*f + 2*a*b*d*e=B^2,
           f*b^3 - b^2*d*e - (-(-4*c*f + e^2)*a - c*d^2)*b=C]:

eqn1:=simplify(eqn,Subs)

(-8*csgn(C+((1/2)*I)*B^2)*(-(1/4)*y*b^2-(1/4)*b*d+a*(y*c+(1/2)*e))*(-B^2+2*(A^2)^(1/2))^(1/2)+8*(B^2+2*(A^2)^(1/2))^(1/2)*(-(1/4)*b^2*x-(1/4)*b*e+c*(a*x+(1/2)*d)))/(4*a*c-b^2)^2

(7)

Subsnumeric:=eval(Subs,vals)

[74635047712 = A^2, -253528 = B^2, 242004 = C]

(8)

simplify(eval(eqn1,[(rhs=lhs)~(Subsnumeric)[],vals[] ]))

(4/567)*(9*x+53)*(-63382+5762*562^(1/2))^(1/2)+(4/1323)*(241-21*y)*(63382+5762*562^(1/2))^(1/2)

(9)
 

 

Download 2024-05-27_Q_Pick_Apart_an_Expression.mw

How do I calculate and plot an Orthogonal Trajectory on Maple 2024?

Here's the equation of the contour lines:

x*y^2 - x^2 - y^2 = k

I need to make it pass through a precise point on my contour lines graph, and everything I do doesn't seem to work.

Given the ode   y''(x)*y'(x)=0, clearly it has solutions for y''=0 and y'=0.

These are y=c1+x*c2 and y=c1. But Maple gives 3 solutions

12592

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

ode:=diff(y(x),x$2)*diff(y(x),x)=0;

(diff(diff(y(x), x), x))*(diff(y(x), x)) = 0

dsolve(ode)

y(x) = c__1, y(x) = -c__1*x+c__2, y(x) = c__1*x+c__2

dsolve(diff(y(x),x$2)=0)

y(x) = c__1*x+c__2

dsolve(diff(y(x),x)=0)

y(x) = c__1

 

 

Download why_3_solutions_may_24_2024.mw

Where did the third solution come from? The 3 solutions are correct ofcourse, but why 3? There should only be two. 

FYI, I am using 

Physics:-Version()

The "Physics Updates" version in the MapleCloud is 1746. The 

   version installed in this computer is 1745 created 2024, May 

I have to check earlier Maple versions to see if same thing happens there.

I am stuck this command works seemlessly in Maple:

ThermophysicalData:-CoolProp:-Property(D, T = 20*Unit('degC'), P = 760*Unit('mmHg'), water)

but it does not work in Maple Flow. Does anyone knows why? Thank you so much for your help in the matter.

Hello :) 

I have a math problem, where I first need to use Linear regression to find the equation based on a set of data. I did that, no problem. 

However, in the next part of the problem I need to check if the residuals are under "normal distribution". Usually, I check if a dataset is normally distributed via "QQ-plot", and there will be no problems. But this time, because I need to check the residuals, I need to use the "residualQQplot(data,LinReg)" command to make it happen. But when I read the mean-value, mu, it says "-0," and nothing else? I know it should be "-3,2752*10^-15. 

The standard deviation is correct.

How do I fix this, so the residualQQplot shows me the right result? 

I have attached the worksheet here. worksheet_-_linear_reg_and_residuals_for_normal_distribution.mw

Thank you! 

I can't understand this behavior. Any idea why it happens?

Solve is able to solve equation   f(y)=x+A for y, but can't solve   f(y)=x for y.

This is unexpected for me. I do not see why it can solve it when RHS is x+A but not when RHS is just x.


 

21040

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1745. The version installed in this computer is 1744 created 2024, April 17, 19:33 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

restart;

21040

sol:=int(1/sqrt(sin(y)),y);
solve(sol=x,y)

(sin(y)+1)^(1/2)*(-2*sin(y)+2)^(1/2)*(-sin(y))^(1/2)*EllipticF((sin(y)+1)^(1/2), (1/2)*2^(1/2))/(cos(y)*sin(y)^(1/2))

Warning, solutions may have been lost

sol:=int(1/sqrt(sin(y)),y);
solve(sol=x+b,y):
{%}; #to eliminate duplicates

(sin(y)+1)^(1/2)*(-2*sin(y)+2)^(1/2)*(-sin(y))^(1/2)*EllipticF((sin(y)+1)^(1/2), (1/2)*2^(1/2))/(cos(y)*sin(y)^(1/2))

{arctan(JacobiSN(((1/2)*I)*2^(1/2)*(x+b), (1/2)*2^(1/2))^2-1, -(1/2)*JacobiSN(((1/2)*I)*2^(1/2)*(x+b), (1/2)*2^(1/2))*(4-2*JacobiSN(((1/2)*I)*2^(1/2)*(x+b), (1/2)*2^(1/2))^2)^(1/2)*2^(1/2)), arctan(JacobiSN(((1/2)*I)*2^(1/2)*(x+b), (1/2)*2^(1/2))^2-1, (1/2)*JacobiSN(((1/2)*I)*2^(1/2)*(x+b), (1/2)*2^(1/2))*(4-2*JacobiSN(((1/2)*I)*2^(1/2)*(x+b), (1/2)*2^(1/2))^2)^(1/2)*2^(1/2))}

 


I can trick it to solve  f(y)=x for y  by asking it to solve f(y)=x+A for y and then set A=0 in the solution. But one should not have to do this. Is this a bug or Am I missing something?

Download why_solve_when_adding_term_only_may_22_2024.mw

Hello.

I am very new to Maple. Many this are great, but I do not understand how maple deals with, especially, radiological units. In particular regarding joules [J] wich Maple seems to have alt least three types:

1) J - in relation to work

2) J(radiation) in relation to Gy (Gray) J/kg

3) J(dose_equivalent_index) in relation to Sv also J/kg

Why does Maple distinguish between these "joules"? As a phycisist they are all (well maby not entirely for Sv) equal to me. How can I make Maple treat them all at the "same joule"?

I have tried the following first:

with(Units[Standard]) and

with(Units[Natural])

Best,

Carsten

If I understand correctly, both of 

int(RETURN(is(y::positive)), y = 0 .. x) assuming 0 <= x, x < 1;
int(RETURN(coulditbe(y = 1)), y = 0 .. x) assuming 0 < x, x < 1;

should output `not`(true). However, Maple simply returns true for the second one. 
Isn't this result incorrect? Or am I missing something?

I would like to remove isomorphs from some graphs. That is to filter out non-isomorphic graphs.

graph_list := [GraphTheory:-CompleteGraph(3), GraphTheory:-PathGraph(3),Graph({{a,b},{b,c},{c,a}})]:

# Create a table to store non-isomorphic graphs
non_isomorphic_graphs := table():

# Counter for indexing the table
counter := 1:

# Iterate over each graph and check if it is isomorphic to any of the stored graphs
for g in graph_list do
    is_isomorphic := false:
    for key in indices(non_isomorphic_graphs,'nolist') do
        if GraphTheory:-IsIsomorphic(g, non_isomorphic_graphs[key]) then
            is_isomorphic := true:
            break:
        end if:
    end do:
    if not is_isomorphic then
        non_isomorphic_graphs[counter] := g:
        counter := counter + 1:
    end if:
end do:
op(non_isomorphic_graphs)
DrawGraph~(non_isomorphic_graphs,  layoutoptions = [neutral_color = "pink", initial = spring])

 

A canonical form is a labeled graph Canon(G) that is isomorphic to G, such that every graph that is isomorphic to G has the same canonical form as G. I noticed that Maple has a function called CanonicalGraph. Can this function achieve the effect I want? I can easily achieve this by combining the  canonical form and property of sets  in  Sage.

graph_list = [Graph([(0, "a"), ("a", 2), (2, 0)]),graphs.PathGraph(3), graphs.CompleteGraph(3)]
non_isomorphic_graphs_labels = {g.canonical_label().copy(immutable=True) for g in graph_list}

 

 

An underlying motivation:My collaborators and I designed generation rules (algorithms) for 1-planar 4-trees;see https://arxiv.org/abs/2404.15663. Since the generating process is based on 1-planar embeddings, it will ultimately require filtering non-isomorphic graphs among a list of embeddings. I would be especially delighted to see that someone implement our algorithm in the future. Currently, I am stuck on handling some labeling details. It is somewhat similar to generating Apollonian networks (planar 3-trees). However, since its simplicial vertices are only two, the growth rate will not be too fast as the number of vertices increases.

Can the display of an object o in Maple, i.e.
> o;
                                                      display of the object
be controlled in a standard Maple worksheet, e.g. with Typesetting or something similar?

Hello, 

I have come across a problem in Maple, when I try plotting af slope field from my differential equation. 

I have tried different ways of defining the ODE, but when I use it in the command of "linjeelementer" (Danish for line elements - It's a command that's part of a package called "With (Gym)" in Maple, it gives me the error: Error, (in DEtools/DEplot/CheckDE) - Derivatives must be given explicitly. 

I don't understand what derivatives I must "give explicitly"?

Translation of the relevant sentences if anyone needs it when looking at the screenshot:

"I need to draw a slope field for the differential equation along with the solution curve for the population growth in India after 1960.

I define the differential equation:
ODE := -0.000032229*y^2 + 0.065843*y - 15.103"

"I am drawing the slope field for the differential equation along with the solution curve for the population growth in India after 1960, i.e., the solution curve that passes through the point (0,449):I am drawing a slope field for the differential equation along with the solution curve for the population growth in India after 1960, i.e., the solution curve that passes through the point (0,449):
linjeelementer(ODE, y(t), t = 0 .. 350, y = 0 .. 2000)"

First 25 26 27 28 29 30 31 Page 27 of 34