MaplePrimes Questions

Hi all,

I am trying to plot in semilog scale a function involving products of exponential integrals and complex exponentials. For small and moderate values of the argument, the plot is well shown. However, for larger values the plot shows strong fluctuations. I was wondering how one can deal with such a problem. Any help is highly appreciated.

Please refer to the attached script for the functio of interest.

Thanks
F

 

Question.mw

I understand that if I want to use a scientific constant in a Maple worksheet or document, I first have to declare it. Here is an example for the speed of light:

However if this worksheet is re-executed (e.g. using !!!) this happens:

Obviously there is a kind of recursion for c which is listed in the Variable Palette as a name for a variable but which is also the scientific constant. The problem can be solved e.g. by associating another name to the constant and unassigning the old definition in the Variable Palette:

This works but it makes the document harder to read since everybody is used to lowercase c for the speed of light. The same is of course true for other scientific constants.

Is there a way to use scientific constants in their "usual" notation in Maple, including using the unit of the constant?

Dear all!.       

I have an expression with ramdom variables. Can i use NLP to optimize it?. In this case, does Maple take the histogram of theses ramdom variables?. Thank!!!

What is the difference between the Expression Palette and the Layout Palette? First I thought that the Layout Palette is supporting the entering of names with e.g. sub- and superscripts, but I learned (the hard way) that the templates of the Layout Palette are "mathematically active".

What is the meaning of the colours green and violett in both palettes?

 Dear All ! 

I really need to solve this problem as soon as possible, As you know the downside equation is not exact, but I can not find its integration factor, blease help me !

                                                                 ∫{ ( ωx + σy ) d x + (ωy −σx)dy}=0

 Regards ,

 

 

Hi, so I am a newbie with simulation on maplesim. I've made a simulation of the lower part of a humanoid robot and I attempt to input angles to the joints from an excel file.

However, after adding my file .xls to the data set and linking it to a time lookup table, I get this error:

unable to store Time when datatype=float[8] Main

Havent installed any add-ins, I am working with excel 2007, Maplesim 6.4 and Maple 18.

Any insight on the problem would be of great help.

Thank you

Hi everybody, 

I generate random variables of the form X__E__n, n=1..N where N is assigned to some integer value (the double index is not a crucial point for the issue already appears with a single level of index).
Next I want to express a likelihood based upon these random variables in two different ways : a very symbolic one which uses the function "Product" an a second one that uses "product".

My problem is that I can't obtain the desired expressions.
As "Product" returns me a completely satisfactory expression, "product" (as I use it) refuses to return me the desired expression.

Without doubt this is due to a poor knowledge of the detailed way Maple proceeds to evaluate indices in seq, sum or product.
All explanation will be largely appreciated.

Thanks in advance

 

Download WhatHappensHere.mw




I'm trying to make 3D-animation and the procedure takes an enormous amount of time to make frames for it. It took over 10 minutes to create animation consisting of 50 frames (over t=0..1000). If I increase the number of frames or range of time, it just wouldn't reach the end of calculation (keeps evaluating till I lose patience or my faith in Maple)

Is there a way to somehow precompute data for animation (maybe store it somewhere) so that it could gather it from there and the animation construction itself would be faster?

Here's the code: ClassicalTrajectoriesH2X_harm.mw (animation is in the end of the file)

P.S. I have Asus X555LJ; Intel Core i5-5200U, 2.2GHz; 12Gb RAM, for the last few months it presented itself as a rather fast piece of machinery. 

Hello everybody,

I need help to increase the speed of two procedures.

My first (recursive) procedure returns a list of all k - element subsets of a given set {1, ... , n}:


nkSubSetList := proc(n :: nonnegint, k :: nonnegint)
        option remember;          # boosts with factor 5
        local X, prev, nextOne;

        # Local function that augments a nonnegint to a given set, e.g.
        local augment := (SetA, intm) -> {op(SetA), intm};

        # Case k > n allowed & needed for recursive call
        if n < 0 or k < 0 or k > n then
            X := {};
            return X
        elif n = 0 or k = 0 then
            X :=  [{}];
            return X
        else
            prev := nkSubSetList(n - 1, k);
            nextOne := map(augment, nkSubSetList(n - 1, k - 1), n);
            return [op(prev), op(nextOne)]
        end if;
end proc:

# Starting the Profiler on my system the call nkSubSetList(20, 10) needs 0,5 sec.
The other algorithm returns a list of all k-element subsets of a given set T:

TkSubSetList := proc(T :: set(posint), k :: nonnegint) :: list(set(posint));
    local n := nops(T);                                 # Cardinality of index set T
    local callSet := A -> map(i -> T[i], A);     # Call the i-th entry of the given set T

    # Input ASSERTS
    ASSERT(k <= n, "k is bigger than the cardinality of index set T");

    return map(callSet, nkSubSetList(n, k));
end proc:

# Starting the Profiler on my system the call TkSubSetList({1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}, 10) needs 1,8 seconds.

Who have an idea how to increase the speed of these algorithms?

Can somebody of Maple users execute the following command

restart; pdsolve({diff(w(x, y, z), x)+diff(w(x, y, z), y, y)+2*(diff(v(x, y, z), x)-(diff(u(x, y, z), y))-2*w(x, y, z)) = diff(w(x, y, z), z, z), 3*(diff(u(x, y, z), x, x))+2*(diff(u(x, y, z), y, y))+2*(diff(v(x, y, z), x, y))+2*(diff(w(x, y, z), y)) = diff(u(x, y, z), z, z), 3*(diff(v(x, y, z), y, y))+2*(diff(v(x, y, z), x, x))+2*(diff(u(x, y, z), x, y))-2*(diff(w(x, y, z), x)) = diff(v(x, y, z), z, z)}, {u(x, y, z), v(x, y, z), w(x, y, z)})

restart; pdsolve({diff(w(x, y, z), x)+diff(w(x, y, z), y, y)+2*(diff(v(x, y, z), x)-(diff(u(x, y, z), y))-2*w(x, y, z)) = diff(w(x, y, z), z, z), 3*(diff(u(x, y, z), x, x))+2*(diff(u(x, y, z), y, y))+2*(diff(v(x, y, z), x, y))+2*(diff(w(x, y, z), y)) = diff(u(x, y, z), z, z), 3*(diff(v(x, y, z), y, y))+2*(diff(v(x, y, z), x, x))+2*(diff(u(x, y, z), x, y))-2*(diff(w(x, y, z), x)) = diff(v(x, y, z), z, z)}, {u(x, y, z), v(x, y, z), w(x, y, z)})

Error, (in simplify/normal) Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

 

 

in Maple 2016.1.1 on a powerful comp and report the obtained result as an answer to the question?
 That would be very kind of her/him. Thanks in advance. 

Download pdsolve.mw

I have a system of pde as follow,

PDE := [(x*y+1)*(diff(f(x, y), y, y, y))+(x+(3/4)*f(x, y))*(diff(f(x, y), y, y))-(1/2)*(diff(f(x, y), y))^2+T(x, y) = (1/4)*x*(diff(f(x, y), y))*(diff(diff(f(x, y), y), x))-(1/4)*x*(diff(f(x, y), x))*(diff(f(x, y), y, y)), (x*y+1)*(diff(T(x, y), y, y))/(.733)+(x/(.733)+(3/4)*f(x, y))*(diff(T(x, y), y)) = (1/4)*x*(diff(f(x, y), y))*(diff(T(x, y), x))-(1/4)*x*(diff(f(x, y), x))*(diff(T(x, y), y))]


sys_ode := diff(g(y), y, y, y)+(3/4)*g(y)*(diff(g(y), y, y))-(1/2)*(diff(g(y), y))^2+h(y) = 0, (diff(h(y), y, y))/(.733)+(3/4)*g(y)*(diff(h(y), y)) = 0

ics := g(0) = 0, h(0) = 1, (D(g))(10) = 0, g(10) = 0, h(10) = 0

sol2 := dsolve([sys_ode, ics], numeric)

BC := {T(0, y) = h(y), T(x, 0) = 1, T(x, 10) = 0, f(0, y) = g(y), f(x, 0) = 0, f(x, 10) = 0, (D[2](f))(x, 0) = 0}

pds := pdsolve(PDE, BC, numeric)

module() ... end module

pds:-plot(T, y = 0 .. 10, x = 0);

Error, (in pdsolve/numeric/plot) unable to compute solution for x<HFloat(0.0):
solution becomes undefined, problem may be ill posed or method may be ill suited to solution

When I try to use the solution of the Ode as the boundary condition for PDE, by subbing g(y) and h(y) into BC. The plot returns me the error. Anyone knows the reason behind this and how to solve? Any help would be really greatly appreciated. Thanks

I'm trying to numerically integrate components of the procedure-vector.

interim:=t->evalf(int(r1_lab_deriv(x)[1],x=0..t));

interim(5);

Getting this type of error:

Error, (in r1_rot_deriv) invalid input: fdiff expects its 2nd argument, N, to be of type {integer, name, list(integer), list(name), list(name = constant), set(name), set(name = constant), name = constant}, but received t = x

 A bit of googling gave me an impression that integration of procedures can be rather quirky.

File: ProcIntergration.mw (Problem occurs in the last lines of the file.)

I am learning how to use Maple with boundary value ODE. Given this ODE

y''''(x)+ lam* y(x) =0

with some B.C., say  y(0)=0,y'(0)=0,y''(L)=0,y'''(L)=0, where L is length.

I can't figure the correct syntax to use. It seems Maple do not like the syntax I am using, but it works on a second order ODE?

Here is my attempt:

restart;
assume(lam>0); assume(L>0);
bc:=y(0)=0,D[1](y)(0)=0,D[2](y)(L)=0,D[3](y)(L)=0;
dsolve({diff(y(x),x$4)+lam*y(x)=0,bc},y(x));

Error is 

Error, (in evalapply) too few variables for the derivative with respect to the 2nd variable
Error, (in dsolve) found the following equations not depending on the unknowns of the input system: {bc}

But on a simpler second order ODE, the syntax works

restart;
assume(lam>0); assume(L>0);
bc:=y(0)=0,D[1](y)(0)=0;
dsolve([diff(y(x),x$2)+lam*y(x)=0,bc],y(x));

No error. 

Is the syntax I am using in first example wrong? what would be the correct syntax? I googled for long time, and can't find one example that shows how to use BVP with higher order ODE. I am Maple newbie.

 

hi i have this code that doesnt work and I cant find the problem. I cant make the matrix include more than 2 rows. i want this to give me the whole nxn matrix, and then the solution to the wronskian. 

can you pls help?:) thanks! 

with*linalg;
funcs := [x, 3*x, x^2, 5*x];
n := nops(funcs);
print*n;
printlevel := n;
count := 1;
listM[count] := funcs;
for i from 2 to n do listN := diff(funcs, `$`(x, i-1));
count := count+1;
listM[count] := listN end do;
M := convert(listM, matrix);
det(M)

how to fasten dsolve and is it possible to timeout faster if it know no solution earlier?

i split into near 500 blocks of nested for loop, total around 42 billions trials

i run in cmaple, 

i see it run the first 4 blocks of code and output to files,  which are daff001, daff002, daff003 and daff004

it seems that it can run parallel intelligently though i write in serial lines.

but it run a very long time, still running near first 4000 records

window 10 use 3.4GB memory, only 4GB memory rest

but 4000 records use more than 4GB memory

i just hope to run 1000 records every day, hope 1000 records can be finished within a few hours

and plan to run around 500days

 

restart:
read "D:\\daff2039mm.m":
with(combinat):
appendto("D:\\daff001.txt");
for ii from 1 to 1 do
for jj from 1 to 1 do
for kk from 1 to 1 do
if ii < jj and jj < kk then
if mm[ii] <> mm[jj] and mm[jj] <> mm[kk] then
sol := dsolve([mm[ii] , mm[jj] , mm[kk] ],[a(t), b(t), c(t)]);
if nops([sol]) = 1 then
print([mm[ii], mm[jj], mm[kk]]);
print(sol);
print(" * **");
end if:
end if:
end if:
od:
gc();
od:
od:

restart:
read "D:\\daff2039mm.m":
with(combinat):
appendto("D:\\daff002.txt");
for ii from 1 to 1 do
for jj from 1 to 1 do
for kk from 1 to 1001 do
if ii < jj and jj < kk then
if mm[ii] <> mm[jj] and mm[jj] <> mm[kk] then
sol := dsolve([mm[ii] , mm[jj] , mm[kk] ],[a(t), b(t), c(t)]);
if nops([sol]) = 1 then
print([mm[ii], mm[jj], mm[kk]]);
print(sol);
print(" * **");
end if:
end if:
end if:
od:
gc();
od:
od:

restart:
read "D:\\daff2039mm.m":
with(combinat):
appendto("D:\\daff003.txt");
for ii from 1 to 1 do
for jj from 1 to 1 do
for kk from 1001 to 2001 do
if ii < jj and jj < kk then
if mm[ii] <> mm[jj] and mm[jj] <> mm[kk] then
sol := dsolve([mm[ii] , mm[jj] , mm[kk] ],[a(t), b(t), c(t)]);
if nops([sol]) = 1 then
print([mm[ii], mm[jj], mm[kk]]);
print(sol);
print(" * **");
end if:
end if:
end if:
od:
gc();
od:
od:

restart:
read "D:\\daff2039mm.m":
with(combinat):
appendto("D:\\daff004.txt");
for ii from 1 to 1 do
for jj from 1 to 26 do
for kk from 2001 to 2001 do
if ii < jj and jj < kk then
if mm[ii] <> mm[jj] and mm[jj] <> mm[kk] then
sol := dsolve([mm[ii] , mm[jj] , mm[kk] ],[a(t), b(t), c(t)]);
if nops([sol]) = 1 then
print([mm[ii], mm[jj], mm[kk]]);
print(sol);
print(" * **");
end if:
end if:
end if:
od:
gc();
od:
od:

restart:
read "D:\\daff2039mm.m":
with(combinat):
appendto("D:\\daff005.txt");
for ii from 1 to 1 do
for jj from 26 to 51 do
for kk from 2001 to 2001 do
if ii < jj and jj < kk then
if mm[ii] <> mm[jj] and mm[jj] <> mm[kk] then
sol := dsolve([mm[ii] , mm[jj] , mm[kk] ],[a(t), b(t), c(t)]);
if nops([sol]) = 1 then
print([mm[ii], mm[jj], mm[kk]]);
print(sol);
print(" * **");
end if:
end if:
end if:
od:
gc();
od:
od:

First 1064 1065 1066 1067 1068 1069 1070 Last Page 1066 of 2428