C_R

3412 Reputation

21 Badges

5 years, 317 days

MaplePrimes Activity


These are replies submitted by C_R

Why it did not work:

The left hand side in

(seq('L'[q,  q+1] , q=1..2)) := (0 $ 2);

is resolved to a name but not evaluated to a sequence of Matrix elements.

 

@acer 
Thank you for the detailed reply. I tried to print the operators to see if there is any explict declaration of local variables but instead found interesting differences in attachment 2 and 3 of the first answer from you

 

I don't know if this gives a hint why the above call to fsolve did not work as the call to Maximize did.

@acer 

Among all the things I tried I did not put evalf inside the operator definition. Makes sense now.

What I do not understand is the change of variable names y=Y. Why is

F := y->evalf(Int(unapply(op(1,ig),x),rhs(op(2,ig))));

not working (I tried this as well).

I tried also nested operators which I see at last work.

As always, thank you

Update: In older versions of Maple for the search term `if`a help page is returned that explains `if`. 

https://www.mapleprimes.com/questions/237503-Sum-Of-Proper-Divisors-Procedure#comment298929

@acer 

This one is better but requires special definitions which I try to avoid AMAP. It also requires knowledge of Maple language I do not have.

Am I right that "op" in combination with the statement operator ":" is not documented (in newer versions of Maple)?

In Maple parlance, what kind of operator do you define? I can't find anything on inert operators. Is it unary and/or neutral? According to whatype, N is a procedure (without the use of a proc statement for the definition of N).

What makes it hard to understand is the use of the dito operator %, which can be used followed by exactly one of these characters: + - * . / ^ according to ?neutral.

@Preben Alsholm 

Thank you for both informations.
The first is something I have probably overlooked on the functional operator help page. Maybe it is what the last bullet point want's to adress.

The second is very interesting. It looks to me like the if help page has been updated and now `if` is no longer easy to find (for whatever reason). Kind of a regression.

@Preben Alsholm 

I changed for clarity to ifelse and for the fact that `if` is not searchable in Maple 2023 help system. I could not check for versions that old.

I assume that older versions do not issue the warning about local declaration of i (which I could not turn off in the function definition).

but not really better because it is less clear what the code does.

f:= k -> add({seq(ifelse(floor(k/i)=k/i,i,0),i=1..k-1)});
f(945);

The snippet above creates the set of divisors and adds them up. 

If you are more interested in other ways than in sharing consider asking a question. (A moderator can convert your post to a question if you want).

@acer 

Thank you for the workaround. In the meantime I found annother case where I get an emtpy plot. I will make a software change request that Maplesoft can have a closer look (and use pointplot to keep the units).

@acer 

Reading your explanations, I was wondering whether the int option “continuous” could have a positive effect on the computation time in cases where Maple invests time in analyzing expressions for discontinuities. I rather see the opposite on my original plot statement (this time without evalf): 

int(1/2*erf(1/2*sqrt(r__mx^2 - x^2)*sqrt(2)/sigma)*exp(-1/2*x^2/sigma^2)*sqrt(2)/(sqrt(Pi)*sigma), x = -r__mx .. r__mx);
int(op(%), continuous = true);
CodeTools:-Usage(plot(subs(sigma = 1, %), r__mx = 0 .. 10, numpoints = 10));

If I could ask a follow-up question, why don't equivalent integrals with units plot in the attachment below?

Gaussian_integration_ac_mov_pdf.mw

@acer 

Thank you! Is there an explanation why, inside a plot statement, the normal way of evalf(Int(...)) did not work?

@sand15 

Thank you for the background. I take this as "a probably not possible" by standard methods even for the simple looking integral.

I will go numeric.

You can find here a discussion on solving PDE's and a very nice video from R. J. Lopez on the topic. 

There is also an ebook that has a chapter on solving PDEs with Maple.

Would a pulley with slippage (i.e. with friction) and cable componets (see below) be sufficient to model the hole-cable contact? 
If not, please provide more details on the hole-cable contact.

@Anthrazit 

What does the newly introcuded print layout mode show? Is it also much too big?

Can you clarify print to pdf Maple and print ot pdf Wor.d? I do not have those.

Can you provide an example worksheet?

First 36 37 38 39 40 41 42 Last Page 38 of 67