MaplePrimes Questions

I was trying to simplify long expression of the form    f(x)=g(x), where f(x) should simplify to be the same as g(x) and get 0=0. But Maple simplify just return the input back.

Then I wrote simplify(f(x)-g(x)) and now Maple returned 0 back.

What is the difference between simplify (f(x)=g(x)) and simplify(f(x)-g(x))? And why the second worked but not the first?

restart;
f:=(9*(x^(-2/3*a))^2*exp(6/a*(x^(-2/3*a))^(1/2))^2*_C0^2-6*(x^(-2/3*a))^(3/2)*exp(
6/a*(x^(-2/3*a))^(1/2))^2*_C0^2*a+x^(-2/3*a)*exp(6/a*(x^(-2/3*a))^(1/2))^2*_C0^
2*a^2+18*(x^(-2/3*a))^2*exp(6/a*(x^(-2/3*a))^(1/2))*_C0-2*x^(-2/3*a)*exp(6/a*(x
^(-2/3*a))^(1/2))*_C0*a^2+6*(x^(-2/3*a))^(3/2)*a+x^(-2/3*a)*a^2+9*(x^(-2/3*a))^
2)/(3*_C0*exp(6/a*(x^(-2/3*a))^(1/2))*(x^(-2/3*a))^(1/2)-exp(6/a*(x^(-2/3*a))^(
1/2))*_C0*a+3*(x^(-2/3*a))^(1/2)+a)^2:

g:=x^(-2/3*a):

And now

simplify(f=g);

But

simplify(f-g);

                                                           0

And

simplify(f-g=0);

                 0 = 0 

Why Maple behaves like this? I did not know it makes difference if one writes f=g vs. f-g in terms of simplification. 

I copied the code to Mathematica to see how it behaves, and Mathematica Simplify worked on both f=g and also on f-g as one would have expected:

 

Maple 2020.2 on windows

 

I need to label the roots, extrema, and inflection points of this function I have, of which there are six in total. The official help pages didn't seem to have anything on labelling individual points of a plot, and the only relevant question in the forums I could find pertained to labelling one point, not several. Thank you for your help.

I have a procedure for calculating flow through a control valve and part of the calculatiion requires an interative solution if the Reynolds number is less than 10000.  I wrote a little proc in Maple to house the calculation and then I am trying to call it from fsolve.  One of the conditions in the calculation is hat if the Re >= 10000 then just exit and return the input since no correction is necessary.  However, I can't get the Reynolds number to evaluate in the condition Reynolds >= 10000 it keeps returning this error.

Error, (in ValveLaminarMassFlow_proc) cannot determine if this expression is true or false: 10000.0 <= 8848.331994*x
 

where x is an input parameter in the procedure call.

I have tried everything I could think of and I just have to give up and I would appreciate any help with this.

 

fsolve_if_then_not_evaluating_in_proc.mw

Loading a package and using a member with single quotes leads Maple to display the package name, for example

with(IntegrationTools):
Int(f(x), x):

'Change(%, x=1/t, t)'; 
                                     /
                                    |
          IntegrationTools:-Change( |  f(x) dx, x = 1/t, t)
                                    |
                                   /

Is there an easy way to avoid the display of the package name in such a command?


Moreover I sometimes use eval(foo) to display a (former) definition of a function foo and then also the package name is printed (which I do not always want to see) if it was used in the definition.

For the last hr, I've been trying to find out why Maple solve was hanging inside one module in my .mla when called.

I would try the same code in new worksheet, no hang. I had timelimit on it. Same exact code as in the module.

I go back to the other worksheet, do restart, call the module (after loading the library by setting libname) which calls solve(), and it hangs. Each time.

I tried may be 10 times. No difference between the code in the mla and the other worksheet where I had copy of the solve command. All other settings are the same. 

ONLY after I closed Maple, and restarted Maple, and opened the worksheet where the call used to hang, and called the module again, now it did not hang and solve completed.

This is not the first time I've seen such a strange thing. Sometimes Maple will hang for hrs (I start  a test, go to sleep,. wake up hrs later, and see maple hanged for hrs from the time stamp).

Closes Maple, start the test from where it was hanging, and now no hang. It runs OK from then on.

This tells me that doing just restart from the worksheet do not clean everything. (I use the command restart, not by pressing the restart button in the menu, not sure if these are different, they should be the same  I would think).

I've seen this problem before. sometimes the test just hangs. No matter how many time I do restart from the worksheet, it just hangs. When I restart Maple, it works from same place it was hanging.

My question is, what could possibly make Maple not hang when starting fresh. vs. using the restart command?  I am using the same worksheet, and I have "create new engine for each document" selected in options.

The hang used to happen in solve, in here

#this is inside a function inside a module inside .mla library
#

eq:=x = 1/2/(p^2+2)^(1/8)*2^(1/2)*((1+(-4*p^2+1)^(1/2))/(1/(4*p^2-1)*p^2)^(1/2)/(-4
*p^2+1)^(1/2))^(3/4)/(((-4*p^2+1)^(1/2)+3)/(p^2+2)^(1/2))^(1/4)*_C1*p^(1/4);

        try               
            sol_p:=timelimit(20,[:-solve(x=rhs(eq),p)]);
        catch:
           return [];
        end try;
#hangs here. Never completes. Only when starting Maple the hang is gone. 

#trace below
......
Main: polynomial system split into 1 parts under preprocessing
Main: using RegularChains based methods
SolverVariableOrder: using the variable order  _S000008 > _S000011 > _S000009 > _S000006 > _S000005
TriangularDecomposition: using deterministic algorithm for decomposition
<<<< HANGS HERE EACH TIME >>>>

Again, only when I restarted Maple, did the hang go away. it is one equation solving for one variable.

So now, I get into the habit of closing all of Maple and starting it again when I get a hang. I do not trust restart command any more to clear everything.

Any idea why this happens? Memory not cleared somewhere? Cache problem? Does the frontend itself stores something that could cause this? does restart use new mserver.exe each time or same mserver.exe process as last time?

if restart does not actually terminate the mserver.exe that the worksheet was talking to, but only sends request to mserver.exe to clear its own memory, this could explain things.

It is possible that mserver.exe which is attached to that worksheet does not fully clear all its own memory and something remain there which affects why it hangs in same place each time, even though restart was issued each time, and only when restarting Maple itself will clear this and the hangs goes away.

 

 

 

Is there a way in Maple to extract the indices themselves?

Example:

node [2,3,5]: = 7

 I want is to be able to obtain the number 2, 3 and 5 separetly.

Thanks.

 

I am using Maple's CodeTools[Usage] to check memory measurement for a few lines of code i have.

One line is calling a custom function and the usage reports ~16 GB usage, the other line is a Groebner Basis computation and reports ~200 MB of memory usage. The usage is reported via 'bytesused' flag in the CodeTools[Usage] input.

However, GNU time command returns 6 GB total for the whole code iteration. Why is there such a discrepancy? Does maple's bytesused mean something different than GNU time's max resident set size?

When asking dsolve to use specific ode type to solve an ode, in particular, dAlembert type, which typically generate complicated solutions, sometimes dsolve solution shows up using parameter T.

But odetest gets confused by this expression it seems. I am not able to figure if I am doing something wrong in using odetest, or may be odetest does not know how to handle such form of a solution.

Here is an example. This ode

is of these types:

restart;
ode:=diff(y(x), x) = (y(x)^3 + 2*x*y(x)^2 + x^2*y(x) + x^3)/(x*(y(x) + x)^2);
DEtools:-odeadvisor(ode);

By default, dsolve was smart to use homogeneous type to solve the ODE, as this gives the simplest solution. 

One can force dsolve to use the other types. When using dAlembert, odetest gives an error trying to verify any one of the solutions returned from dsolve due to the way the solution is returned. Here is the result

restart;
ode:=diff(y(x), x) = (y(x)^3 + 2*x*y(x)^2 + x^2*y(x) + x^3)/(x*(y(x) + x)^2);
sol:=[dsolve(ode,y(x),[homogeneous])];

No problem here for odetest. it can verify any of the above 3 solutions with no error generated.

odetest(sol[1],ode)

          0

Lets compare using dAlembert type

restart;
ode:=diff(y(x), x) = (y(x)^3 + 2*x*y(x)^2 + x^2*y(x) + x^3)/(x*(y(x) + x)^2);
sol:=[dsolve(ode,y(x),[dAlembert])]: #solution too complicated to show here
odetest(sol[1],ode)

 

It looks like odetest does not know how to handle the form of the solution as returned by dsolve for this case. The problem is that each solution is actually made up of two parts, not just y(x) as normally is the case. One part defines something called X(T_) and the next part which is the solution y(x) uses this X(T) in it. 

Did I do something wrong, or is there a way around this, or is this by design?

Maple 2020.2

a^(5/2)*s^2*(D(f))(eta)^2*sqrt(nu)/(R*sqrt(a)*sqrt(nu)+eta*nu) = a^(5/2)*s^2*(D(P(s, eta*sqrt(nu)/sqrt(a))))(eta)/sqrt(nu)

 

Is it possible to rearrange the above equation for D(P)(eta)

Hi, i'm new on this site. I want to know how to set an output un-scientific number but we can set the number of digit "after comma" as we want? 

The best i can do is using this:

printf("%f\n",something)

So, for example i want to calculate 

123456789/123

It gives me:

1003713.732000 (only gives 6 digits after comma)

I don't want the output looks like this:

But, for example i want the result has 9 digits after comma and gives me:

1003713.731707317

How to do this? Please help me. Thanks.

Hello everyone,

I should solve the diffusivity equation using Maple. The equation and BSc are as follow: 

pde := W*diff(C(z, t), z $ 2) - diff(C(z, t), t $ 1) = 0

bc[1] := C(x, 0) = 0;
bc[2] := D[1](f)(0, t) = VMK*D[1](f)(t)/ZRTWA;
bc[3] := C(infinity, t) = 0;

The equation should be solved using Laplace method. Can anyone please help me ?

I will appreciate your insightful comments.

 

using the Physics package version:

Physics:-Version();                                                                                                                                                   
  The "Physics Updates" version in the MapleCloud is 899 and is the same as the version installed in this computer, created 2021, January 2, 19:51 hours Pacific Time.

 

I end up with:

Latex:-Settings(useimaginaryunit=i,
      usecolor = false,
      powersoftrigonometricfunctions= computernotation,
      leavespaceafterfunctionname = true,
      cacheresults = false
);

resluting in an error:

Error, module does not export `ModuleApply`

 

Maybe some changes in the interface in the latest version?

thanks

 

 

 

Hello there, 

First of all, happy new year to you and those around you!

One question: would you teach me how to replace the 'Zs/Z_AB' expression in the last term of the expression 'eq_5_m5'?

In other words, I wanted to see the 'desired' expression, but the 'subs()' command repalced the first occurance of the 'Zs/Z_AB' expression. 

(Perhaps, this applet behind of this edit box does not like the Microsoft Edge browser)

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/Q20210103.mw .
 

Download Q20210103.mw


Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/Q20210103.mw .

Download Q20210103.mw

 

here is my try

for ploting points of data ( d(n(, sum(n))

new.mw

First 335 336 337 338 339 340 341 Last Page 337 of 2308