Carl Love

Carl Love

26513 Reputation

25 Badges

11 years, 190 days
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity

These are replies submitted by Carl Love

I have often had a phenomenon very similar to this occur on my display screen, not in a PDF export (which I don't use often): Minus signs become K, plus signs become C, and there's a few other such changes that I can't remember the characters for. This happened many times for me, but it stopped about 2 years ago. When it happened, it would simultaneously affect all open worksheets. The errors are only on the display, not in the saved versions of the worksheets, so it's safe the save all worksheets and close and restart the entire Maple session, which is the only thing that seemed to fix the problem.

@sija Can you describe the larger actual problem that you're trying to solve? Can you describe it with just words and ordinary (i.e., not necessarily computer code) mathematical expressions?

@Jamie128 To specify partial derivatives, put an index on the D that specifies the position(s) of the differentiation variable(s) within the argument sequence of independent variables. For example, suppose that you intend use (x,y) as the independent variables and you want the 1st derivative wrt y. Then do

L:= D[2]~(lis):  convert(lis(x,y), diff)

For the 2nd derivative wrt x, use D[1,1]. For the mixed partial wrt x and y, use D[1,2]. Remember that the order of the partial derivative is given implicitly by the number of numbers in the index. The numbers themselves specify the variables' positions in the argument sequence.

@Rouben Rostamian  @Preben Alsholm I modified my procedure to first make use of any existing numerically specified VIEW in the PLOT structure, and to proceed with the plottools:-transform process only if such a VIEW isn't found. The new procedure is in the Answer above. Using the new procedure, I get

Please check that this works in Maple 2024 with the various adaptive values.

@Preben Alsholm Hmm, that was the very first example that I tested. Using Maple 2023.2, I get the plot below. What do you get?

I'd do this:

    f[1](x), x= -5..5,
    legend= typeset("function ", convert(f, `local`)[1](x))

@Carl Love The above Answer is doing that taking-forever-to-submit thing that I described a few days ago. This Reply is just to increment the Replies counter and update the Last Action time.

@Joe Riel The problem with directly using the view option as you propose is that the OP wants to use the automatically generated VIEW option if its y-component includes 0. And if it doesn't include 0, the OP wants to enlarge it only so much as is needed to include 0.

@Carl Love The above Answer is doing that taking-forever-to-submit thing that I described a few days ago. This Reply is just to increment the Replies counter and update the Last Action time.

@Preben Alsholm I assume that you wanted to use the smallest possible thickness for the horizontal line. The smallest is not 1. The smallest integer thickness is 0. Floating-point values between 0 and 1 will produce lines even thinner than thickness= 0. On my current screen, the smallest practical value seems to be 0.05; smaller positive values give me visible lines that appear the same as using 0.05.

Formally speaking, the period is the number of digits in the fundamental repeating part, not the repeating part itself. So, the base-10 period of 1/12 is 1.

@Ronan Meta-parameters (most of whose names begin with underscore: _params, _nparams_options_noptions_rest_nrest_passed_npassed) are described in section "Special Sequences" of help page ?using_parameters. You must use the specific name _rest, but you could have assign it to a local variable so that the _rest can be isolated at the top of the procedure. For example,

MyPlot:= proc(MainArgs::list)
    default_opts:= (color= red, thickness= 0, linestyle= dash),
    ad_hoc_opts:= _rest
    plot(MainArgs[], default_opts, ad_hoc_opts
end proc;


@nm Your example -- a procedure with local n::integer -- is not giving a type to n. Rather, it's enforcing (when kernel(assertlevel) = 2) a type check of the things that will be assigned to n, not itself. (Note that the type command in my procedure below explicitly says that x is not type integer.) Here's an example using a declared type on a variable vs. assuming an analogous property.

kernelopts(assertlevel= 2):
#Compare type integer...: 
proc() local x::integer, y::integer; 
    print([type(x, integer), is(x+1, integer)] assuming x::integer); 
    y:= x+1
end proc();
                             [false, true]
Error, (in anonymous procedure) assertion failed in assignment to y, expected integer, got x+1

#...versus property integer:
assume(x::integer); y:= x+1: [type, is](y, integer);
                             [false, true]

Also, I should point out that Maple's type system is much more complicated and much more important than its property system.

Another example: Maple has a pre-defined type nothing, which always returns false. You can put ::nothing in a variable's local declaration. The reason one may want to do this is that it protects (under kernelopts(assertlevel) = 2) against the variable being assigned to. But you can still use the variable symbolically.


And here's the imaginary part:

@dharr Okay, I understand, and I withdraw my comment about it being incorrect. And I put a more-formal withdrawal at the top of the Reply.

1 2 3 4 5 6 7 Last Page 2 of 689