Carl Love

Carl Love

28025 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

If the ellipse is inscribed in the rectangle, then its axes are necessarily determined by the midpoints of the rectangle's sides. In other words, the four points of tangency will be the midpoints of the sides. This should be enough for you to produce the plot. If you're still stuck, let me know.

@vv I'd recommend including a nonnegativity restriction when solving equations involving factorials:

floor(fsolve(1/(n+1)! = 0.0001, {n= 0..infinity})) + 1

Due to factorial's GAMMA extension, I've often obtained negative results when I forgot to include the restriction.

@rameen hamood Okay, my Answer is still valid.

Please give your Questions different and more-specific titles than "further linear algebra".

Please upload the worksheet by using the green uparrow on the toolbar. That way we can directly download it to our Maple.

@mthkvv 

You can speed up the coefficient arithmetic by exploiting the fact that the modulus is a power of two. Thus, the mod operation is just a bit truncation. Since GMP is open source, I'd start by looking there. It may just require a little tweaking.

I doubt that it's possible to gain any benefit from Schonhage-Strassen at this coefficient size. From my reading, the smallest coefficients that can benefit from S-S are order 2^(2^15).

 

  •  

@Adam Ledger Simply replace the second-to-last line with

ifactor:= ()-> orig_ifactor(({args} minus {':-easy'})[]):

@DarkMath How would it know that there's only one root unless it uses

solve({sin(x), -1 < x, x < 1}, x, explicit, allsolutions)

?

Using fewer options gives incorrect results for the root count (here I've widened the search interval):

solve({sin(x), -4 < x, x < 4}, x);
solve({sin(x), -4 < x, x < 4}, x, explicit);
solve({sin(x), -4 < x, x < 4}, x, allsolutions);

The first two give one root. The third gives countable infinity. So, given this, why would the integrator assume that "one root" was correct on the narrower interval? 

@DarkMath They are ineffective in general. I suspect that the reason is that they can always be worked-around by using eval as I showed.

@DarkMath I think that it'd be called a weakness rather than a bug (because the returned valued isn't incorrect). My guess is that the integrator fails to use the (explicit, allsolutions) combination of options. I discovered the effectiveness of this combination in 2016 by experimentation, before it was documentated in the help pages. I may have written something about it in MaplePrimes at that time; I can't recall. Anyway, this option combination is relatively new, so it may not be coded into the integrator.

If it is known a priori that the function is "odd" (aka antisymmetric), then I don't see any point in attempting to fit both branches simultaneously.

@emendes Assuming that all work is being done on a single computer[*1], I don't see much point in using Grid and Threads together. The table T1 is inherently "shared memory", thus making Threads the natural choice for the line doing the searches.

[*1] Grid does have a facility for distributing work over several computers. I believe that you need to pay MapleSoft something extra to get this functionality.

 

@emendes Certainly, copying the list as a table uses more memory than your original approach. If the original list L1 contains no duplicates, then the table contains all the information needed to reconstruct the list, and the L1 can be sent to the garbage collector:

T1:= table(sparse, L1=~[$1..nops(L1)]):
L1:= 'L1':
Threads:-Map[2](index, T1, L2);

@mthkvv Yes, I'm familiar with those multiplication algorithms.

There are two kinds of multiplication to consider here: The multiplication of the polynomials and the underlying multiplication of the integer coefficients. The integer arithmetic is handled by GMP (see Wikipedia article). The package is extremely efficiency conscious, and you'll not be able to beat it. It uses a polyalgorithmic approach---choosing the multiplication algorithm depending on the size of the factors. I believe that it switches to Schonhage-Strassen for factors larger than about 33,000 decimal digits.

Regarding the polynomial multiplication: Some experiments can be done to estimate the order of time complexity as a function of the number of terms. 

@mmcdara Algebraic functions can also have different horizontal asymptotes on the left and right. Example:

x/sqrt(x^2+1).

First 182 183 184 185 186 187 188 Last Page 184 of 708