## Period in a decimal number...

How can I write a decimal number with period in maple? For example, in the following code;

restart;
number := 3.123123123123:
convert(number, rational);

I got 1040 / 333. However if number := 3.123123 then output is 76123 / 24374, so, in order to solve the exercise assign to the variable number a value of 3.123123123123123123123123123... How can I do it in abreviate form?

## Simplify expressions...

simplify is a procedure in Maple that have as parameter an assumption ¿Have the assumption a default value? For example, if we consider the following code:

restart;
f:= (x^3 - 27) / (x^2 - 3 * x):
print(f = simplify(f));

The output of that code assume that denominator is not zero, so I think the procedure have a default value for assume parameter.

## Is It Possible to Manipulate The Output From A Map...

I am working with expressions resulting from maple calculations that are 3-4 lines long, but I have to make a term-by-term comparison between one calculation and another. I would like to interweave the results of the two calculation so that one is above the other allowing direct comparison. It would also be nice to break up the expressions into pieces.  Unfortunately, I have gone as far as I can using maple directly.  The only solution I have come up with is to convert the expressions into Tex, copy them to a Tex editor and manipulate the expressions.  Unfortunately, Tex markup makes it difficult interpret the terms.

Has anyone come up with another method to manually manipulate the output from maple calculations.

## a way to test conditional statements for truth...

I'm seeking a way to test conditional statements for truth in Maple (2022).

The statements are like

1) how can I input such kind of statements?

2) how can I get a result in form true/false

a) for entire expression

b) (depending on range)

## why is this ode Homogeneous ODE of Class C accordi...

I can not find my Kamke book right now. But according to Maple help, Homogeneous ODE of Class C is the following

If I understand the above, it is saying that the RHS of the ode should be ratio of two polynomials, and both should be linear in y and x. Correct?

Given the above, then why Maple says the following ode is _homogeneous, class C ? Since the RHS is not linear in y and not linear in x:

restart;
ode:=diff(y(x),x)=(2*y(x)-1)*(4*y(x)+6*x-3)/(y(x)+3*x-1)^2;
ode:=lhs(ode)=expand(numer(rhs(ode)))/expand(denom(rhs(ode)))


DEtools:-odeadvisor(ode)


[[_homogeneous, class C], _rational]

What Am I overlooking/misunderstanding  from reading this definition?

## why Maple gives internal error on this integral?...

in Maple 2022.1 on windows 10

 > interface(version);

 > Physics:-Version();

 > restart;
 > int(x^5*(a+b*arctan(c*x^2))^2,x)

Error, (in gcdex) invalid arguments

 >

Why it happens and is there a workaround?

Does it happen on earlier versions? I do not have an earlier Maple installed on my current PC as it is new to check.

## Why Maple crash when doing String Split on string ...

I have string of length

StringTools:-Length(str);
1073105

When doing

p:=StringTools:-LengthSplit(str,100):

Maple gives

From help:

LengthSplit
split a string into equal length pieces

This is all done in .mpl  file actually, not interactive, but I made the above worksheet to show  the problem. The string is read from a file by a program and it wants to split it to 100 length smaller strings.

I have lots of RAM. 128 GB.  So why does Maple crash and is there a workaround this?

This string was generated by another software.

I have attached the above example below as worksheet.  Maple 2022.1 on windows 10.

Here is a simpler way to generate this problem

restart;
str:=StringTools:-Random(1073104,'upper'):
str[1..10];

StringTools:-Length(str);
p:=StringTools:-LengthSplit(str,100):


Using trial and error, the crash happens when the length reaches 1073101. At 1073100 there was no crash.

## why PDEtools:-Solve gives exception but not solve?...

Found case where PDEtools:-Solve gives exception but not solve.

Is this known issue?

 > interface(version);

 > restart;
 > result:=1/2*(Dirac(1,-t+4+k)+Dirac(1,t-4+k)-Dirac(1,-t+4+k)*cos(-t+4+k)+2*Dirac(-t+4+k)*sin(-t+4+k)+2*sin(t-4+k)*Dirac(t-4+k)-Dirac(1,t-4+k)*cos(t-4+k))/k; result:=simplify(result) ; PDEtools:-Solve(result = 0,t) assuming t::real

Error, (in assuming) when calling 'RootOf'. Received: 'expression independent of, _Z, RootOf'

 > solve(result = 0,t) assuming t::real
 >

## Maple in Social Science

Maple 2022

15º Foro de Investigación de las Matemáticas Aplicadas a las Ciencias Sociales "Reflexiones sobre Educación y Matemáticas”,

"Learning of mathematical functions using applications with Maple, for students of Social Sciences"

The students of the first cycles have a low level of learning in the subject of functions, and the arrival of the pandemic worsened the understanding of this content. Increasing the use of ICT in great magnitude improving learning.
To determine the relationship between learning and mathematical functions using applications with Maple, for students of Social Sciences. The experimental method was used using the scientific software Maple applied to students of Social Sciences.

In Spanish.

Lenin Araujo Casillo

## how to read the "originalview" or the range of x a...

I create a plot, then later on, I want to use the same view for a second plot or using the same starting x, ending x and starting y and ending y. For reasons no need to get into into, I need to do this and I have no access to this information at this time. I only have access to the p variable used to store the plot into as in this example below.

I am not sure what is the correct way to do read this information from the PLOTS structure as I never used it before.

Help describes the PLOTS structure under "PLOT and PLOT3D Data Structures" , but do not see how is one supposed to read different parts of it. I could have missed it. Maple help pages are very hard for me to read in order to obtain the information needed. From help it says:

The Maple plotting functions, plot, plot3d, and others, produce PLOT and PLOT3D data structures describing the images to be displayed.

By trial and error, for standard plot this worked

p:=plot(sin(x),x=-1..10):
op([4,1,2,2],p)


returns

"originalview" = [-0.9862500000 .. 9.9862500000, -1.0000000000 .. 1.0000000000]

I see also that command plottools:-getdata(p):  returns the data. So I could also do (it is stored in matrix, in third entry):

p0:=plottools:-getdata(p);
startingx:=p0[3][1,1];
startingy:=p0[3][1,2];
endingx:=p0[3][-1,1];
endingy:=p0[3][-1,2];



Will the above work all the time? should this command be used to obtain this information or is there a better way?

When I lprint(p) I see these fields have actual names. For example  , here is screen shot of lprint(p)

it looks like  a RECORD data structure. But when I tried p:-originalview  Error, p does not evaluate to a module

The question is: What is the correct way to find what x range and y range was used for an earlier plot, given one has access only to p variable used to store the output of the plot command?  This is for 2D plot only.

## how to set DynamicSystems continuoustimevar to so...

I have differential equation with x as independent variable that I want to convert to state space representation.

But DynamicSystems will not accept y(x) as the output variable, since it defaults to y(t).

Help under "Description of the Model of a Linear System Object" says it is possible to change the independent variable by changing continuoustimevar setting. But help does not give an example how to do this and all my tries failed.

How to do this? Attached is worksheet showing the problem

 > interface(version);

 > restart; ode:=diff(y(x),x$2)+y(x) = 0; DynamicSystems:-DiffEquation(ode,'outputvariable'=[y(x)]); Error, (in DynamicSystems:-DiffEquation) missing output(s): {y(t)}  > restart; ode := diff(y(t),t$2) + y(t) =0; sys:=DynamicSystems:-DiffEquation(ode,'outputvariable'=[y(t)]);

## why DEplot behave differently when using different...

Using t=0 .. 3*Pi the plot is truncated. Changing the 3*Pi to a number, then the full plot shows.

Also keeping 3*Pi but changing y=-1..1 to y=-1.01 .. 1.01 now the full plot shows again.

Is the above normal behaviour or it it a bug?

 > interface(version);

 > restart; ode := diff(y(t), t$2) + y(t)=0; DEtools:-DEplot(ode, y(t), t=0 .. 3*Pi, y=-1 .. 1,[[y(0)=1,D(y)(0)=0]],linecolor=blue);  > #replacing 3*Pi by a number, then it shows the full plot restart; ode := diff(y(t), t$2) + y(t)=0; DEtools:-DEplot(ode, y(t), t=0 .. 10, y=-1 .. 1,[[y(0)=1,D(y)(0)=0]],linecolor=blue);

 > #keeping 3*Pi but changing the y range, it now also show the full plot restart; ode := diff(y(t), t$2) + y(t)=0; DEtools:-DEplot(ode, y(t), t=0 .. 3*Pi, y=-1.01 .. 1.01,[[y(0)=1,D(y)(0)=0]],linecolor=blue);  > Download strange_result_of_DEplot.mw ## How can an equation be sorted by numerical value o... Asked by: I want to collect up the equation terms by the numerical value of the terms coefficient? Have tried sort collect combine... So far the best I have come up with is nops(indets(on each term). And put them in seperate lists. This still doesn't quiet do the trick. I am looking to achieve. Would to happy to have then as seperate lists or equations. (a_1^5+a_2^5...)+5(a_1^4a_2+a_1^4a_3....)+10(a_1^3a_2^2 ....)+20( .... )+......+60(a_1^2a_2a_3a_4+ a_1a_2^2a_3a_4....) Download 30-7-22_Q_sort_equation_by_numerical_coeffs.mw ## How to calculate the fractional derivative of an ... Asked by: Dear All, I have a question about "fraddiff" command to compute the fractional derivative of a function. I need to produce a procedure to manually compute Caputo fractional derivative of a function, instead of using "fracdiff", as the following: Frac_C:=proc() description "Frac_C(function,lower bound, variable (upper bound), order of differentiation)"; a:=args[2]; x:=args[3]; alpha:=args[4]; f:=unapply(args[1],args[3]); m:=ceil(alpha); return 1/GAMMA(m-alpha)*int((x-tau)^(m-alpha-1)*diff(f(tau),tau$m),tau=a..x);
end proc;

when I call the above procedure, as Frac_C(x^(3.4),0,x,3/4), Maple is not able to calculate the integral defined in the Caputo fractional derivative. However, I saw the pre-defined Maple command, namely fracdiff, is able to do.
Where is the trouble?
can anyone help me?

It is worth mentioning that I can calculate the fractional derivative of a functional by procedure "Frac_C()" when I try to use it at the given x as the following which is not desirable for me.
evalf(subs(x=2,Frac_C(x^(3.4),0,x,3/4)));
evalf(subs(x=2,fracdiff(x^(3.4),x,3/4)));

Best wishes