Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi

This Carl Code evaluates fine

MySumP:= (j::integer)->
    seq(combinat:-numbcomb((j+10),(i+10))*p^(j+i)*(1-p)^(j+i), i= 0..0);
:[MySumP(10)]


[184756*p^10*(1 - p)^10]

But what I would like is whats inside the numbcomb argument to be displayed.

i tried

MySumP:= (j::integer)->
    seq(combinat:-numbcomb(``(j+10),``(i+10))*p^(j+i)*(1-p)^(j+i), i= 0..0)
:

[MySumP(10)]

What i would like displayed: numbbomb(20,10)*p^10*(1-p)^10 or (better) C(20,10)*p^10*(1-p)^10

Hi,

Is there any way we could use Maple to simplify an equation,

Example: M= 2pqrst / uvw 

I would like a code or a way to separate some variables into one variable, where the expression would be M = 2Krst / w

which can be said that K = pq / uv

I know that I can use the simplify command but it's only worked for simpler expression but not complicated one.

Really need help from you guys. 

 

Thank you :)

How can I define and solve an ordinary differential equation with a random input (random inhomogeneous part)?

d2X(t)+c*dX(t)+k*X(t)=F(t)

where f(t) is a random function with normal distribution.


I tried to simplify it, but It didn't work that well.

simplify(%)

 

I always feel that this formula can be further simplified, but there is no way to start. Of course, My thoughts maybe incorrect. maybe this is the simplest form.

 

 

 

 

 

 

For last 4 hrs, I've been chasing this problem.

Inside a module, there is a proc with a name say foo().

It is local to the module. When creating an .mla file that contains this module which was read from .mpl file, and running a test against it, Maple does not see this specific proc foo() as a proc, but only sees it as a symbol.

So the call to foo() never happens (error is generated).

I have a print statement inside foo() also which never prints. In the debugger, when I try to step into foo(), it fails also. Maple simply does not see it as a proc.

I also added my_module:-foo() in call, but this made no difference, even though it is not needed to prefix the module name, since foo is a local proc.

Now, instead of making an .mla, I now just read the .mpl file directly which make up the module. And now run the same test, and now maple see foo() as proc and the test runs with no error.

No change in the code at all. Nothing changed, exacept the test is called one time when package is inside the .mla vs. just using plain .mpl files.  The module has option package on it.

It seems something goes wrong with symbol table when inside mla file.

When I do 

libname := currentdir(), libname;
LibraryTools:-Browse()

And browse the content inside my mla file, I see no problems, it lists all 24 procs inside the package, and I can see foo listed there as type PROC.

But in the code, what printing whattype(foo)  it says it is symbol when using mla file, but it says it is a procedure when not using mla, but just by reading the .mpl file which went into the .mla

I will try to make an example to reproduce this if I can. But has any one seen something like this before? What could cause this?  I've restarted Maple ofcourse, and this made no difference.

The way I build the mla is

FileTools:-Remove(cat(currentdir(),"/my.mla"));
LibraryTools:-Create(cat(currentdir(),"/my.mla"));

read cat(currentdir(),"/my_module.mpl");
LibraryTools:-Save('my_module',"my.mla");

For now, I will stop using .mla and just read the .mpl file each time to use the code, as this seems safer and this always worked and never gave any problems.

The code is large. I also use database. So I am not sure I can make a small example but will try.  

I am using 2020.1 on windows 10.

I am not able to use Maple's map() to do the following. Given 2 lists of things (of equal length), map a function that take 2 arguments, from these 2 lists, in order.  Here is an example to illustrate. In Mathematica

a = {1, 2, 3}; b = {7, 8, 9};
MapThread[f, {a, b}]

           {f[1, 7], f[2, 8], f[3, 9]}

In Maple, I tried map and map2, map[n] etc.. not able to get the result I want. I want to use map, and not ~

A:=[1,2,3];
B:=[7,8,9];
map((x,y)->f(x,y),A,B)

          [f(1, [7, 8, 9]), f(2, [7, 8, 9]), f(3, [7, 8, 9])]

 

map[2]((x,y)->f(x,y),A,B)

           [f([1, 2, 3], 7), f([1, 2, 3], 8), f([1, 2, 3], 9)]

and other things.

How to get same result as MapThread, using map?

In your answer, please include the calculation of the lamina's area and the location of its centre of mass.

Lamina.mw

Why doesn't this do the symbolic summation? Is there a way to get Maple to do it?

sum((-1)^n / n * x^n, n=1..infinity);

I have an expression  

product(q^(n -2)- q^i, i = 0 .. r )/product(q^(n-2) - q^(i+1), i = 0 .. r)

 

Obviously, it can be further simplified.

But in maple I can't do that, I use simplify and expand , all failed.

simplify(expand(%))

What should I do to get the simplified result I want?

 

Dear All,
I want to learn to work with Thread[Task] packages in Maple.However, I am confused when I studied the Help of Maple about. I can’t find out the Start and Continue command in the package. I can’t execute any simple program by Threads [Task]. The help of Maple has an example of the following:
with(Threads[Task]);
cont := proc( a, b )
   return a + b;
end proc;      
task := proc( i, j )
   local k;
   if ( j-i < 1000 ) then
       return add( k, k=i..j );
   else
       k := floor( (j-i)/2 )+i;
       Continue( cont, Task=[ task, i, k ], Task=[ task, k+1, j ] );
   end if;
end proc;
Start(task, 1, 10^7);

I want to remove if-clause in task procedure as the following. In the other words, I want to use multi-threads for any values of i and j. However, the program doesn’t work correctly. What hint is something I don’t correctly understand?

Besides, I may don’t find deeply out the meaning and deference of parent, leaf, child, and continuation tasks. would you explain to me those tasks easily? The help of Maple doesn't convey a unified explanation for them.
 
Please guide me to overcome the problem.
Best wishes,
 
with(Threads[Task]);
cont := proc( a, b )
   return a + b;
end proc;      
task := proc( i, j )
   local k;
        k := floor( (j-i)/2 )+i;
       Continue( cont, Task=[ task, i, k ], Task=[ task, k+1, j ] );
end proc;
Start(task, 1, 10^7);

We tryto  find a solution to the differential equation f'(x)=f^(-1)(x).

I just noticed that Maple 2020.1 (but not plain 2020) has an issue with print to PDF if you have a plot3d on a page.

Anything after the plot3d output on the same page of the PDF file is simply not shown.

The issue seems to be with both Windows and Mac which makes me suspect its a Maple problem.

Any info on this? Any workarounds? We have students with written exams in a week so its a bit annoying.

Hi everyone...

How can anyone help me in the attached file? I want to know how the equation of the system turned into a dimensionless

dynamical system?

 

 

I did not know about these before. Was looking at 

https://fr.maplesoft.com/support/help/Maple/view.aspx?path=repository/management

And wanted to display the actual values of $MAPLE,$TOOLBOX, $VERSION,$HOME gives about. 

But everything I tried does not work. 

anames('environment');
getenv("$MAPLE");
print("$MAPLE/toolbox/$VERSION/$TOOLBOX/lib")

Where are these things defined and how to display them from inside Maple to see where they point to?

 

Maple 2020.1 on windows 10

 

dAlembert ode has the form

https://fr.maplesoft.com/support/help/Maple/view.aspx?path=odeadvisor/dAlembert

Which also agrees with textbooks and Wikipedia

 

https://en.wikipedia.org/wiki/D%27Alembert%27s_equation

 

 

So the ODE should have   x  in there (the independent variable).  

Then why  in the following, when I give Maple ode of form   y=f(p)+g(p)  it says it is d'Alembert? notice that there is no x in there

restart;
ode:=y(x)=ln(cos(diff(y(x),x)))+diff(y(x),x)*tan(diff(y(x),x))

DEtools:-odeadvisor(ode)

I am not saying Maple is wrong, as I am not sure, but I am just trying to understand what is going on. All references I've seen so far say x should be there.  Otherwise, how did Maple determine it is dAlembert if not using the orginal form to check against?

The strange thing is calling dsolve on the ode, with no option gives different answer if calling dsolve telling it is is dAlembert:

dsolve(ode,[dAlembert]);

but

dsolve(ode)

Why it did not give the same result? 

 

First 391 392 393 394 395 396 397 Last Page 393 of 2097