Carl Love

Carl Love

28050 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@asa12 Since you're by far the most prolific Question asker of all time on MaplePrimes, you of all people should know that nobody's going to try to answer your Question based on a screenshot, especially one as complicated as this. And it's not even a proper screenshot! You took a photo of your screen with a camera, which you didn't even hold parallel to the screen.

This isn't to excuse solve's poor performance, but why are you trying to solve this rather than the reduced form surd(x,2), which solve handles correctly?

In the animation on the left, I don't understand the significance of the gold circle---the middle one of the three stationary circles.

@ThU Automatic simplification of equations doesn't move anything from one side to the other. Automatic simplification of inequalities with unknowns collects the constants on one side.

@MortenZdk It's true that save will produce a readable .mpl file. However, the code will be formatted the way that Maple wants it, and all your comments will be stripped. One crude way around the latter is to put comments in string literals, like

C:= "This is my comment":

@noah2gud Yes, I already saw your problem and realized that it was essentially the same as this one. There's no need to repeat your problem. It just wastes both of our time.

@necron

The original function is very sensitive to small changes in the input. In order to verify that the roots produced by RootFinding:-Analytic had small residuals, I needed to use Digits:= 30. This doesn't mean that the roots produced with smaller values of Digits are incorrect! The high value of Digits (used for both the root computation and the residual computation) is only necessary to verify that the residuals are low. In my exploration of the roots in 0..Pi x 0..Pi, the maximum residual that I got using 30 digits was ~ 1e-15.

I think that the problem is too broadly specified to be addressed with a single algorithm. How about if you provide a small example data set, which features you want extracted, and what you want mined; and I'll try to address the problem as if it were a big data set, perhaps so big that it must be stored on disk rather than memory.

If you can fit everything in memory, and you have Maple 2016, some nifty mining can be done with DataFrames. See this Maplesoft Blog Post: http://www.mapleprimes.com/maplesoftblog/203857-An-Interactive-Application-For-Exploring

@John Fredsted So, since there's only two things that need to be frozen, it's fairly easy to achieve the same result with freeze/thaw:

e:= sqrt(1+diff(f(x),x))*(2+g(x)):
fz:= {diff(f(x),x), g(x)}:
thaw(mtaylor(eval([e, fz, 2], fz=~ freeze~(fz))[]));

To me, that's easier than fiddling with that third argument of frontend.

Here's another way, based on the idea that all functions can be frozen:

e:= sqrt(1+diff(f(x),x))*(2+g(x)):
thaw(mtaylor(subsindets[flat]([e, {diff(f(x),x), g(x)}, 2], function, freeze)[]));

This works because sqrt is stored as a `^` rather than as a function.

@asa12 There are two problems with your attempt, both of which are addressed by Kitonum's Answer. The first is that your {op(m)} should be [op(m)]. The {} forms a set, which doesn't allow for repetition. The second is more subtle: the 1/(t^3+2) is stored as (t^3+2)^(-1), so it is also of type `^`. Here's a generalization of Kitonum's Answer that allows for any negative integer exponent:

map(e-> `if`(e::`^`, op(1,e)^signum(op(2,e)) $ abs(op(2,e)), e), [op(m)]);

@necron I have used the DirectSearch package with several different algorithms (Powell, Brent, cdos) completely different from the Newton-Raphson used by RootFinding:-Analytic. I've searched extensively in the square 0..Pi x 0..Pi using up to 400 randomly generated seed points. I can find no roots other than those found by RootFinding:-Analytic.

@John Fredsted The second argument to mtaylor is the set {diff(f(x),x), g(x)}. If this set were to be frozen, then mtaylor would think that its second argument were a single name.

I find that my main difficulty with setting up the third argument to frontend is that this argument specifies what's not to be frozen rather than what is. In this particular problem, the only things that need to be frozen are diff(f(x),x) and g(x); everything else is something to not be frozen.

Does "equal" mean that they are identical and have the same list position in the two lists? And if list position doesn't matter, why not use sets? Can there be repetition within the lists? Do you want to check for mathematical equality upon simplification, or is a simple identity check enough?

@Adam Ledger 

If you want to reset a global variable to its original definition at startup, then use kernelopts(unread= ...). For example,

freeze(x+1):
`freeze/count`;

     1

kernelopts(unread= '`freeze/count`');
`freeze/count`;

     0

So, the original value of the global variable `freeze/count` was 0.

@Adam Ledger First study freeze, then thaw. The freeze is very simple: It creates a name and stashes the original reference in the remember table of thaw. So thaw already knows how to revert all the frozen objects from its remember table. It only remains for thaw to map itself over all objects that contain the frozen objects. This is a very common model: A procedure has primary code to define its action on primary objects, then the rest of the code defines how that procedure maps itself over container objects. In the case of thaw, all of the primary action is covered by the remember table, so the entirety of the code defines how the code maps itself!

First 394 395 396 397 398 399 400 Last Page 396 of 709