acer

32405 Reputation

29 Badges

19 years, 346 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

Ouch!

I find it hard to disagree with Jacques's points.

acer

Ouch!

I find it hard to disagree with Jacques's points.

acer

@Alejandro Jakubi Thanks Alejandro. PDEtools, the CAS within a CAS. ;)

More seriously, though, I suspect that the U from LU factorization (or  maybe the U1 from Turing factorization) might be a wise way to go, as it may already allow for Normalizer and Testzero during pivoting, etc. Finding the cases in the parameters by examining the zeros of the diagonal elements, and then constructing corresponding restrictions on the RHS entries doesn't look impossible.

What I was thinking though, was more this: this kind of case solving is important and useful, and the linear system class cannot be the hardest class for attempting it.

acer

@Alejandro Jakubi Thanks Alejandro. PDEtools, the CAS within a CAS. ;)

More seriously, though, I suspect that the U from LU factorization (or  maybe the U1 from Turing factorization) might be a wise way to go, as it may already allow for Normalizer and Testzero during pivoting, etc. Finding the cases in the parameters by examining the zeros of the diagonal elements, and then constructing corresponding restrictions on the RHS entries doesn't look impossible.

What I was thinking though, was more this: this kind of case solving is important and useful, and the linear system class cannot be the hardest class for attempting it.

acer

So, how can one get a robust method to get such piecemeal solutions, organized by special values of parameters (and whatever constraints on the RHS entries ensue)?

A piecewise result might be nice.

> M:=Matrix([[1,0,0,b1],[2,k,0,b2],[m,k,1,b3]]):

> LinearAlgebra:-LinearSolve(M);

                          [          b1          ]
                          [                      ]
                          [       2 b1 - b2      ]
                          [     - ---------      ]
                          [           k          ]
                          [                      ]
                          [-m b1 + b3 + 2 b1 - b2]

> solve(LinearAlgebra:-GenerateEquations(M,[x1,x2,x3]),
>       [x1,x2,x3],AllSolutions,ConditionalSolutions);

   [[                2 b1 - b2                             ]]
   [[x1 = b1, x2 = - ---------, x3 = -m b1 + b3 + 2 b1 - b2]]
   [[                    k                                 ]]

> solve(LinearAlgebra:-GenerateEquations(eval(M,[k=0,b1=b2/2]),[x1,x2,x3]),
>       [x1,x2,x3]);

            [[     1                        1     ]]
            [[x1 = - b2, x2 = x2, x3 = b3 - - m b2]]
            [[     2                        2     ]]

How can that last result be nicely obtained, without having to know the special value k=0 and the constraint b1=b2/2 in advance?

Of course, throw just a few more unknowns into Matrix M and the result might quickly become huge and unwieldy. But for smaller, simpler examples it migh tbe nice to have.

acer

So, how can one get a robust method to get such piecemeal solutions, organized by special values of parameters (and whatever constraints on the RHS entries ensue)?

A piecewise result might be nice.

> M:=Matrix([[1,0,0,b1],[2,k,0,b2],[m,k,1,b3]]):

> LinearAlgebra:-LinearSolve(M);

                          [          b1          ]
                          [                      ]
                          [       2 b1 - b2      ]
                          [     - ---------      ]
                          [           k          ]
                          [                      ]
                          [-m b1 + b3 + 2 b1 - b2]

> solve(LinearAlgebra:-GenerateEquations(M,[x1,x2,x3]),
>       [x1,x2,x3],AllSolutions,ConditionalSolutions);

   [[                2 b1 - b2                             ]]
   [[x1 = b1, x2 = - ---------, x3 = -m b1 + b3 + 2 b1 - b2]]
   [[                    k                                 ]]

> solve(LinearAlgebra:-GenerateEquations(eval(M,[k=0,b1=b2/2]),[x1,x2,x3]),
>       [x1,x2,x3]);

            [[     1                        1     ]]
            [[x1 = - b2, x2 = x2, x3 = b3 - - m b2]]
            [[     2                        2     ]]

How can that last result be nicely obtained, without having to know the special value k=0 and the constraint b1=b2/2 in advance?

Of course, throw just a few more unknowns into Matrix M and the result might quickly become huge and unwieldy. But for smaller, simpler examples it migh tbe nice to have.

acer

This is homework, yes?

Were you looking for an easy way for Maple to get the two results?

Or were you looking for hints about how to show it "by hand", without Maple?

Or...?

acer

I love submitting, only to find that I've been scooped!

But if it's by Robert, I feel less bad about it.  ;)

acer

I love submitting, only to find that I've been scooped!

But if it's by Robert, I feel less bad about it.  ;)

acer

It seems that you can get it from the alternate maplenet "save" url, even though it is .mws (which surprised me!).

See here.

acer

Ok, thanks Robert. An optional keyword parameter to Statistics:-NonlinearFit might do, such as {globalsearch::truefalse:=false}. The interactive Optimization assistant has something like this, a checkbox for global searching (applied to NLP solving, say). So it would be nice if the non-interactive components which use Optmization, such as Fit and NonlinearFit, could also get such options.

acer

Ok, thanks Robert. An optional keyword parameter to Statistics:-NonlinearFit might do, such as {globalsearch::truefalse:=false}. The interactive Optimization assistant has something like this, a checkbox for global searching (applied to NLP solving, say). So it would be nice if the non-interactive components which use Optmization, such as Fit and NonlinearFit, could also get such options.

acer

@Christopher2222 You are not just imagining it. Some navigation in the new site is slower than it was.

@slowlai That specfunc(anything,min) part of that frontend invocation is there so that min() calls don't get frozen entirely (which would prevent convert/piecewise from being to see & operate on its contents). As used, that frontend invocation will freeze most else, including products such as x*lambda. The idea is to treat x*lambda as if it were a single name, by freezing it with frontend, so that convert/piecewise will function on it.

Another way could be to freeze just that subexpression x*lambda, "by hand",

expr:=min(x*lambda,0);
ice:=freeze(x*lambda);
convert(subs(x*lambda=ice,expr),piecewise,ice);
thaw(%);

@slowlai That specfunc(anything,min) part of that frontend invocation is there so that min() calls don't get frozen entirely (which would prevent convert/piecewise from being to see & operate on its contents). As used, that frontend invocation will freeze most else, including products such as x*lambda. The idea is to treat x*lambda as if it were a single name, by freezing it with frontend, so that convert/piecewise will function on it.

Another way could be to freeze just that subexpression x*lambda, "by hand",

expr:=min(x*lambda,0);
ice:=freeze(x*lambda);
convert(subs(x*lambda=ice,expr),piecewise,ice);
thaw(%);
First 457 458 459 460 461 462 463 Last Page 459 of 593