sand15

1189 Reputation

15 Badges

10 years, 343 days

MaplePrimes Activity


These are replies submitted by sand15

@dharr 

EDITED 4:00 PM CET
 

See Equifinality

(in a few words the model  E(𝝊; A, C, E0, Em) is  non identifiable in the sense that different sets of parameter values (A, C, E0, Em) give essentially the same result...which is pretty obvious given there are only 3 observations and 4 parameters).

Nevertheless it is intructive to observe what are the 4-tuples (A, C, E0, Em) which give essentially the same result than the full paramolic model F := 𝝊 → a +b 𝝊 + c 𝝊2  in the (min..max)(nuvals) range.
ML_sand15_(MC).mw

Let (A) the family of models E(𝝊, A, C, E0, Em) defined by

C=-1.9e-19, 
E0=exp(21.17115-ln(A)), 
Em=-0.068883

whatever A in the range 1e-2 .. 1e5

All model in (A) are identical to the full parabolic fit F := 𝝊 → a +b 𝝊 + c 𝝊2  in the sense that 
evalf( Int( (F(𝝊) - E(𝝊, A, C, E0, Em))2, 𝝊 = (min..max)(nuvals) ) ) < 1e-6
.

 

... or in simpler form

restart;

with(geometry):

point(A, 2, -3):

point(B, -1, 6):

sort(Equation(line(d, [A, B], [x, y])));

-9*x-3*y+9 = 0

(1)

c := igcd( coeffs(lhs((1)), [x, y]) );
(1)/c;
-(1)/c;

3

 

-3*x-y+3 = 0

 

3*x+y-3 = 0

(2)
 

 

Download igcd.mw

@dharr 

The "not of full rank" thing is a numerical issue as shown (Maple inputs in normal black font) in the attached file.
Conversion of nuvals and Evals into rationals removes this "not of full rank issue" and leads to a parabolic model a+b
𝝊2 which is now quite good (in addition a fullparamolic model including 𝝊 is constructed, simply to verify that the system is of fullrank too).
MLfit_full_rank.mw

By the way I did some stuff around this full parabolic model a +b 𝝊 + c 𝝊2 .
The idea is basically the following:

  1. Let F := 𝝊 → a +b 𝝊 + c 𝝊2  the fitted model. 
  2. Find the 4-uple (A, C, E0, Em) which minimizes
           evalf( Int( (F(𝝊) - E(𝝊, A, C, E0, Em))2, 𝝊 = (min..max)(nuvals) ) )
    My first (unsuccessfull) attempt was to use  NLPSolve. So I thought using some user-made genetic algorithm instead but I don't know if it's worth spending time on it until the OP clarifies its needs ?

@MichaelVio 

"What is the value of A that I should start with so that the abs|Em| is the minimum possible, and the plot looks like shown above?"
Do you mean like the parabola shape you provide in your question?
If it is so just remove the axis[1]=[mode=log] in my plot command: ML_sand15_(2).mw (I use this log mode to separate the obervations)

case 1) I gave up the negative Em condition?
case 2) I gave up all conditions except E(nu) positive for nu = [~10^4 to ~2.8*10^10]?

Giving them up or not has no effect because they are not explicitely accounted for in the fitting process 

@dharr 

we both get essentially the same result using different approaches.

@MichaelVio
The problem as it is posed is intrinsically "ill posed" (between quotes).
The fact there are 4 parameters and 3 equations E(nuval[i]) = Eval[i], i=1..3, introduces some unnecessary complexity. So, to simplify, let us suppose the values of E(nu) are known at exactly 4 different locations.
We have then a smart system of 4 equations in 4 unknowns.
Let us assume this system has only one single solution (just to simplify, maybe there are a countable number of solutions).
Maybe this solution corresponds to |Em| < 0.00005 and you will be happy with it, but how will you react if this single solution corresponds to the value Em = 10?

@vv 

My guess is @yangtheary maybe wants to find a few examples of positive values of p, q, r, s, n, k (which are likeliy in infinite number too) which fullfill its relations.
For instance

{k = 17, n = 1, p = 16, q = 5, r = 19, s = 4568}
{k = 16, n = 1, p = 16, q = 3, r = 9, s = 3833}
...
{k = 18, n = 2, p = 17, q = 0, r = 18, s = 2757}
{k = 14, n = 2, p = 2, q = 1, r = 9, s = 817}
...

Here is a piece of code which returns such positive solutions positive_solutions.mw (random search)
As you see positive solutions seem to be more and more rare as n increases.

strictly_positive_solutions.mw is basically the same code for strictly positive values of p, q, r, s and k. Now no solution has been found (in a reasonable time, which does not mean that they do not exist) for n = 4.

@Andiguys 

What if I told you that whatever the rescaling of the y-axis the graph of OBJ will always remain "flat", as you say?.

I'm not going to tell you why it is so because I believe I would not be doing you any favor doing so.

So I only give you a hint (and I consider myself as being very generous): copy-paste this piece of code at the end of your worksheet and try to understand where the last result comes from

indets(`???`(i2), name);
         {Ce, Cn, Cr, Crm, alpha, delta, i2, rho0, tau}

indets(OBJ, name);
                               {}

Once you have understood your mistake correct it to get this

@Andiguys 

Your worksheet contains the lines

`???` := i2 -> 
piecewise(
i2 > K2, 
subs([n = 

instead of 

`???` := i2 -> 
piecewise(
i2 > K2, 
subs([Pn = 

This is why you get the 
Warning, expecting only range variable i2 in expression piecewise(.2692622951 < i2,.....to be plotted but found name Pn

When you get such a warning, which explicitely says the expression to plot depends on i2 and Pn, the right reflex is always to check what the expression depends on:

indets(OBJ, name)
                            {Pn, i2}

@Ronan 

... for the info.
I indeed use a quite old version and  it's good to know that simplify have been improved meanwhile.

@acer 

Thank you acer.
Even though it didn't come to my mind, it is indeed quite natural to pass on the additional inequalities.

@janhardo 

"Note: using a 10-year-old version of Maple means you're lagging behind in terms of the new possibilities"
You are perfectly right, and so is 
@acer, but you would probably more surprised if I tell you that I keep using plain TeX instead of LaTeX (at least for some features)
More seriously I no longer uses Maple the same way I did a few years ago in my professionnal activities and I'm quite far from Maplets or Embedded Components presently.

"Creating maplets with AI did not prove successful..."
I'm not really surprised, because Maplets are quite a ticklish tool, powerfull indeed by very delicate to manipulate. The main drawback is that they are impossible to debug and that their development is often a matter of discouraging successive trials and errors when you begin working with them.
Another drawback is that the execution of a Maplet, generates a child process, meaning you can't kill it the usual way and sometimes fores you to kill some mserver processes.

"I don't know how difficult it is to create an explorer plot or a maplet in comparison."
If you are a beginner with Maplets, the answer is "quite difficult", more of this there are some false informations in the help pages.
So 
I can't help but agree what @acer wrote earlier about the advantage of “modern” Embedded Components which, I hope, should simplify the development of application by comparison to Maplets.

@acer 

You're right: what I did could perhaps (?) be done in a better way using embedded components instead (already available in Maple 2015, by the way).

So why did I use Maplets here?
A long time ago, I developed a Maplet-based application for engineers. One of the main development constraints was that users, who had no particular knowledge of Maple, did not want to worry about what Maple was or be bothered with Maple worksheets or documents. Maplets offered this transparency by displaying cascading windows according to the scenarios applied by users. These same windows could even have been created by any other software (the core of the process is what happens in the background when users click a button, and here, a CAS is mandatory).
After discussing (2019-2020) with MapleSoft France about Embedded Components as an alternative to Maplets to “modernize” this application, it became apparent that the former did not necessarily offer a better solution. In some sense the game wasn't worth the candle.
So I kept working with Maplets and never developed any skills in embedded components.

In reality, even though it might have made you sound harsh, you shouldn't have said “In modern Maple...,” but rather “For modern Maple users...”. I know I'm a bit old-fashioned :-).

@janhardo 

As I say inside the attached worksheet Maple 2015 does not allow using the size option with plot3d structures.
As a consequence the display looks quite poor given the space attibuted to the title.

Nevertheless I suppose the code below should work with your own Maple version.
Explore_sand15.mw

Better results can be obtained using Maplets. Here is an illustration of what  Explore_sand15.mw provides  (using Maplets avoids all size problems and exporting the plot would not pose any problems).
The Explore facility is replaced by the use of a ComboBox (other Maplets:-Elements could be used instead) from which you can select the function directly by its expression instead than  by its number in some table (as Explore does).



In case you would be interested using Maplets, do not hesitate to ask me questions: I have some practice in them and I could help you.

@janhardo 


(there is a little piece of C(t)=0 in the bottom left corner)

1 2 3 4 5 6 7 Last Page 1 of 33