Carl Love

Carl Love

28055 Reputation

25 Badges

12 years, 354 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@anthei If you want to use Logic:-Dual in your version of Maple, you can replace it with a corrected procedure, like this:

restart:
unprotect(Logic:-Dual):
Logic:-Dual:= proc(e)
uses L= Logic;    
local
    o,
    O:= [
        `&and`, `&or`, `&not`, `&iff`, 
        `&xor`, `&nand`, `&nor`, `&implies`
    ],
    D:= [
        true= false, L:-`&and`= L:-`&or`, 
        L:-`&iff`= L:-`&xor`, L:-`&nand`= L:-`&nor`
    ]
;    
    evalindets(
        eval(
            subs(seq(cat(``,o)= L[o], o= O), e),
            [
                D[], (rhs= lhs)~(D)[], 
                L:-`&implies`= ((p,q)-> L:-`&not`(L:-`&implies`(q,p)))
            ]
        ),
        (L:-`&not`@@2)(anything), op@@2
    )
end proc:
protect(Logic:-Dual):

 

@Axel Vogt My interpretation of the Question is that the desired direction of conversion is from BesselJ to an elementary function.

What Maple version are you using? In Maple 2019, this conversion happens automatically (here using n=9/2 for example):

BesselJ(9/2, x);
             

@anthei Maple 18 is not the same as Maple 2018. The chronological sequence of annual Maple version numbers since Maple 10 has been 10, 11, ..., 17, 18, 2015, 2016, ..., 2021, 2022.

@David Sycamore I have explicit index formulas (what you referred to as f(n) in your most-recent Reply) for the three subsequences:

f[1]:= n-> 4*n - 3:
f[2]:= n-> 4*n - 2:  
f[3]:= n-> 2*n + (1 - (-1)^n)/2:

That formulation of f[3] makes it seem a bit more complicated than it really is. It's just an arithmetic cycle modulo 4 with the 4*n-1 and 4*n terms grouped together as the 3rd subsequence.

To plot them together as distinct subsequences (e.g., with different colors), you could do

Subseq:= proc(L,J,N) 
local n,j; 
    [seq]([j,L[j]], j= [seq](J(n), n= 1..N))
end proc
:
m:= 4000:
L:= [seq](a(n)/n, n= 1..m):
plot(
    [Subseq(L, f[1], m/4), Subseq(L, f[2], m/4), Subseq(L, f[3], m/2)],
    color= [red, green, black], 
    style= point, symbolsize= max(1, trunc(64/(1+ilog2(m))))
);

Or, applying the same indexing to a(n) rather than a(n)/n:

L:= [seq](a(n), n= 1..m):
#Exactly the same plot command works.

@Arastas If is any matrix, vector, array, list, set, or table, (which I'll call the "basic containers") and com is any command of a single argument that you could apply to the elements of A, then you can use com~(A) to apply it to all the elements. If com is one of those commands that maps itself automatically, you can still safely use com~ anyway. If you need to pass extra arguments to com, you can also pass them to com~ as long as none of the extra arguments is a basic container. (In acer's example, the exp is an extra argument for convert that's being passed to convert~.) If one or more of the extra arguments is a basic container, then you need to make minor syntax adjustments with mapcurry, and/or rcurry.

Whether A contains symbolic expressions is irrelevant to the use of tilde.

@Arastas You're currently using the best guide that exists: MaplePrimes.

It's well known by mathematicians that sometimes better results can be achieved by replacing a constant with a symbolic variable, doing some manipulation, and then putting the constant back in for the variable. The same thing applies to CAS. The art and craft of it---which only comes with practice---is having the intuition to guess when it's a good time to try that. @Mariusz Iwaniuk is very crafty.

Keep in mind that this is just a "trick" that makes the simplification easier. The end result is exactly the same as acer's slightly more involved simplification. On the other hand, tricks such as these often make the difference between simplifications that take an unreasonable or a reasonable amount of time and/or memory.

@David Sycamore Just replace a(n) with a(n)/n in the previous plotting commands:

m:= 3000:
L:= [seq](a(n)/n, n= 1..m):
plots:-listplot(       
    L, style= point,  
    symbolsize= max(1, round(16/(1+ilog2(m))))
);

@Arastas I think that this simplified example may show you the crucial difference that makes it work. Compare the results of these two sum commands:

sum(t^2, t= k..k+13);
sum(t^2, t= k..k+n);

The 2nd uses symbolic summation; the 1st just crudely adds 14 terms together. The 1st could've used symbolic summation, but it chose not to. When the number of terms is specifically known to sum (as in the 1st case), it uses a heuristic to decide between symbolic summation and simple addition. For the case at hand, that heuristic turns out to not make the best choice.

The procedure pellsolve is missing from your posted code. Please provide it.

@stud_8013 Due to some bug in MaplePrimes, the number of Replies is shown as 0 for this Question (and it'll likely be shown as 1 after I post this), so I don't know if you saw that your Question has been Answered. And if you did see the Answer, I expected some sort of Reply (like whether it works for you).

@David Sycamore The sequence a(n)/n appears to have three distinct convergent subsequences, two converging to 3/2 (guess), one from above and one from below, and one converging to 3/4 (guess) from below.

@Christopher2222 You asked:

  • But why did the author choose to show it as tan^(-1)?  Probably his convention of choice.

It is an unfortunate and ambiguous textbook convention to use -1 (with no parentheses) as a superscript on function names to indicate the functional inverse and to use positive integer superscripts with exactly the same typography to indicate algebraic exponentiation (rather than functional iteration). In Maple's 2D output, a (-1) superscript---in parentheses---on a function name indicates the functional inverse, but in cases such as tan where that inverse already has its own name (arctan), the tan@@(-1) gets replaced by arctan, unless you use unevaluation quotes or some form of inertness.

@David Sycamore I have no idea why those plot commands are not working for you.

Starting at about 500 points, one can see a remarkably regular pattern in the plot. Here's the plot for 1000 points:

At 10,000 points, there's no additional pattern apparent, just continuation of the 3 rays.

I have two quibbles with the wording (only) of your sequence's defining phrase, to wit:

  • Lexicographicaly least sequence of nonnegative integers commencing 1,3,5,7 such that any four consecutive terms are mutually coprime.

I'd change it to

  • Lexicographically least sequence of distinct nonnegative integers commencing 1, 3, 5, 7 such that any four consecutive terms are mutually pairwise coprime

My quibble is with the wording only, not with the underlying concepts.

First 95 96 97 98 99 100 101 Last Page 97 of 709