Carl Love

Carl Love

28100 Reputation

25 Badges

13 years, 105 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@MDD I am sorry that you got an error. Your error is caused by Maple's acursed 2D input. Your error would go away if you use 1D input. I am by no means an expert on 2D input, so I can't tell you how to correct this if you want to continuing using 2D input. Maybe an expert on 2D input will chime in here.

One option other than 1D input would be to cut and paste my code into a plaintext file and then use the read command with that file's name.

@Markiyan Hirnyk What? How is that a counterexample?? What are the coefficients that make it a linear combination?? You might as well say that 2*x+y+1 can be expressed as a linear combination of x+1 and y. You can't express an arbitrary three-term polynomial as a linear combination of only two basis elements!

@Markiyan Hirnyk 

You need to set the environment variable _EnvTry:= hard. (This is documented briefly at ?is.) If do this and retry your example, then you'll get coefficients which will simplify to 1.

Nonetheless, you'll always be able to come up with more and more convoluted examples of transcendental identities for which FAIL or even false are returned, even with _EnvTry set to hard. This is a result of a long-standing deficiency of is, which affects many areas of Maple. This deficiency has been the subject of extensive debate here on MaplePrimes in recent months, as I'm sure you're aware.

Remember that this program is primarily intended for polynomials. (I never claimed that it would work for all transcendental expressions, just that the class of expressions for which it works is much larger than simply polynomials.) I'll be really impressed if you can come up with a polynomial example where my program returns FAIL or incorrectly returns false. Such polynomials would need to have very convoluted transcendental coefficients with some unresolved (and unresolvable by is) identity lurking in the coefficients.

@MDD 

Well show me the error! What's the point of saying "there is an error" if you don't show the error?! If you have a Maple version earlier than 13, then I know what the error is. If so, let me know, and I'll give you another version.

@Markiyan Hirnyk 

Thank you for testing my program. You have come up with some great examples that illustrate its power, and you've also verified that it works well in conjunction with assuming. Indeed, in all three of your test cases, my program returns the correct and expected results. In the your first two test cases, the desired identity is indeed false unless you make some assumptions. In your third test, the returned coefficients are identically equal to 1, although in a complicated form. You just need to use simplify to verify that.

I did make a change to the program (in anticipation of your next test, which would've produced an incorrect result), so please download a fresh copy from the Answer.

 

@Markiyan Hirnyk 

Thanks. It's fixed now. Somehow two cut-and-pastes got merged.

@Preben Alsholm 

Thanks, Preben. It's a lot to absorb. To further my understanding of these steps, would you mind completing these steps just for the epsilon = 0 case, for which we know there's a nice solution? That is, take the ODESOLStruc (with epsilon=0), solve the first-order ODE with dsolve, do the integration, and invert the function to obtain something akin to the nice solution? I can do the dsolve and the int, but not the inversion.

@Carl Love 

I don't know the small parameter method, but I guess that you start with a solution for epsilon = 0For what it's worth, Maple has a nice compact symbolic solution for that:

dsolve(eval(eq, epsilon= 0));

     x(t) = _C2*sqrt(2)*sqrt(1/(_C2^2+1))*JacobiSN(((1/2*I)*sqrt(2)*t+_C1)*sqrt(2)*sqrt(1/(_C2^2+1)), _C2)

And Maple even has a sort of symbolic solution for the fully parameterized equation:

dsolve(eq);

     x(t) = _a &where
           [{(diff(_b(_a), _a))*_b(_a)-_b(_a)*_a^4*alpha*epsilon
                +_b(_a)*beta*epsilon+_a^3-_a = 0},
            {_a = x(t), _b(_a) = diff(x(t), t)},
            {t = Int(1/_b(_a), _a)+_C1, x(t) = _a}]

I don't know what this means, and I was hoping that someone here could explain it to me. In particular, What does it mean that _a appears as both the dependent variable and as an independent variable? Why is there no _C2? How can this solution be used? Why is it better than just giving no solution?

@Rouben Rostamian  

I don't understand the mathematics here, so this comment may be irrelevant: Before you get too far involved with this problem in a Mapleish way, remember that Maple currently will only numerically solve PDEs with exactly two independent variables. There's no such hard limit for symbolic solutions.

You were using Maple's 2D input and you typed the epsilon in the first line too close to the following left parenthesis, so it was interpretted as if epsilon were a function rather than as a coefficient. If you use Maple's 1D input, this and numerous other problems will be avoided. In the second line, you will get better results using eval rather than subs. The eval forces the evaluation of the derivatives. So, change these two lines to

eq:= diff(x(t),t$2) - epsilon*(alpha*x(t)^4 - beta)*diff(x(t),t) - x(t) + x(t)^3;
eq2:= eval(eq, x(t)= 1 + epsilon*x[1](t) + epsilon^2*x[2](t));

 

 

@Christopher2222 How does one hide a code edit region? I see the option to collapse it, but that doesn't completely hide it.

@MDD 

If you need for your procedure to be able to detect empty Matrices, then I recommend looking at the ColumnDimension rather than the RowDimension, because, like I said, any reasonable attempt to create an empty Matrix out of square brackets leads to a Matrix with one row and zero columns. (<<[][]>> creates a Matrix with zero rows and one column.)

If you need for your procedure to create empty Matrices, then use Matrix() or, if speed is critical, rtable(1..0, 1..0, subtype= Matrix).

If you post your procedure, I can make further suggestions.

@Haley_VSRC 

The corresponding mathematical reason is that b must be less than or equal to the minimal value of t in order to avoid nonreal values. The graphical result is that the omitted points are very close to the regression curve horizontally.

@Markiyan Hirnyk 

No, the {} indicates that the set of elements is the empty set, which is different from the empty set being an element.

@MDD 

NonzeroRowsAndColumns:= (M::Matrix)-> [
     add(`if`(ArrayTools:-IsZero(M[j,..]), 0, 1), j=1..op([1,1], M)),
     add(`if`(ArrayTools:-IsZero(M[..,j]), 0, 1), j=1..op([1,2], M))
]:

 

First 482 483 484 485 486 487 488 Last Page 484 of 709